@@ -17,8 +17,8 @@
|
||||
<IsA>data</IsA>
|
||||
<Summary>Firmware files used by the Linux kernel</Summary>
|
||||
<Description>linux-firmware contains different firmware files required for some devices to operate correctly.</Description>
|
||||
<!-- linux-firmware commit: 40e9ae84308274b91ac069fba2f1a290fcdc83fc 2016-01-11 -->
|
||||
<Archive sha1sum="d7bd31f512cabebf003762412447c45f90a0e462" type="tarbz2">http://sourceforge.net/projects/pisilinux/files/source/linux-firmware-20160328.tar.bz2</Archive>
|
||||
<!-- linux-firmware commit: 3ef7857d511ce6a91c5ce609da76c4702651cfa5 2016-06-24 -->
|
||||
<Archive sha1sum="5d06fcba6edd042c1add63a770361d357327ae04" type="tarbz2">http://sourceforge.net/projects/pisilinux/files/source/linux-firmware-20160624.tar.bz2</Archive>
|
||||
<Archive sha1sum="dd685266f7bc0acb0d455462637d23e3e895bc96" type="tarxz" target="linux-firmware/mix">http://source.pisilinux.org/erdinc/common-fw.tar.xz</Archive>
|
||||
<Archive sha1sum="b2bb7fce3ea67d131f543a48134f7a65f2a8d834" type="tarxz" target="linux-firmware/mix">http://source.pisilinux.org/erdinc/firmware-ipw.tar.xz</Archive>
|
||||
<Archive sha1sum="a5a616a9f765cf9cbb224deb7ccefdc82a7fe4d9" type="tarbz2" target="linux-firmware/mix">http://source.pisilinux.org/erdinc/firmware/firmware-nonfreebox-2-tar.bz2</Archive>
|
||||
@@ -33,7 +33,6 @@
|
||||
<!--AdditionalFile target="intel/ibt-hw-37.7.10-fw-1.80.2.3.d.bseq">fw/ibt-hw-37.7.10-fw-1.80.2.3.d.bseq</AdditionalFile-->
|
||||
<AdditionalFile target="iwlwifi-7260-14.ucode">iwlwifi-7260-14.ucode</AdditionalFile>
|
||||
<AdditionalFile target="iwlwifi-7260-15.ucode">iwlwifi-7260-15.ucode</AdditionalFile>
|
||||
<AdditionalFile target="iwlwifi-7260-16.ucode">iwlwifi-7260-16.ucode</AdditionalFile>
|
||||
<AdditionalFile target="iwlwifi-7260-17.ucode">iwlwifi-7260-17.ucode</AdditionalFile>
|
||||
</AdditionalFiles>
|
||||
</Source>
|
||||
@@ -50,6 +49,13 @@
|
||||
</Package>
|
||||
|
||||
<History>
|
||||
<Update release="3">
|
||||
<Date>2016-06-29</Date>
|
||||
<Version>20160624</Version>
|
||||
<Comment>Release Bump</Comment>
|
||||
<Name>PisiLinux Community</Name>
|
||||
<Email>admin@pisilinux.org</Email>
|
||||
</Update>
|
||||
<Update release="2">
|
||||
<Date>2016-04-27</Date>
|
||||
<Version>20160111</Version>
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
<Summary>Kernel module allowing to switch dedicated graphics card on Optimus laptops</Summary>
|
||||
<Description>kernel module allowing to switch dedicated graphics card on Optimus laptops</Description>
|
||||
<BuildDependencies>
|
||||
<Dependency version="4.4.8">kernel-module-headers</Dependency>
|
||||
<Dependency version="4.6.3">kernel-module-headers</Dependency>
|
||||
</BuildDependencies>
|
||||
<Archive sha1sum="e282ee682d794e3962baa4dead01917c42571e78" type="targz">https://github.com/Bumblebee-Project/bbswitch/archive/v0.8.tar.gz</Archive>
|
||||
<Patches>
|
||||
@@ -20,7 +20,7 @@
|
||||
<Package>
|
||||
<Name>module-bbswitch</Name>
|
||||
<RuntimeDependencies>
|
||||
<Dependency version="4.4.8">kernel</Dependency>
|
||||
<Dependency version="4.6.3">kernel</Dependency>
|
||||
</RuntimeDependencies>
|
||||
<Files>
|
||||
<Path fileType="library" permanent="true">/lib/modules</Path>
|
||||
@@ -34,6 +34,13 @@
|
||||
</Package>
|
||||
|
||||
<History>
|
||||
<Update release="3">
|
||||
<Date>2016-06-28</Date>
|
||||
<Version>0.8</Version>
|
||||
<Comment>Release Bump</Comment>
|
||||
<Name>PisiLinux Community</Name>
|
||||
<Email>admin@pisilinux.org</Email>
|
||||
</Update>
|
||||
<Update release="2">
|
||||
<Date>2016-04-30</Date>
|
||||
<Version>0.8</Version>
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
<Archive sha1sum="8acbdbb4ab4ab4123d1773b616904798fbef9277" type="targz" target="i686">http://www.broadcom.com/docs/linux_sta/hybrid-v35-nodebug-pcoem-6_30_223_271.tar.gz</Archive>
|
||||
<Archive sha1sum="1f568bb989d175813c5631c6629d9479eae6f3be" type="targz" target="x86_64">http://www.broadcom.com/docs/linux_sta/hybrid-v35_64-nodebug-pcoem-6_30_223_271.tar.gz</Archive>
|
||||
<BuildDependencies>
|
||||
<Dependency version="4.4.8">kernel-module-headers</Dependency>
|
||||
<Dependency version="4.6.3">kernel-module-headers</Dependency>
|
||||
</BuildDependencies>
|
||||
<Patches>
|
||||
<!-- <Patch level="1">patch/linux-40.patch</Patch> -->
|
||||
@@ -33,7 +33,7 @@
|
||||
<Package>
|
||||
<Name>module-broadcom-wl</Name>
|
||||
<RuntimeDependencies>
|
||||
<Dependency version="4.4.8">kernel</Dependency>
|
||||
<Dependency version="4.6.3">kernel</Dependency>
|
||||
<Dependency release="current">module-broadcom-wl-userspace</Dependency>
|
||||
</RuntimeDependencies>
|
||||
<Replaces>
|
||||
@@ -66,9 +66,9 @@
|
||||
|
||||
<History>
|
||||
<Update release="3">
|
||||
<Date>2016-05-29</Date>
|
||||
<Date>2016-06-28</Date>
|
||||
<Version>6.30.223.271</Version>
|
||||
<Comment>Version Bump</Comment>
|
||||
<Comment>Rebuild for new kernel.</Comment>
|
||||
<Name>PisiLinux Community</Name>
|
||||
<Email>admin@pisilinux.org</Email>
|
||||
</Update>
|
||||
|
||||
@@ -14,14 +14,14 @@
|
||||
<Description>This package provides the kernel modules needed for mouse integration and shared folder support between VirtualBox host and guest systems.</Description>
|
||||
<Archive sha1sum="7d1e0c0db7db8ce14e930ad1078f89a5d8cd0b42" type="tarxz">http://sourceforge.net/projects/pisiiso/files/source/module-virtualbox-guest-5.1.0b.tar.xz</Archive>
|
||||
<BuildDependencies>
|
||||
<Dependency version="4.4.8">kernel-module-headers</Dependency>
|
||||
<Dependency version="4.6.3">kernel-module-headers</Dependency>
|
||||
</BuildDependencies>
|
||||
</Source>
|
||||
|
||||
<Package>
|
||||
<Name>module-virtualbox-guest</Name>
|
||||
<RuntimeDependencies>
|
||||
<Dependency version="4.4.8">kernel</Dependency>
|
||||
<Dependency version="4.6.3">kernel</Dependency>
|
||||
<Dependency>baselayout</Dependency>
|
||||
<Dependency version="current">module-virtualbox-guest-userspace</Dependency>
|
||||
</RuntimeDependencies>
|
||||
@@ -53,9 +53,9 @@
|
||||
|
||||
<History>
|
||||
<Update release="3">
|
||||
<Date>2016-06-17</Date>
|
||||
<Date>2016-06-28</Date>
|
||||
<Version>5.1.0b</Version>
|
||||
<Comment>Version Bump</Comment>
|
||||
<Comment>Rebuild for new kernel.</Comment>
|
||||
<Name>PisiLinux Community</Name>
|
||||
<Email>admin@pisilinux.org</Email>
|
||||
</Update>
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
<Description>This package provides the kernel support for VirtualBox.</Description>
|
||||
<Archive sha1sum="beb0bfb3e677ba3bd97dc254bd61bfe546f732de" type="tarxz">http://sourceforge.net/projects/pisiiso/files/source/module-virtualbox-5.1.0b.tar.xz</Archive>
|
||||
<BuildDependencies>
|
||||
<Dependency version="4.4.8">kernel-module-headers</Dependency>
|
||||
<Dependency version="4.6.3">kernel-module-headers</Dependency>
|
||||
</BuildDependencies>
|
||||
<!--Patches>
|
||||
<Patch>vbox_linux-4.3.diff</Patch>
|
||||
@@ -24,7 +24,7 @@
|
||||
<Package>
|
||||
<Name>module-virtualbox</Name>
|
||||
<RuntimeDependencies>
|
||||
<Dependency version="4.4.8">kernel</Dependency>
|
||||
<Dependency version="4.6.3">kernel</Dependency>
|
||||
<Dependency version="current">module-virtualbox-userspace</Dependency>
|
||||
</RuntimeDependencies>
|
||||
<Files>
|
||||
@@ -51,9 +51,9 @@
|
||||
|
||||
<History>
|
||||
<Update release="3">
|
||||
<Date>2016-06-17</Date>
|
||||
<Date>2016-06-28</Date>
|
||||
<Version>5.1.0b</Version>
|
||||
<Comment>Version Bump</Comment>
|
||||
<Comment>Rebuild for new kernel</Comment>
|
||||
<Name>PisiLinux Community</Name>
|
||||
<Email>admin@pisilinux.org</Email>
|
||||
</Update>
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
<Description>module-ndiswrapper allows you to use Windows XP drivers for WLAN cards without proper Linux drivers.</Description>
|
||||
<Archive sha1sum="75fbbda677fe91ee07a6f6a8e19b1f3e2479540f" type="targz">http://download.sourceforge.net/ndiswrapper/ndiswrapper-1.59.tar.gz</Archive>
|
||||
<BuildDependencies>
|
||||
<Dependency version="4.4.8">kernel-module-headers</Dependency>
|
||||
<Dependency version="4.6.3">kernel-module-headers</Dependency>
|
||||
</BuildDependencies>
|
||||
<Patches>
|
||||
<Patch>support_kernel-4.0.patch</Patch>
|
||||
@@ -29,7 +29,7 @@
|
||||
<Package>
|
||||
<Name>ndiswrapper</Name>
|
||||
<RuntimeDependencies>
|
||||
<Dependency version="4.4.8">kernel</Dependency>
|
||||
<Dependency version="4.6.3">kernel</Dependency>
|
||||
</RuntimeDependencies>
|
||||
<Files>
|
||||
<Path fileType="library" permanent="true">/lib/modules</Path>
|
||||
@@ -46,9 +46,9 @@
|
||||
|
||||
<History>
|
||||
<Update release="2">
|
||||
<Date>2016-04-27</Date>
|
||||
<Date>2016-06-28</Date>
|
||||
<Version>1.59</Version>
|
||||
<Comment>Release Bump</Comment>
|
||||
<Comment>Release Bump, rebuild for new kernel.</Comment>
|
||||
<Name>PisiLinux Community</Name>
|
||||
<Email>admin@pisilinux.org</Email>
|
||||
</Update>
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -83,9 +83,9 @@ diff -Nurp linux-4.2.2/Makefile linux-4.2.2-3rd/Makefile
|
||||
net-y := net/
|
||||
libs-y := lib/
|
||||
core-y := usr/
|
||||
diff -Nurp linux-4.4.0/scripts/kconfig/Makefile linux-4.4.0-3rd/scripts/kconfig/Makefile
|
||||
--- linux-4.4.0/scripts/kconfig/Makefile
|
||||
+++ linux-4.4.0-3rd/scripts/kconfig/Makefile
|
||||
diff -Nurp linux-4.6/scripts/kconfig/Makefile linux-4.6-3rd/scripts/kconfig/Makefile
|
||||
--- linux-4.6/scripts/kconfig/Makefile
|
||||
+++ linux-4.6-3rd/scripts/kconfig/Makefile
|
||||
@@ -18,26 +18,26 @@ endif
|
||||
# We need this, in case the user has it in its environment
|
||||
unexport CONFIG_
|
||||
@@ -144,9 +144,9 @@ diff -Nurp linux-4.4.0/scripts/kconfig/Makefile linux-4.4.0-3rd/scripts/kconfig/
|
||||
+defconfig: $(obj)/conf 3rdparty/Makefile
|
||||
ifeq ($(KBUILD_DEFCONFIG),)
|
||||
$< $(silent) --defconfig $(Kconfig)
|
||||
else ifneq ($(wildcard $(srctree)/arch/$(SRCARCH)/configs/$(KBUILD_DEFCONFIG)),)
|
||||
@@ -104,26 +104,26 @@ else
|
||||
$(Q)$(MAKE) -f $(srctree)/Makefile $(KBUILD_DEFCONFIG)
|
||||
else
|
||||
@@ -106,26 +106,26 @@ else
|
||||
endif
|
||||
endif
|
||||
|
||||
-%_defconfig: $(obj)/conf
|
||||
@@ -173,11 +173,11 @@ diff -Nurp linux-4.4.0/scripts/kconfig/Makefile linux-4.4.0-3rd/scripts/kconfig/
|
||||
|
||||
PHONY += tinyconfig
|
||||
-tinyconfig:
|
||||
+tinyconfig: 3rdparty/Makefile
|
||||
+tinyconfig:
|
||||
$(Q)$(MAKE) -f $(srctree)/Makefile allnoconfig tiny.config
|
||||
|
||||
# Help text used by make help
|
||||
@@ -186,6 +186,9 @@ gconf-objs := gconf.o zconf.tab.o
|
||||
@@ -188,6 +188,9 @@ gconf-objs := gconf.o zconf.tab.o
|
||||
|
||||
hostprogs-y := conf nconf mconf kxgettext qconf gconf
|
||||
|
||||
|
||||
+128
-117
@@ -1,6 +1,6 @@
|
||||
diff -Nurp linux-3.12.2/3rdparty/ndiswrapper/crt.c linux-3.12.2-ndiswrapper-1.59/3rdparty/ndiswrapper/crt.c
|
||||
--- linux-3.12.2/3rdparty/ndiswrapper/crt.c 1970-01-01 02:00:00.000000000 +0200
|
||||
+++ linux-3.12.2-ndiswrapper-1.59/3rdparty/ndiswrapper/crt.c 2013-11-28 21:42:10.000000000 +0200
|
||||
diff -Nurp linux-4.6-rc6/3rdparty/ndiswrapper/crt.c linux-4.6-rc6-ndis/3rdparty/ndiswrapper/crt.c
|
||||
--- linux-4.6-rc6/3rdparty/ndiswrapper/crt.c 1970-01-01 02:00:00.000000000 +0200
|
||||
+++ linux-4.6-rc6-ndis/3rdparty/ndiswrapper/crt.c 2016-05-01 18:25:43.000000000 +0300
|
||||
@@ -0,0 +1,589 @@
|
||||
+/*
|
||||
+ * Copyright (C) 2003-2005 Pontus Fuchs, Giridhar Pemmasani
|
||||
@@ -471,7 +471,7 @@ diff -Nurp linux-3.12.2/3rdparty/ndiswrapper/crt.c linux-3.12.2-ndiswrapper-1.59
|
||||
+noregparm void WIN_FUNC(_win_srand,1)
|
||||
+ (UINT seed)
|
||||
+{
|
||||
+ net_srandom(seed);
|
||||
+ prandom_seed(seed);
|
||||
+}
|
||||
+
|
||||
+noregparm int WIN_FUNC(rand,0)
|
||||
@@ -591,9 +591,9 @@ diff -Nurp linux-3.12.2/3rdparty/ndiswrapper/crt.c linux-3.12.2-ndiswrapper-1.59
|
||||
+ printk(KERN_DEBUG "%s: %p: %s\n", ctx, from, buf);
|
||||
+ kfree(buf);
|
||||
+}
|
||||
diff -Nurp linux-3.12.2/3rdparty/ndiswrapper/divdi3.c linux-3.12.2-ndiswrapper-1.59/3rdparty/ndiswrapper/divdi3.c
|
||||
--- linux-3.12.2/3rdparty/ndiswrapper/divdi3.c 1970-01-01 02:00:00.000000000 +0200
|
||||
+++ linux-3.12.2-ndiswrapper-1.59/3rdparty/ndiswrapper/divdi3.c 2013-11-28 21:42:10.000000000 +0200
|
||||
diff -Nurp linux-4.6-rc6/3rdparty/ndiswrapper/divdi3.c linux-4.6-rc6-ndis/3rdparty/ndiswrapper/divdi3.c
|
||||
--- linux-4.6-rc6/3rdparty/ndiswrapper/divdi3.c 1970-01-01 02:00:00.000000000 +0200
|
||||
+++ linux-4.6-rc6-ndis/3rdparty/ndiswrapper/divdi3.c 2016-05-01 18:25:43.000000000 +0300
|
||||
@@ -0,0 +1,329 @@
|
||||
+/* 64-bit multiplication and division
|
||||
+ Copyright (C) 1989, 1992-1999, 2000, 2001, 2002, 2003
|
||||
@@ -924,9 +924,9 @@ diff -Nurp linux-3.12.2/3rdparty/ndiswrapper/divdi3.c linux-3.12.2-ndiswrapper-1
|
||||
+ __udivmoddi4 (u, v, &w);
|
||||
+ return w;
|
||||
+}
|
||||
diff -Nurp linux-3.12.2/3rdparty/ndiswrapper/hal.c linux-3.12.2-ndiswrapper-1.59/3rdparty/ndiswrapper/hal.c
|
||||
--- linux-3.12.2/3rdparty/ndiswrapper/hal.c 1970-01-01 02:00:00.000000000 +0200
|
||||
+++ linux-3.12.2-ndiswrapper-1.59/3rdparty/ndiswrapper/hal.c 2013-11-28 21:42:10.000000000 +0200
|
||||
diff -Nurp linux-4.6-rc6/3rdparty/ndiswrapper/hal.c linux-4.6-rc6-ndis/3rdparty/ndiswrapper/hal.c
|
||||
--- linux-4.6-rc6/3rdparty/ndiswrapper/hal.c 1970-01-01 02:00:00.000000000 +0200
|
||||
+++ linux-4.6-rc6-ndis/3rdparty/ndiswrapper/hal.c 2016-05-01 18:25:43.000000000 +0300
|
||||
@@ -0,0 +1,157 @@
|
||||
+/*
|
||||
+ * Copyright (C) 2003-2005 Pontus Fuchs, Giridhar Pemmasani
|
||||
@@ -1085,9 +1085,9 @@ diff -Nurp linux-3.12.2/3rdparty/ndiswrapper/hal.c linux-3.12.2-ndiswrapper-1.59
|
||||
+#endif
|
||||
+ nt_spin_unlock(lock);
|
||||
+}
|
||||
diff -Nurp linux-3.12.2/3rdparty/ndiswrapper/iw_ndis.c linux-3.12.2-ndiswrapper-1.59/3rdparty/ndiswrapper/iw_ndis.c
|
||||
--- linux-3.12.2/3rdparty/ndiswrapper/iw_ndis.c 1970-01-01 02:00:00.000000000 +0200
|
||||
+++ linux-3.12.2-ndiswrapper-1.59/3rdparty/ndiswrapper/iw_ndis.c 2013-11-28 21:42:10.000000000 +0200
|
||||
diff -Nurp linux-4.6-rc6/3rdparty/ndiswrapper/iw_ndis.c linux-4.6-rc6-ndis/3rdparty/ndiswrapper/iw_ndis.c
|
||||
--- linux-4.6-rc6/3rdparty/ndiswrapper/iw_ndis.c 1970-01-01 02:00:00.000000000 +0200
|
||||
+++ linux-4.6-rc6-ndis/3rdparty/ndiswrapper/iw_ndis.c 2016-05-01 18:25:43.000000000 +0300
|
||||
@@ -0,0 +1,2001 @@
|
||||
+ /*
|
||||
+ * Copyright (C) 2003-2005 Pontus Fuchs, Giridhar Pemmasani
|
||||
@@ -3090,9 +3090,9 @@ diff -Nurp linux-3.12.2/3rdparty/ndiswrapper/iw_ndis.c linux-3.12.2-ndiswrapper-
|
||||
+};
|
||||
+
|
||||
+#endif
|
||||
diff -Nurp linux-3.12.2/3rdparty/ndiswrapper/iw_ndis.h linux-3.12.2-ndiswrapper-1.59/3rdparty/ndiswrapper/iw_ndis.h
|
||||
--- linux-3.12.2/3rdparty/ndiswrapper/iw_ndis.h 1970-01-01 02:00:00.000000000 +0200
|
||||
+++ linux-3.12.2-ndiswrapper-1.59/3rdparty/ndiswrapper/iw_ndis.h 2013-11-28 21:42:10.000000000 +0200
|
||||
diff -Nurp linux-4.6-rc6/3rdparty/ndiswrapper/iw_ndis.h linux-4.6-rc6-ndis/3rdparty/ndiswrapper/iw_ndis.h
|
||||
--- linux-4.6-rc6/3rdparty/ndiswrapper/iw_ndis.h 1970-01-01 02:00:00.000000000 +0200
|
||||
+++ linux-4.6-rc6-ndis/3rdparty/ndiswrapper/iw_ndis.h 2016-05-01 18:25:43.000000000 +0300
|
||||
@@ -0,0 +1,194 @@
|
||||
+/*
|
||||
+ * Copyright (C) 2003-2005 Pontus Fuchs, Giridhar Pemmasani
|
||||
@@ -3288,9 +3288,9 @@ diff -Nurp linux-3.12.2/3rdparty/ndiswrapper/iw_ndis.h linux-3.12.2-ndiswrapper-
|
||||
+ KEY_MGMT_802_1X_NO_WPA, KEY_MGMT_WPA_NONE };
|
||||
+
|
||||
+#endif // IW_NDIS_H
|
||||
diff -Nurp linux-3.12.2/3rdparty/ndiswrapper/lin2win.h linux-3.12.2-ndiswrapper-1.59/3rdparty/ndiswrapper/lin2win.h
|
||||
--- linux-3.12.2/3rdparty/ndiswrapper/lin2win.h 1970-01-01 02:00:00.000000000 +0200
|
||||
+++ linux-3.12.2-ndiswrapper-1.59/3rdparty/ndiswrapper/lin2win.h 2013-11-28 21:42:10.000000000 +0200
|
||||
diff -Nurp linux-4.6-rc6/3rdparty/ndiswrapper/lin2win.h linux-4.6-rc6-ndis/3rdparty/ndiswrapper/lin2win.h
|
||||
--- linux-4.6-rc6/3rdparty/ndiswrapper/lin2win.h 1970-01-01 02:00:00.000000000 +0200
|
||||
+++ linux-4.6-rc6-ndis/3rdparty/ndiswrapper/lin2win.h 2016-05-01 18:25:43.000000000 +0300
|
||||
@@ -0,0 +1,111 @@
|
||||
+/*
|
||||
+ * Copyright (C) 2006 Giridhar Pemmasani
|
||||
@@ -3403,9 +3403,9 @@ diff -Nurp linux-3.12.2/3rdparty/ndiswrapper/lin2win.h linux-3.12.2-ndiswrapper-
|
||||
+})
|
||||
+
|
||||
+#endif // CONFIG_X86_64
|
||||
diff -Nurp linux-3.12.2/3rdparty/ndiswrapper/lin2win.S linux-3.12.2-ndiswrapper-1.59/3rdparty/ndiswrapper/lin2win.S
|
||||
--- linux-3.12.2/3rdparty/ndiswrapper/lin2win.S 1970-01-01 02:00:00.000000000 +0200
|
||||
+++ linux-3.12.2-ndiswrapper-1.59/3rdparty/ndiswrapper/lin2win.S 2013-11-28 21:42:10.000000000 +0200
|
||||
diff -Nurp linux-4.6-rc6/3rdparty/ndiswrapper/lin2win.S linux-4.6-rc6-ndis/3rdparty/ndiswrapper/lin2win.S
|
||||
--- linux-4.6-rc6/3rdparty/ndiswrapper/lin2win.S 1970-01-01 02:00:00.000000000 +0200
|
||||
+++ linux-4.6-rc6-ndis/3rdparty/ndiswrapper/lin2win.S 2016-05-01 18:25:43.000000000 +0300
|
||||
@@ -0,0 +1,138 @@
|
||||
+/*
|
||||
+ * Copyright (C) 2011 Pavel Roskin
|
||||
@@ -3545,9 +3545,9 @@ diff -Nurp linux-3.12.2/3rdparty/ndiswrapper/lin2win.S linux-3.12.2-ndiswrapper-
|
||||
+lin2win lin2win4, 4
|
||||
+lin2win lin2win5, 5
|
||||
+lin2win lin2win6, 6
|
||||
diff -Nurp linux-3.12.2/3rdparty/ndiswrapper/loader.c linux-3.12.2-ndiswrapper-1.59/3rdparty/ndiswrapper/loader.c
|
||||
--- linux-3.12.2/3rdparty/ndiswrapper/loader.c 1970-01-01 02:00:00.000000000 +0200
|
||||
+++ linux-3.12.2-ndiswrapper-1.59/3rdparty/ndiswrapper/loader.c 2013-11-28 21:42:10.000000000 +0200
|
||||
diff -Nurp linux-4.6-rc6/3rdparty/ndiswrapper/loader.c linux-4.6-rc6-ndis/3rdparty/ndiswrapper/loader.c
|
||||
--- linux-4.6-rc6/3rdparty/ndiswrapper/loader.c 1970-01-01 02:00:00.000000000 +0200
|
||||
+++ linux-4.6-rc6-ndis/3rdparty/ndiswrapper/loader.c 2016-05-01 18:25:43.000000000 +0300
|
||||
@@ -0,0 +1,967 @@
|
||||
+/*
|
||||
+ * Copyright (C) 2003-2005 Pontus Fuchs, Giridhar Pemmasani
|
||||
@@ -4516,10 +4516,10 @@ diff -Nurp linux-3.12.2/3rdparty/ndiswrapper/loader.c linux-3.12.2-ndiswrapper-1
|
||||
+ mutex_unlock(&loader_mutex);
|
||||
+ EXIT1(return);
|
||||
+}
|
||||
diff -Nurp linux-3.12.2/3rdparty/ndiswrapper/loader.h linux-3.12.2-ndiswrapper-1.59/3rdparty/ndiswrapper/loader.h
|
||||
--- linux-3.12.2/3rdparty/ndiswrapper/loader.h 1970-01-01 02:00:00.000000000 +0200
|
||||
+++ linux-3.12.2-ndiswrapper-1.59/3rdparty/ndiswrapper/loader.h 2013-11-28 21:42:10.000000000 +0200
|
||||
@@ -0,0 +1,108 @@
|
||||
diff -Nurp linux-4.6-rc6/3rdparty/ndiswrapper/loader.h linux-4.6-rc6-ndis/3rdparty/ndiswrapper/loader.h
|
||||
--- linux-4.6-rc6/3rdparty/ndiswrapper/loader.h 1970-01-01 02:00:00.000000000 +0200
|
||||
+++ linux-4.6-rc6-ndis/3rdparty/ndiswrapper/loader.h 2016-05-01 18:25:43.000000000 +0300
|
||||
@@ -0,0 +1,112 @@
|
||||
+/*
|
||||
+ * Copyright (C) 2003-2005 Pontus Fuchs, Giridhar Pemmasani
|
||||
+ *
|
||||
@@ -4538,6 +4538,10 @@ diff -Nurp linux-3.12.2/3rdparty/ndiswrapper/loader.h linux-3.12.2-ndiswrapper-1
|
||||
+#ifndef _LOADER_H_
|
||||
+#define _LOADER_H_
|
||||
+
|
||||
+#if LINUX_VERSION_CODE > KERNEL_VERSION(4,0,0)
|
||||
+#include <linux/vmalloc.h>
|
||||
+#endif
|
||||
+
|
||||
+#include "ndiswrapper.h"
|
||||
+
|
||||
+#ifndef __KERNEL__
|
||||
@@ -4628,9 +4632,9 @@ diff -Nurp linux-3.12.2/3rdparty/ndiswrapper/loader.h linux-3.12.2-ndiswrapper-1
|
||||
+#endif
|
||||
+
|
||||
+#endif /* LOADER_H */
|
||||
diff -Nurp linux-3.12.2/3rdparty/ndiswrapper/longlong.h linux-3.12.2-ndiswrapper-1.59/3rdparty/ndiswrapper/longlong.h
|
||||
--- linux-3.12.2/3rdparty/ndiswrapper/longlong.h 1970-01-01 02:00:00.000000000 +0200
|
||||
+++ linux-3.12.2-ndiswrapper-1.59/3rdparty/ndiswrapper/longlong.h 2013-11-28 21:42:10.000000000 +0200
|
||||
diff -Nurp linux-4.6-rc6/3rdparty/ndiswrapper/longlong.h linux-4.6-rc6-ndis/3rdparty/ndiswrapper/longlong.h
|
||||
--- linux-4.6-rc6/3rdparty/ndiswrapper/longlong.h 1970-01-01 02:00:00.000000000 +0200
|
||||
+++ linux-4.6-rc6-ndis/3rdparty/ndiswrapper/longlong.h 2016-05-01 18:25:43.000000000 +0300
|
||||
@@ -0,0 +1,1333 @@
|
||||
+/* longlong.h -- definitions for mixed size 32/64 bit arithmetic.
|
||||
+ Copyright (C) 1991, 1992, 1994, 1995, 1996, 1997, 1998, 1999, 2000
|
||||
@@ -5965,9 +5969,9 @@ diff -Nurp linux-3.12.2/3rdparty/ndiswrapper/longlong.h linux-3.12.2-ndiswrapper
|
||||
+#ifndef UDIV_NEEDS_NORMALIZATION
|
||||
+#define UDIV_NEEDS_NORMALIZATION 0
|
||||
+#endif
|
||||
diff -Nurp linux-3.12.2/3rdparty/ndiswrapper/Makefile linux-3.12.2-ndiswrapper-1.59/3rdparty/ndiswrapper/Makefile
|
||||
--- linux-3.12.2/3rdparty/ndiswrapper/Makefile 1970-01-01 02:00:00.000000000 +0200
|
||||
+++ linux-3.12.2-ndiswrapper-1.59/3rdparty/ndiswrapper/Makefile 2013-11-28 21:42:10.000000000 +0200
|
||||
diff -Nurp linux-4.6-rc6/3rdparty/ndiswrapper/Makefile linux-4.6-rc6-ndis/3rdparty/ndiswrapper/Makefile
|
||||
--- linux-4.6-rc6/3rdparty/ndiswrapper/Makefile 1970-01-01 02:00:00.000000000 +0200
|
||||
+++ linux-4.6-rc6-ndis/3rdparty/ndiswrapper/Makefile 2016-05-01 18:25:43.000000000 +0300
|
||||
@@ -0,0 +1,213 @@
|
||||
+# Name of the module
|
||||
+MODNAME = ndiswrapper
|
||||
@@ -6182,9 +6186,9 @@ diff -Nurp linux-3.12.2/3rdparty/ndiswrapper/Makefile linux-3.12.2-ndiswrapper-1
|
||||
+ done
|
||||
+
|
||||
+.PHONY: all modules clean install config_check dist
|
||||
diff -Nurp linux-3.12.2/3rdparty/ndiswrapper/mkexport.sh linux-3.12.2-ndiswrapper-1.59/3rdparty/ndiswrapper/mkexport.sh
|
||||
--- linux-3.12.2/3rdparty/ndiswrapper/mkexport.sh 1970-01-01 02:00:00.000000000 +0200
|
||||
+++ linux-3.12.2-ndiswrapper-1.59/3rdparty/ndiswrapper/mkexport.sh 2013-11-28 21:42:11.000000000 +0200
|
||||
diff -Nurp linux-4.6-rc6/3rdparty/ndiswrapper/mkexport.sh linux-4.6-rc6-ndis/3rdparty/ndiswrapper/mkexport.sh
|
||||
--- linux-4.6-rc6/3rdparty/ndiswrapper/mkexport.sh 1970-01-01 02:00:00.000000000 +0200
|
||||
+++ linux-4.6-rc6-ndis/3rdparty/ndiswrapper/mkexport.sh 2016-05-01 18:25:43.000000000 +0300
|
||||
@@ -0,0 +1,42 @@
|
||||
+#! /bin/sh
|
||||
+
|
||||
@@ -6228,9 +6232,9 @@ diff -Nurp linux-3.12.2/3rdparty/ndiswrapper/mkexport.sh linux-3.12.2-ndiswrappe
|
||||
+
|
||||
+echo " {NULL, NULL}"
|
||||
+echo "};"
|
||||
diff -Nurp linux-3.12.2/3rdparty/ndiswrapper/mkstubs.sh linux-3.12.2-ndiswrapper-1.59/3rdparty/ndiswrapper/mkstubs.sh
|
||||
--- linux-3.12.2/3rdparty/ndiswrapper/mkstubs.sh 1970-01-01 02:00:00.000000000 +0200
|
||||
+++ linux-3.12.2-ndiswrapper-1.59/3rdparty/ndiswrapper/mkstubs.sh 2013-11-28 21:42:11.000000000 +0200
|
||||
diff -Nurp linux-4.6-rc6/3rdparty/ndiswrapper/mkstubs.sh linux-4.6-rc6-ndis/3rdparty/ndiswrapper/mkstubs.sh
|
||||
--- linux-4.6-rc6/3rdparty/ndiswrapper/mkstubs.sh 1970-01-01 02:00:00.000000000 +0200
|
||||
+++ linux-4.6-rc6-ndis/3rdparty/ndiswrapper/mkstubs.sh 2016-05-01 18:25:43.000000000 +0300
|
||||
@@ -0,0 +1,12 @@
|
||||
+#! /bin/sh
|
||||
+
|
||||
@@ -6244,9 +6248,9 @@ diff -Nurp linux-3.12.2/3rdparty/ndiswrapper/mkstubs.sh linux-3.12.2-ndiswrapper
|
||||
+ win2lin(\1, \2)/p' \
|
||||
+ $file | sed -e 's/[ \t ]\+//' | sort -u; \
|
||||
+done
|
||||
diff -Nurp linux-3.12.2/3rdparty/ndiswrapper/ndis.c linux-3.12.2-ndiswrapper-1.59/3rdparty/ndiswrapper/ndis.c
|
||||
--- linux-3.12.2/3rdparty/ndiswrapper/ndis.c 1970-01-01 02:00:00.000000000 +0200
|
||||
+++ linux-3.12.2-ndiswrapper-1.59/3rdparty/ndiswrapper/ndis.c 2013-11-28 21:42:11.000000000 +0200
|
||||
diff -Nurp linux-4.6-rc6/3rdparty/ndiswrapper/ndis.c linux-4.6-rc6-ndis/3rdparty/ndiswrapper/ndis.c
|
||||
--- linux-4.6-rc6/3rdparty/ndiswrapper/ndis.c 1970-01-01 02:00:00.000000000 +0200
|
||||
+++ linux-4.6-rc6-ndis/3rdparty/ndiswrapper/ndis.c 2016-05-01 18:25:43.000000000 +0300
|
||||
@@ -0,0 +1,3025 @@
|
||||
+/*
|
||||
+ * Copyright (C) 2003-2005 Pontus Fuchs, Giridhar Pemmasani
|
||||
@@ -6688,7 +6692,7 @@ diff -Nurp linux-3.12.2/3rdparty/ndiswrapper/ndis.c linux-3.12.2-ndiswrapper-1.5
|
||||
+ struct wrap_device_setting *setting;
|
||||
+ mutex_lock(&loader_mutex);
|
||||
+ nt_list_for_each_entry(setting, setting_list, list) {
|
||||
+ if (strnicmp(keyname, setting->name, length) == 0) {
|
||||
+ if (strncasecmp(keyname, setting->name, length) == 0) {
|
||||
+ TRACE2("setting %s='%s'", keyname, setting->value);
|
||||
+ mutex_unlock(&loader_mutex);
|
||||
+ *param = ndis_encode_setting(setting, type);
|
||||
@@ -6752,7 +6756,7 @@ diff -Nurp linux-3.12.2/3rdparty/ndiswrapper/ndis.c linux-3.12.2-ndiswrapper-1.5
|
||||
+
|
||||
+ mutex_lock(&loader_mutex);
|
||||
+ nt_list_for_each_entry(setting, &nmb->wnd->wd->settings, list) {
|
||||
+ if (strnicmp(keyname, setting->name, ansi.length) == 0) {
|
||||
+ if (strncasecmp(keyname, setting->name, ansi.length) == 0) {
|
||||
+ mutex_unlock(&loader_mutex);
|
||||
+ if (ndis_decode_setting(setting, param))
|
||||
+ *status = NDIS_STATUS_FAILURE;
|
||||
@@ -9273,9 +9277,9 @@ diff -Nurp linux-3.12.2/3rdparty/ndiswrapper/ndis.c linux-3.12.2-ndiswrapper-1.5
|
||||
+ destroy_workqueue(ndis_wq);
|
||||
+ EXIT1(return);
|
||||
+}
|
||||
diff -Nurp linux-3.12.2/3rdparty/ndiswrapper/ndis.h linux-3.12.2-ndiswrapper-1.59/3rdparty/ndiswrapper/ndis.h
|
||||
--- linux-3.12.2/3rdparty/ndiswrapper/ndis.h 1970-01-01 02:00:00.000000000 +0200
|
||||
+++ linux-3.12.2-ndiswrapper-1.59/3rdparty/ndiswrapper/ndis.h 2013-11-28 21:42:11.000000000 +0200
|
||||
diff -Nurp linux-4.6-rc6/3rdparty/ndiswrapper/ndis.h linux-4.6-rc6-ndis/3rdparty/ndiswrapper/ndis.h
|
||||
--- linux-4.6-rc6/3rdparty/ndiswrapper/ndis.h 1970-01-01 02:00:00.000000000 +0200
|
||||
+++ linux-4.6-rc6-ndis/3rdparty/ndiswrapper/ndis.h 2016-05-01 18:25:43.000000000 +0300
|
||||
@@ -0,0 +1,1309 @@
|
||||
+/*
|
||||
+ * Copyright (C) 2003-2005 Pontus Fuchs, Giridhar Pemmasani
|
||||
@@ -10586,9 +10590,9 @@ diff -Nurp linux-3.12.2/3rdparty/ndiswrapper/ndis.h linux-3.12.2-ndiswrapper-1.5
|
||||
+}
|
||||
+
|
||||
+#endif /* NDIS_H */
|
||||
diff -Nurp linux-3.12.2/3rdparty/ndiswrapper/ndiswrapper.h linux-3.12.2-ndiswrapper-1.59/3rdparty/ndiswrapper/ndiswrapper.h
|
||||
--- linux-3.12.2/3rdparty/ndiswrapper/ndiswrapper.h 1970-01-01 02:00:00.000000000 +0200
|
||||
+++ linux-3.12.2-ndiswrapper-1.59/3rdparty/ndiswrapper/ndiswrapper.h 2013-11-28 21:42:11.000000000 +0200
|
||||
diff -Nurp linux-4.6-rc6/3rdparty/ndiswrapper/ndiswrapper.h linux-4.6-rc6-ndis/3rdparty/ndiswrapper/ndiswrapper.h
|
||||
--- linux-4.6-rc6/3rdparty/ndiswrapper/ndiswrapper.h 1970-01-01 02:00:00.000000000 +0200
|
||||
+++ linux-4.6-rc6-ndis/3rdparty/ndiswrapper/ndiswrapper.h 2016-05-01 18:25:43.000000000 +0300
|
||||
@@ -0,0 +1,219 @@
|
||||
+/*
|
||||
+ * Copyright (C) 2003-2005 Pontus Fuchs, Giridhar Pemmasani
|
||||
@@ -10608,7 +10612,7 @@ diff -Nurp linux-3.12.2/3rdparty/ndiswrapper/ndiswrapper.h linux-3.12.2-ndiswrap
|
||||
+#ifndef _NDISWRAPPER_H_
|
||||
+#define _NDISWRAPPER_H_
|
||||
+
|
||||
+#define DRIVER_VERSION "1.59"
|
||||
+#define DRIVER_VERSION "1.60"
|
||||
+#define UTILS_VERSION "1.9"
|
||||
+
|
||||
+#define DRIVER_NAME "ndiswrapper"
|
||||
@@ -10809,9 +10813,9 @@ diff -Nurp linux-3.12.2/3rdparty/ndiswrapper/ndiswrapper.h linux-3.12.2-ndiswrap
|
||||
+#endif // __KERNEL__
|
||||
+
|
||||
+#endif // NDISWRAPPER_H
|
||||
diff -Nurp linux-3.12.2/3rdparty/ndiswrapper/ntoskernel.c linux-3.12.2-ndiswrapper-1.59/3rdparty/ndiswrapper/ntoskernel.c
|
||||
--- linux-3.12.2/3rdparty/ndiswrapper/ntoskernel.c 1970-01-01 02:00:00.000000000 +0200
|
||||
+++ linux-3.12.2-ndiswrapper-1.59/3rdparty/ndiswrapper/ntoskernel.c 2013-11-28 21:42:11.000000000 +0200
|
||||
diff -Nurp linux-4.6-rc6/3rdparty/ndiswrapper/ntoskernel.c linux-4.6-rc6-ndis/3rdparty/ndiswrapper/ntoskernel.c
|
||||
--- linux-4.6-rc6/3rdparty/ndiswrapper/ntoskernel.c 1970-01-01 02:00:00.000000000 +0200
|
||||
+++ linux-4.6-rc6-ndis/3rdparty/ndiswrapper/ntoskernel.c 2016-05-01 18:25:43.000000000 +0300
|
||||
@@ -0,0 +1,2677 @@
|
||||
+/*
|
||||
+ * Copyright (C) 2003-2005 Pontus Fuchs, Giridhar Pemmasani
|
||||
@@ -13490,10 +13494,10 @@ diff -Nurp linux-3.12.2/3rdparty/ndiswrapper/ntoskernel.c linux-3.12.2-ndiswrapp
|
||||
+
|
||||
+ EXIT2(return);
|
||||
+}
|
||||
diff -Nurp linux-3.12.2/3rdparty/ndiswrapper/ntoskernel.h linux-3.12.2-ndiswrapper-1.59/3rdparty/ndiswrapper/ntoskernel.h
|
||||
--- linux-3.12.2/3rdparty/ndiswrapper/ntoskernel.h 1970-01-01 02:00:00.000000000 +0200
|
||||
+++ linux-3.12.2-ndiswrapper-1.59/3rdparty/ndiswrapper/ntoskernel.h 2013-11-28 21:42:11.000000000 +0200
|
||||
@@ -0,0 +1,1083 @@
|
||||
diff -Nurp linux-4.6-rc6/3rdparty/ndiswrapper/ntoskernel.h linux-4.6-rc6-ndis/3rdparty/ndiswrapper/ntoskernel.h
|
||||
--- linux-4.6-rc6/3rdparty/ndiswrapper/ntoskernel.h 1970-01-01 02:00:00.000000000 +0200
|
||||
+++ linux-4.6-rc6-ndis/3rdparty/ndiswrapper/ntoskernel.h 2016-05-01 18:25:43.000000000 +0300
|
||||
@@ -0,0 +1,1090 @@
|
||||
+/*
|
||||
+ * Copyright (C) 2003-2005 Pontus Fuchs, Giridhar Pemmasani
|
||||
+ *
|
||||
@@ -13843,13 +13847,21 @@ diff -Nurp linux-3.12.2/3rdparty/ndiswrapper/ntoskernel.h linux-3.12.2-ndiswrapp
|
||||
+#define netdev_notifier_info_to_dev(x) ((struct net_device *)(x))
|
||||
+#endif
|
||||
+
|
||||
+#ifdef INIT_COMPLETION
|
||||
+#if LINUX_VERSION_CODE < KERNEL_VERSION(3,13,0)
|
||||
+static inline void reinit_completion(struct completion *x)
|
||||
+{
|
||||
+ INIT_COMPLETION(*x);
|
||||
+}
|
||||
+#endif
|
||||
+
|
||||
+#if LINUX_VERSION_CODE < KERNEL_VERSION(3,8,0)
|
||||
+#define prandom_seed(seed) net_srandom(seed)
|
||||
+#endif
|
||||
+
|
||||
+#if LINUX_VERSION_CODE < KERNEL_VERSION(4,0,0)
|
||||
+#define strncasecmp strnicmp
|
||||
+#endif
|
||||
+
|
||||
+/* TICK is 100ns */
|
||||
+#define TICKSPERSEC 10000000
|
||||
+#define TICKSPERMSEC 10000
|
||||
@@ -14293,9 +14305,8 @@ diff -Nurp linux-3.12.2/3rdparty/ndiswrapper/ntoskernel.h linux-3.12.2-ndiswrapp
|
||||
+#define nt_spin_unlock_irqrestore(lock, flags) \
|
||||
+do { \
|
||||
+ nt_spin_unlock(lock); \
|
||||
+ preempt_enable_no_resched(); \
|
||||
+ preempt_enable(); \
|
||||
+ local_irq_restore(flags); \
|
||||
+ preempt_check_resched(); \
|
||||
+} while (0)
|
||||
+
|
||||
+static inline ULONG SPAN_PAGES(void *ptr, SIZE_T length)
|
||||
@@ -14577,9 +14588,9 @@ diff -Nurp linux-3.12.2/3rdparty/ndiswrapper/ntoskernel.h linux-3.12.2-ndiswrapp
|
||||
+#endif
|
||||
+
|
||||
+#endif // _NTOSKERNEL_H_
|
||||
diff -Nurp linux-3.12.2/3rdparty/ndiswrapper/ntoskernel_io.c linux-3.12.2-ndiswrapper-1.59/3rdparty/ndiswrapper/ntoskernel_io.c
|
||||
--- linux-3.12.2/3rdparty/ndiswrapper/ntoskernel_io.c 1970-01-01 02:00:00.000000000 +0200
|
||||
+++ linux-3.12.2-ndiswrapper-1.59/3rdparty/ndiswrapper/ntoskernel_io.c 2013-11-28 21:42:11.000000000 +0200
|
||||
diff -Nurp linux-4.6-rc6/3rdparty/ndiswrapper/ntoskernel_io.c linux-4.6-rc6-ndis/3rdparty/ndiswrapper/ntoskernel_io.c
|
||||
--- linux-4.6-rc6/3rdparty/ndiswrapper/ntoskernel_io.c 1970-01-01 02:00:00.000000000 +0200
|
||||
+++ linux-4.6-rc6-ndis/3rdparty/ndiswrapper/ntoskernel_io.c 2016-05-01 18:25:43.000000000 +0300
|
||||
@@ -0,0 +1,1161 @@
|
||||
+/*
|
||||
+ * Copyright (C) 2003-2005 Pontus Fuchs, Giridhar Pemmasani
|
||||
@@ -15742,9 +15753,9 @@ diff -Nurp linux-3.12.2/3rdparty/ndiswrapper/ntoskernel_io.c linux-3.12.2-ndiswr
|
||||
+ IOTRACE("LowLimit: 0x%lx, HighLimit: 0x%lx", *LowLimit, *HighLimit);
|
||||
+ IOEXIT(return);
|
||||
+}
|
||||
diff -Nurp linux-3.12.2/3rdparty/ndiswrapper/pe_linker.c linux-3.12.2-ndiswrapper-1.59/3rdparty/ndiswrapper/pe_linker.c
|
||||
--- linux-3.12.2/3rdparty/ndiswrapper/pe_linker.c 1970-01-01 02:00:00.000000000 +0200
|
||||
+++ linux-3.12.2-ndiswrapper-1.59/3rdparty/ndiswrapper/pe_linker.c 2013-11-28 21:42:11.000000000 +0200
|
||||
diff -Nurp linux-4.6-rc6/3rdparty/ndiswrapper/pe_linker.c linux-4.6-rc6-ndis/3rdparty/ndiswrapper/pe_linker.c
|
||||
--- linux-4.6-rc6/3rdparty/ndiswrapper/pe_linker.c 1970-01-01 02:00:00.000000000 +0200
|
||||
+++ linux-4.6-rc6-ndis/3rdparty/ndiswrapper/pe_linker.c 2016-05-01 18:25:43.000000000 +0300
|
||||
@@ -0,0 +1,600 @@
|
||||
+/*
|
||||
+ * Copyright (C) 2003-2005 Pontus Fuchs, Giridhar Pemmasani
|
||||
@@ -16346,9 +16357,9 @@ diff -Nurp linux-3.12.2/3rdparty/ndiswrapper/pe_linker.c linux-3.12.2-ndiswrappe
|
||||
+ }
|
||||
+ return 0;
|
||||
+}
|
||||
diff -Nurp linux-3.12.2/3rdparty/ndiswrapper/pe_linker.h linux-3.12.2-ndiswrapper-1.59/3rdparty/ndiswrapper/pe_linker.h
|
||||
--- linux-3.12.2/3rdparty/ndiswrapper/pe_linker.h 1970-01-01 02:00:00.000000000 +0200
|
||||
+++ linux-3.12.2-ndiswrapper-1.59/3rdparty/ndiswrapper/pe_linker.h 2013-11-28 21:42:11.000000000 +0200
|
||||
diff -Nurp linux-4.6-rc6/3rdparty/ndiswrapper/pe_linker.h linux-4.6-rc6-ndis/3rdparty/ndiswrapper/pe_linker.h
|
||||
--- linux-4.6-rc6/3rdparty/ndiswrapper/pe_linker.h 1970-01-01 02:00:00.000000000 +0200
|
||||
+++ linux-4.6-rc6-ndis/3rdparty/ndiswrapper/pe_linker.h 2016-05-01 18:25:43.000000000 +0300
|
||||
@@ -0,0 +1,992 @@
|
||||
+/*
|
||||
+ * This file is an excerpt of winnt.h from WINE, which bears the
|
||||
@@ -17342,9 +17353,9 @@ diff -Nurp linux-3.12.2/3rdparty/ndiswrapper/pe_linker.h linux-3.12.2-ndiswrappe
|
||||
+ WORD Length;
|
||||
+ CHAR NameString[ 1 ];
|
||||
+} IMAGE_RESOURCE_DIRECTORY_STRING,*PIMAGE_RESOURCE_DIRECTORY_STRING;
|
||||
diff -Nurp linux-3.12.2/3rdparty/ndiswrapper/pnp.c linux-3.12.2-ndiswrapper-1.59/3rdparty/ndiswrapper/pnp.c
|
||||
--- linux-3.12.2/3rdparty/ndiswrapper/pnp.c 1970-01-01 02:00:00.000000000 +0200
|
||||
+++ linux-3.12.2-ndiswrapper-1.59/3rdparty/ndiswrapper/pnp.c 2013-11-28 21:42:11.000000000 +0200
|
||||
diff -Nurp linux-4.6-rc6/3rdparty/ndiswrapper/pnp.c linux-4.6-rc6-ndis/3rdparty/ndiswrapper/pnp.c
|
||||
--- linux-4.6-rc6/3rdparty/ndiswrapper/pnp.c 1970-01-01 02:00:00.000000000 +0200
|
||||
+++ linux-4.6-rc6-ndis/3rdparty/ndiswrapper/pnp.c 2016-05-01 18:25:43.000000000 +0300
|
||||
@@ -0,0 +1,697 @@
|
||||
+/*
|
||||
+ * Copyright (C) 2005 Giridhar Pemmasani
|
||||
@@ -18043,9 +18054,9 @@ diff -Nurp linux-3.12.2/3rdparty/ndiswrapper/pnp.c linux-3.12.2-ndiswrapper-1.59
|
||||
+}
|
||||
+
|
||||
+#endif // USB
|
||||
diff -Nurp linux-3.12.2/3rdparty/ndiswrapper/pnp.h linux-3.12.2-ndiswrapper-1.59/3rdparty/ndiswrapper/pnp.h
|
||||
--- linux-3.12.2/3rdparty/ndiswrapper/pnp.h 1970-01-01 02:00:00.000000000 +0200
|
||||
+++ linux-3.12.2-ndiswrapper-1.59/3rdparty/ndiswrapper/pnp.h 2013-11-28 21:42:11.000000000 +0200
|
||||
diff -Nurp linux-4.6-rc6/3rdparty/ndiswrapper/pnp.h linux-4.6-rc6-ndis/3rdparty/ndiswrapper/pnp.h
|
||||
--- linux-4.6-rc6/3rdparty/ndiswrapper/pnp.h 1970-01-01 02:00:00.000000000 +0200
|
||||
+++ linux-4.6-rc6-ndis/3rdparty/ndiswrapper/pnp.h 2016-05-01 18:25:43.000000000 +0300
|
||||
@@ -0,0 +1,36 @@
|
||||
+/*
|
||||
+ * Copyright (C) 2005 Giridhar Pemmasani
|
||||
@@ -18083,9 +18094,9 @@ diff -Nurp linux-3.12.2/3rdparty/ndiswrapper/pnp.h linux-3.12.2-ndiswrapper-1.59
|
||||
+int wrap_pnp_resume_usb_device(struct usb_interface *intf);
|
||||
+
|
||||
+#endif
|
||||
diff -Nurp linux-3.12.2/3rdparty/ndiswrapper/proc.c linux-3.12.2-ndiswrapper-1.59/3rdparty/ndiswrapper/proc.c
|
||||
--- linux-3.12.2/3rdparty/ndiswrapper/proc.c 1970-01-01 02:00:00.000000000 +0200
|
||||
+++ linux-3.12.2-ndiswrapper-1.59/3rdparty/ndiswrapper/proc.c 2013-11-28 21:42:11.000000000 +0200
|
||||
diff -Nurp linux-4.6-rc6/3rdparty/ndiswrapper/proc.c linux-4.6-rc6-ndis/3rdparty/ndiswrapper/proc.c
|
||||
--- linux-4.6-rc6/3rdparty/ndiswrapper/proc.c 1970-01-01 02:00:00.000000000 +0200
|
||||
+++ linux-4.6-rc6-ndis/3rdparty/ndiswrapper/proc.c 2016-05-01 18:25:43.000000000 +0300
|
||||
@@ -0,0 +1,588 @@
|
||||
+/*
|
||||
+ * Copyright (C) 2003-2005 Pontus Fuchs, Giridhar Pemmasani
|
||||
@@ -18675,9 +18686,9 @@ diff -Nurp linux-3.12.2/3rdparty/ndiswrapper/proc.c linux-3.12.2-ndiswrapper-1.5
|
||||
+ remove_proc_entry("debug", wrap_procfs_entry);
|
||||
+ proc_remove(wrap_procfs_entry);
|
||||
+}
|
||||
diff -Nurp linux-3.12.2/3rdparty/ndiswrapper/rtl.c linux-3.12.2-ndiswrapper-1.59/3rdparty/ndiswrapper/rtl.c
|
||||
--- linux-3.12.2/3rdparty/ndiswrapper/rtl.c 1970-01-01 02:00:00.000000000 +0200
|
||||
+++ linux-3.12.2-ndiswrapper-1.59/3rdparty/ndiswrapper/rtl.c 2013-11-28 21:42:11.000000000 +0200
|
||||
diff -Nurp linux-4.6-rc6/3rdparty/ndiswrapper/rtl.c linux-4.6-rc6-ndis/3rdparty/ndiswrapper/rtl.c
|
||||
--- linux-4.6-rc6/3rdparty/ndiswrapper/rtl.c 1970-01-01 02:00:00.000000000 +0200
|
||||
+++ linux-4.6-rc6-ndis/3rdparty/ndiswrapper/rtl.c 2016-05-01 18:25:43.000000000 +0300
|
||||
@@ -0,0 +1,715 @@
|
||||
+/*
|
||||
+ * Copyright (C) 2003-2005 Pontus Fuchs, Giridhar Pemmasani
|
||||
@@ -19394,9 +19405,9 @@ diff -Nurp linux-3.12.2/3rdparty/ndiswrapper/rtl.c linux-3.12.2-ndiswrapper-1.59
|
||||
+ TRACE1("version: %d", version);
|
||||
+ return TRUE;
|
||||
+}
|
||||
diff -Nurp linux-3.12.2/3rdparty/ndiswrapper/usb.c linux-3.12.2-ndiswrapper-1.59/3rdparty/ndiswrapper/usb.c
|
||||
--- linux-3.12.2/3rdparty/ndiswrapper/usb.c 1970-01-01 02:00:00.000000000 +0200
|
||||
+++ linux-3.12.2-ndiswrapper-1.59/3rdparty/ndiswrapper/usb.c 2013-11-28 21:42:11.000000000 +0200
|
||||
diff -Nurp linux-4.6-rc6/3rdparty/ndiswrapper/usb.c linux-4.6-rc6-ndis/3rdparty/ndiswrapper/usb.c
|
||||
--- linux-4.6-rc6/3rdparty/ndiswrapper/usb.c 1970-01-01 02:00:00.000000000 +0200
|
||||
+++ linux-4.6-rc6-ndis/3rdparty/ndiswrapper/usb.c 2016-05-01 18:25:43.000000000 +0300
|
||||
@@ -0,0 +1,1496 @@
|
||||
+/*
|
||||
+ * Copyright (C) 2004 Jan Kiszka
|
||||
@@ -20894,9 +20905,9 @@ diff -Nurp linux-3.12.2/3rdparty/ndiswrapper/usb.c linux-3.12.2-ndiswrapper-1.59
|
||||
+ kill_all_urbs(wd, 0);
|
||||
+ USBEXIT(return);
|
||||
+}
|
||||
diff -Nurp linux-3.12.2/3rdparty/ndiswrapper/usb.h linux-3.12.2-ndiswrapper-1.59/3rdparty/ndiswrapper/usb.h
|
||||
--- linux-3.12.2/3rdparty/ndiswrapper/usb.h 1970-01-01 02:00:00.000000000 +0200
|
||||
+++ linux-3.12.2-ndiswrapper-1.59/3rdparty/ndiswrapper/usb.h 2013-11-28 21:42:11.000000000 +0200
|
||||
diff -Nurp linux-4.6-rc6/3rdparty/ndiswrapper/usb.h linux-4.6-rc6-ndis/3rdparty/ndiswrapper/usb.h
|
||||
--- linux-4.6-rc6/3rdparty/ndiswrapper/usb.h 1970-01-01 02:00:00.000000000 +0200
|
||||
+++ linux-4.6-rc6-ndis/3rdparty/ndiswrapper/usb.h 2016-05-01 18:25:43.000000000 +0300
|
||||
@@ -0,0 +1,360 @@
|
||||
+/*
|
||||
+ * Copyright (C) 2004 Jan Kiszka
|
||||
@@ -21258,9 +21269,9 @@ diff -Nurp linux-3.12.2/3rdparty/ndiswrapper/usb.h linux-3.12.2-ndiswrapper-1.59
|
||||
+ struct io_stack_location *irp_sl);
|
||||
+
|
||||
+#endif /* USB_H */
|
||||
diff -Nurp linux-3.12.2/3rdparty/ndiswrapper/win2lin_stubs.S linux-3.12.2-ndiswrapper-1.59/3rdparty/ndiswrapper/win2lin_stubs.S
|
||||
--- linux-3.12.2/3rdparty/ndiswrapper/win2lin_stubs.S 1970-01-01 02:00:00.000000000 +0200
|
||||
+++ linux-3.12.2-ndiswrapper-1.59/3rdparty/ndiswrapper/win2lin_stubs.S 2013-11-28 21:42:11.000000000 +0200
|
||||
diff -Nurp linux-4.6-rc6/3rdparty/ndiswrapper/win2lin_stubs.S linux-4.6-rc6-ndis/3rdparty/ndiswrapper/win2lin_stubs.S
|
||||
--- linux-4.6-rc6/3rdparty/ndiswrapper/win2lin_stubs.S 1970-01-01 02:00:00.000000000 +0200
|
||||
+++ linux-4.6-rc6-ndis/3rdparty/ndiswrapper/win2lin_stubs.S 2016-05-01 18:25:43.000000000 +0300
|
||||
@@ -0,0 +1,253 @@
|
||||
+/*
|
||||
+ * Copyright (C) 2005 Karl Vogel, Giridhar Pemmasani
|
||||
@@ -21515,9 +21526,9 @@ diff -Nurp linux-3.12.2/3rdparty/ndiswrapper/win2lin_stubs.S linux-3.12.2-ndiswr
|
||||
+#include "win2lin_stubs.h"
|
||||
+
|
||||
+#endif /* CONFIG_X86_64 */
|
||||
diff -Nurp linux-3.12.2/3rdparty/ndiswrapper/winnt_types.h linux-3.12.2-ndiswrapper-1.59/3rdparty/ndiswrapper/winnt_types.h
|
||||
--- linux-3.12.2/3rdparty/ndiswrapper/winnt_types.h 1970-01-01 02:00:00.000000000 +0200
|
||||
+++ linux-3.12.2-ndiswrapper-1.59/3rdparty/ndiswrapper/winnt_types.h 2013-11-28 21:42:11.000000000 +0200
|
||||
diff -Nurp linux-4.6-rc6/3rdparty/ndiswrapper/winnt_types.h linux-4.6-rc6-ndis/3rdparty/ndiswrapper/winnt_types.h
|
||||
--- linux-4.6-rc6/3rdparty/ndiswrapper/winnt_types.h 1970-01-01 02:00:00.000000000 +0200
|
||||
+++ linux-4.6-rc6-ndis/3rdparty/ndiswrapper/winnt_types.h 2016-05-01 18:25:43.000000000 +0300
|
||||
@@ -0,0 +1,1701 @@
|
||||
+/*
|
||||
+ * Copyright (C) 2003-2005 Pontus Fuchs, Giridhar Pemmasani
|
||||
@@ -23220,9 +23231,9 @@ diff -Nurp linux-3.12.2/3rdparty/ndiswrapper/winnt_types.h linux-3.12.2-ndiswrap
|
||||
+
|
||||
+
|
||||
+#endif /* WINNT_TYPES_H */
|
||||
diff -Nurp linux-3.12.2/3rdparty/ndiswrapper/workqueue.c linux-3.12.2-ndiswrapper-1.59/3rdparty/ndiswrapper/workqueue.c
|
||||
--- linux-3.12.2/3rdparty/ndiswrapper/workqueue.c 1970-01-01 02:00:00.000000000 +0200
|
||||
+++ linux-3.12.2-ndiswrapper-1.59/3rdparty/ndiswrapper/workqueue.c 2013-11-28 21:42:11.000000000 +0200
|
||||
diff -Nurp linux-4.6-rc6/3rdparty/ndiswrapper/workqueue.c linux-4.6-rc6-ndis/3rdparty/ndiswrapper/workqueue.c
|
||||
--- linux-4.6-rc6/3rdparty/ndiswrapper/workqueue.c 1970-01-01 02:00:00.000000000 +0200
|
||||
+++ linux-4.6-rc6-ndis/3rdparty/ndiswrapper/workqueue.c 2016-05-01 18:25:43.000000000 +0300
|
||||
@@ -0,0 +1,279 @@
|
||||
+/*
|
||||
+ * Copyright (C) 2006 Giridhar Pemmasani
|
||||
@@ -23503,9 +23514,9 @@ diff -Nurp linux-3.12.2/3rdparty/ndiswrapper/workqueue.c linux-3.12.2-ndiswrappe
|
||||
+ wrap_destroy_wq_on(workq, i);
|
||||
+ kfree(workq);
|
||||
+}
|
||||
diff -Nurp linux-3.12.2/3rdparty/ndiswrapper/wrapmem.c linux-3.12.2-ndiswrapper-1.59/3rdparty/ndiswrapper/wrapmem.c
|
||||
--- linux-3.12.2/3rdparty/ndiswrapper/wrapmem.c 1970-01-01 02:00:00.000000000 +0200
|
||||
+++ linux-3.12.2-ndiswrapper-1.59/3rdparty/ndiswrapper/wrapmem.c 2013-11-28 21:42:11.000000000 +0200
|
||||
diff -Nurp linux-4.6-rc6/3rdparty/ndiswrapper/wrapmem.c linux-4.6-rc6-ndis/3rdparty/ndiswrapper/wrapmem.c
|
||||
--- linux-4.6-rc6/3rdparty/ndiswrapper/wrapmem.c 1970-01-01 02:00:00.000000000 +0200
|
||||
+++ linux-4.6-rc6-ndis/3rdparty/ndiswrapper/wrapmem.c 2016-05-01 18:25:43.000000000 +0300
|
||||
@@ -0,0 +1,366 @@
|
||||
+/*
|
||||
+ * Copyright (C) 2006 Giridhar Pemmasani
|
||||
@@ -23873,9 +23884,9 @@ diff -Nurp linux-3.12.2/3rdparty/ndiswrapper/wrapmem.c linux-3.12.2-ndiswrapper-
|
||||
+#endif
|
||||
+ return;
|
||||
+}
|
||||
diff -Nurp linux-3.12.2/3rdparty/ndiswrapper/wrapmem.h linux-3.12.2-ndiswrapper-1.59/3rdparty/ndiswrapper/wrapmem.h
|
||||
--- linux-3.12.2/3rdparty/ndiswrapper/wrapmem.h 1970-01-01 02:00:00.000000000 +0200
|
||||
+++ linux-3.12.2-ndiswrapper-1.59/3rdparty/ndiswrapper/wrapmem.h 2013-11-28 21:42:11.000000000 +0200
|
||||
diff -Nurp linux-4.6-rc6/3rdparty/ndiswrapper/wrapmem.h linux-4.6-rc6-ndis/3rdparty/ndiswrapper/wrapmem.h
|
||||
--- linux-4.6-rc6/3rdparty/ndiswrapper/wrapmem.h 1970-01-01 02:00:00.000000000 +0200
|
||||
+++ linux-4.6-rc6-ndis/3rdparty/ndiswrapper/wrapmem.h 2016-05-01 18:25:43.000000000 +0300
|
||||
@@ -0,0 +1,97 @@
|
||||
+/*
|
||||
+ * Copyright (C) 2006 Giridhar Pemmasani
|
||||
@@ -23974,9 +23985,9 @@ diff -Nurp linux-3.12.2/3rdparty/ndiswrapper/wrapmem.h linux-3.12.2-ndiswrapper-
|
||||
+#endif // ALLOC_DEBUG
|
||||
+
|
||||
+#endif
|
||||
diff -Nurp linux-3.12.2/3rdparty/ndiswrapper/wrapndis.c linux-3.12.2-ndiswrapper-1.59/3rdparty/ndiswrapper/wrapndis.c
|
||||
--- linux-3.12.2/3rdparty/ndiswrapper/wrapndis.c 1970-01-01 02:00:00.000000000 +0200
|
||||
+++ linux-3.12.2-ndiswrapper-1.59/3rdparty/ndiswrapper/wrapndis.c 2013-11-28 21:42:11.000000000 +0200
|
||||
diff -Nurp linux-4.6-rc6/3rdparty/ndiswrapper/wrapndis.c linux-4.6-rc6-ndis/3rdparty/ndiswrapper/wrapndis.c
|
||||
--- linux-4.6-rc6/3rdparty/ndiswrapper/wrapndis.c 1970-01-01 02:00:00.000000000 +0200
|
||||
+++ linux-4.6-rc6-ndis/3rdparty/ndiswrapper/wrapndis.c 2016-05-01 18:25:43.000000000 +0300
|
||||
@@ -0,0 +1,2186 @@
|
||||
+/*
|
||||
+ * Copyright (C) 2003-2005 Pontus Fuchs, Giridhar Pemmasani
|
||||
@@ -26164,9 +26175,9 @@ diff -Nurp linux-3.12.2/3rdparty/ndiswrapper/wrapndis.c linux-3.12.2-ndiswrapper
|
||||
+ if (wrapndis_wq)
|
||||
+ destroy_workqueue(wrapndis_wq);
|
||||
+}
|
||||
diff -Nurp linux-3.12.2/3rdparty/ndiswrapper/wrapndis.h linux-3.12.2-ndiswrapper-1.59/3rdparty/ndiswrapper/wrapndis.h
|
||||
--- linux-3.12.2/3rdparty/ndiswrapper/wrapndis.h 1970-01-01 02:00:00.000000000 +0200
|
||||
+++ linux-3.12.2-ndiswrapper-1.59/3rdparty/ndiswrapper/wrapndis.h 2013-11-28 21:42:11.000000000 +0200
|
||||
diff -Nurp linux-4.6-rc6/3rdparty/ndiswrapper/wrapndis.h linux-4.6-rc6-ndis/3rdparty/ndiswrapper/wrapndis.h
|
||||
--- linux-4.6-rc6/3rdparty/ndiswrapper/wrapndis.h 1970-01-01 02:00:00.000000000 +0200
|
||||
+++ linux-4.6-rc6-ndis/3rdparty/ndiswrapper/wrapndis.h 2016-05-01 18:25:43.000000000 +0300
|
||||
@@ -0,0 +1,86 @@
|
||||
+/*
|
||||
+ * Copyright (C) 2003-2005 Pontus Fuchs, Giridhar Pemmasani
|
||||
@@ -26254,9 +26265,9 @@ diff -Nurp linux-3.12.2/3rdparty/ndiswrapper/wrapndis.h linux-3.12.2-ndiswrapper
|
||||
+struct iw_statistics *get_iw_stats(struct net_device *dev);
|
||||
+
|
||||
+#endif
|
||||
diff -Nurp linux-3.12.2/3rdparty/ndiswrapper/wrapper.c linux-3.12.2-ndiswrapper-1.59/3rdparty/ndiswrapper/wrapper.c
|
||||
--- linux-3.12.2/3rdparty/ndiswrapper/wrapper.c 1970-01-01 02:00:00.000000000 +0200
|
||||
+++ linux-3.12.2-ndiswrapper-1.59/3rdparty/ndiswrapper/wrapper.c 2013-11-28 21:42:11.000000000 +0200
|
||||
diff -Nurp linux-4.6-rc6/3rdparty/ndiswrapper/wrapper.c linux-4.6-rc6-ndis/3rdparty/ndiswrapper/wrapper.c
|
||||
--- linux-4.6-rc6/3rdparty/ndiswrapper/wrapper.c 1970-01-01 02:00:00.000000000 +0200
|
||||
+++ linux-4.6-rc6-ndis/3rdparty/ndiswrapper/wrapper.c 2016-05-01 18:25:43.000000000 +0300
|
||||
@@ -0,0 +1,111 @@
|
||||
+/*
|
||||
+ * Copyright (C) 2003-2005 Pontus Fuchs, Giridhar Pemmasani
|
||||
@@ -26369,9 +26380,9 @@ diff -Nurp linux-3.12.2/3rdparty/ndiswrapper/wrapper.c linux-3.12.2-ndiswrapper-
|
||||
+
|
||||
+module_init(wrapper_init);
|
||||
+module_exit(wrapper_exit);
|
||||
diff -Nurp linux-3.12.2/3rdparty/ndiswrapper/wrapper.h linux-3.12.2-ndiswrapper-1.59/3rdparty/ndiswrapper/wrapper.h
|
||||
--- linux-3.12.2/3rdparty/ndiswrapper/wrapper.h 1970-01-01 02:00:00.000000000 +0200
|
||||
+++ linux-3.12.2-ndiswrapper-1.59/3rdparty/ndiswrapper/wrapper.h 2013-11-28 21:42:11.000000000 +0200
|
||||
diff -Nurp linux-4.6-rc6/3rdparty/ndiswrapper/wrapper.h linux-4.6-rc6-ndis/3rdparty/ndiswrapper/wrapper.h
|
||||
--- linux-4.6-rc6/3rdparty/ndiswrapper/wrapper.h 1970-01-01 02:00:00.000000000 +0200
|
||||
+++ linux-4.6-rc6-ndis/3rdparty/ndiswrapper/wrapper.h 2016-05-01 18:25:43.000000000 +0300
|
||||
@@ -0,0 +1,24 @@
|
||||
+/*
|
||||
+ * Copyright (C) 2003-2005 Pontus Fuchs, Giridhar Pemmasani
|
||||
@@ -1,32 +0,0 @@
|
||||
|
||||
Adapt for strnicmp has been replaced by strncasecmp,
|
||||
and removed upstream in v4.0-rc1~98:
|
||||
|
||||
From af3cd13501eb04ca61d017ff4406f1cbffafdc04 Mon Sep 17 00:00:00 2001
|
||||
From: Rasmus Villemoes <linux@rasmusvillemoes.dk>
|
||||
Date: Thu, 12 Feb 2015 15:02:15 -0800
|
||||
Subject: lib/string.c: remove strnicmp()
|
||||
|
||||
|
||||
Signed-off-by: Thomas Backlund <tmb@mageia.org>
|
||||
|
||||
--- linux/3rdparty/ndiswrapper/ndis.c.orig
|
||||
+++ linux/3rdparty/ndiswrapper/ndis.c
|
||||
@@ -438,7 +438,7 @@ static int read_setting(struct nt_list *
|
||||
struct wrap_device_setting *setting;
|
||||
mutex_lock(&loader_mutex);
|
||||
nt_list_for_each_entry(setting, setting_list, list) {
|
||||
- if (strnicmp(keyname, setting->name, length) == 0) {
|
||||
+ if (strncasecmp(keyname, setting->name, length) == 0) {
|
||||
TRACE2("setting %s='%s'", keyname, setting->value);
|
||||
mutex_unlock(&loader_mutex);
|
||||
*param = ndis_encode_setting(setting, type);
|
||||
@@ -502,7 +502,7 @@ wstdcall void WIN_FUNC(NdisWriteConfigur
|
||||
|
||||
mutex_lock(&loader_mutex);
|
||||
nt_list_for_each_entry(setting, &nmb->wnd->wd->settings, list) {
|
||||
- if (strnicmp(keyname, setting->name, ansi.length) == 0) {
|
||||
+ if (strncasecmp(keyname, setting->name, ansi.length) == 0) {
|
||||
mutex_unlock(&loader_mutex);
|
||||
if (ndis_decode_setting(setting, param))
|
||||
*status = NDIS_STATUS_FAILURE;
|
||||
@@ -1,30 +0,0 @@
|
||||
--- linux/3rdparty/ndiswrapper/loader.c.orig 2015-09-30 00:51:13.000000000 +0300
|
||||
+++ linux/3rdparty/ndiswrapper/loader.c 2015-09-30 01:27:16.209213900 +0300
|
||||
@@ -21,6 +21,7 @@
|
||||
#include <linux/module.h>
|
||||
#include <linux/kmod.h>
|
||||
#include <linux/miscdevice.h>
|
||||
+#include <linux/vmalloc.h>
|
||||
#include <asm/uaccess.h>
|
||||
|
||||
/*
|
||||
--- linux/3rdparty/ndiswrapper/ntoskernel.c.orig 2015-09-30 00:51:13.000000000 +0300
|
||||
+++ linux/3rdparty/ndiswrapper/ntoskernel.c 2015-09-30 01:29:08.011792825 +0300
|
||||
@@ -13,6 +13,7 @@
|
||||
*
|
||||
*/
|
||||
|
||||
+#include <linux/vmalloc.h>
|
||||
#include "ntoskernel.h"
|
||||
#include "ndis.h"
|
||||
#include "usb.h"
|
||||
--- linux/3rdparty/ndiswrapper/pe_linker.c.orig 2015-09-30 00:51:13.000000000 +0300
|
||||
+++ linux/3rdparty/ndiswrapper/pe_linker.c 2015-09-30 01:30:49.965320953 +0300
|
||||
@@ -19,6 +19,7 @@
|
||||
|
||||
#else
|
||||
|
||||
+#include <linux/vmalloc.h>
|
||||
#include <linux/types.h>
|
||||
#include <asm/errno.h>
|
||||
|
||||
@@ -1,33 +0,0 @@
|
||||
|
||||
Fix build with kernel-3.14
|
||||
|
||||
Signed-off-by: Thomas Backlund <tmb@mageia.org>
|
||||
|
||||
3rdparty/ndiswrapper/crt.c | 2 +-
|
||||
3rdparty/ndiswrapper/ntoskernel.h | 3 +--
|
||||
2 files changed, 2 insertions(+), 3 deletions(-)
|
||||
|
||||
--- linux/3rdparty/ndiswrapper/crt.c.orig 2014-04-26 19:10:55.000000000 +0300
|
||||
+++ linux/3rdparty/ndiswrapper/crt.c 2014-04-26 19:25:27.766116082 +0300
|
||||
@@ -467,7 +467,7 @@ noregparm int WIN_FUNC(_win_memcmp,3)
|
||||
noregparm void WIN_FUNC(_win_srand,1)
|
||||
(UINT seed)
|
||||
{
|
||||
- net_srandom(seed);
|
||||
+ prandom_seed((__force u32) seed);
|
||||
}
|
||||
|
||||
noregparm int WIN_FUNC(rand,0)
|
||||
--- linux/3rdparty/ndiswrapper/ntoskernel.h.orig 2014-04-26 19:42:32.000000000 +0300
|
||||
+++ linux/3rdparty/ndiswrapper/ntoskernel.h 2014-04-26 19:59:13.662522942 +0300
|
||||
@@ -798,9 +798,8 @@ do { \
|
||||
#define nt_spin_unlock_irqrestore(lock, flags) \
|
||||
do { \
|
||||
nt_spin_unlock(lock); \
|
||||
- preempt_enable_no_resched(); \
|
||||
+ preempt_enable(); \
|
||||
local_irq_restore(flags); \
|
||||
- preempt_check_resched(); \
|
||||
} while (0)
|
||||
|
||||
static inline ULONG SPAN_PAGES(void *ptr, SIZE_T length)
|
||||
+98
@@ -0,0 +1,98 @@
|
||||
From 2f38b1b16d9280689e5cfa47a4c50956bf437f0d Mon Sep 17 00:00:00 2001
|
||||
From: Lv Zheng <lv.zheng@intel.com>
|
||||
Date: Tue, 21 Jun 2016 12:34:15 +0800
|
||||
Subject: [PATCH] ACPICA: Namespace: Fix deadlock triggered by MLC support in
|
||||
dynamic table loading
|
||||
|
||||
The new module-level code (MLC) approach invokes MLC on the per-table
|
||||
basis, but the dynamic loading support of this is incorrect because
|
||||
of the lock order:
|
||||
|
||||
acpi_ns_evaluate
|
||||
acpi_ex_enter_intperter
|
||||
acpi_ns_load_table (triggered by Load opcode)
|
||||
acpi_ns_exec_module_code_list
|
||||
acpi_ex_enter_intperter
|
||||
|
||||
The regression is introduced by the following commit:
|
||||
|
||||
Commit: 2785ce8d0da1cac9d8f78615e116cf929e9a9123
|
||||
ACPICA Commit: 071eff738c59eda1792ac24b3b688b61691d7e7c
|
||||
Subject: ACPICA: Add per-table execution of module-level code
|
||||
|
||||
This patch fixes this regression by unlocking the interpreter lock
|
||||
before invoking MLC. However, the unlocking is done to the
|
||||
acpi_ns_load_table(), in which the interpreter lock should be locked
|
||||
by acpi_ns_parse_table() but it wasn't.
|
||||
|
||||
Fixes: 2785ce8d0da1 (ACPICA: Add per-table execution of module-level code)
|
||||
Reported-by: Mika Westerberg <mika.westerberg@linux.intel.com>
|
||||
Tested-by: Mika Westerberg <mika.westerberg@linux.intel.com>
|
||||
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
|
||||
Cc: 4.5+ <stable@vger.kernel.org> # 4.5+
|
||||
[ rjw : Subject ]
|
||||
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
|
||||
---
|
||||
drivers/acpi/acpica/exconfig.c | 2 ++
|
||||
drivers/acpi/acpica/nsparse.c | 9 +++++++--
|
||||
2 files changed, 9 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/drivers/acpi/acpica/exconfig.c b/drivers/acpi/acpica/exconfig.c
|
||||
index a1d177d..21932d6 100644
|
||||
--- a/drivers/acpi/acpica/exconfig.c
|
||||
+++ b/drivers/acpi/acpica/exconfig.c
|
||||
@@ -108,7 +108,9 @@ acpi_ex_add_table(u32 table_index,
|
||||
|
||||
/* Add the table to the namespace */
|
||||
|
||||
+ acpi_ex_exit_interpreter();
|
||||
status = acpi_ns_load_table(table_index, parent_node);
|
||||
+ acpi_ex_enter_interpreter();
|
||||
if (ACPI_FAILURE(status)) {
|
||||
acpi_ut_remove_reference(obj_desc);
|
||||
*ddb_handle = NULL;
|
||||
diff --git a/drivers/acpi/acpica/nsparse.c b/drivers/acpi/acpica/nsparse.c
|
||||
index f631a47..1783cd7 100644
|
||||
--- a/drivers/acpi/acpica/nsparse.c
|
||||
+++ b/drivers/acpi/acpica/nsparse.c
|
||||
@@ -47,6 +47,7 @@
|
||||
#include "acparser.h"
|
||||
#include "acdispat.h"
|
||||
#include "actables.h"
|
||||
+#include "acinterp.h"
|
||||
|
||||
#define _COMPONENT ACPI_NAMESPACE
|
||||
ACPI_MODULE_NAME("nsparse")
|
||||
@@ -170,6 +171,8 @@ acpi_ns_parse_table(u32 table_index, struct acpi_namespace_node *start_node)
|
||||
|
||||
ACPI_FUNCTION_TRACE(ns_parse_table);
|
||||
|
||||
+ acpi_ex_enter_interpreter();
|
||||
+
|
||||
/*
|
||||
* AML Parse, pass 1
|
||||
*
|
||||
@@ -185,7 +188,7 @@ acpi_ns_parse_table(u32 table_index, struct acpi_namespace_node *start_node)
|
||||
status = acpi_ns_one_complete_parse(ACPI_IMODE_LOAD_PASS1,
|
||||
table_index, start_node);
|
||||
if (ACPI_FAILURE(status)) {
|
||||
- return_ACPI_STATUS(status);
|
||||
+ goto error_exit;
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -201,8 +204,10 @@ acpi_ns_parse_table(u32 table_index, struct acpi_namespace_node *start_node)
|
||||
status = acpi_ns_one_complete_parse(ACPI_IMODE_LOAD_PASS2,
|
||||
table_index, start_node);
|
||||
if (ACPI_FAILURE(status)) {
|
||||
- return_ACPI_STATUS(status);
|
||||
+ goto error_exit;
|
||||
}
|
||||
|
||||
+error_exit:
|
||||
+ acpi_ex_exit_interpreter();
|
||||
return_ACPI_STATUS(status);
|
||||
}
|
||||
--
|
||||
2.9.0
|
||||
|
||||
+148
@@ -0,0 +1,148 @@
|
||||
From f7c8d3a509e51f4a555371ded4957b225f1818ad Mon Sep 17 00:00:00 2001
|
||||
From: Lubomir Rintel <lkundrak@v3.sk>
|
||||
Date: Mon, 2 May 2016 09:06:51 +0200
|
||||
Subject: [PATCH] ARM: bcm2835: dt: Add the ethernet to the device trees
|
||||
|
||||
The hub and the ethernet in its port 1 are hardwired on the board.
|
||||
|
||||
Compared to the adapters that can be plugged into the USB ports, this
|
||||
one has no serial EEPROM to store its MAC. Nevertheless, the Raspberry Pi
|
||||
has the MAC address for this adapter in its ROM, accessible from its
|
||||
firmware.
|
||||
|
||||
U-Boot can read out the address and set the local-mac-address property of the
|
||||
node with "ethernet" alias. Let's add the node so that U-Boot can do its
|
||||
business.
|
||||
|
||||
Model B rev2 and Model B+ entries were verified by me, the hierarchy and
|
||||
pid/vid pair for the Version 2 was provided by Peter Chen. Original
|
||||
Model B is a blind shot, though very likely correct.
|
||||
|
||||
Signed-off-by: Lubomir Rintel <lkundrak@v3.sk>
|
||||
Acked-by: Stephen Warren <swarren@wwwdotorg.org>
|
||||
---
|
||||
arch/arm/boot/dts/bcm2835-rpi-b-plus.dts | 1 +
|
||||
arch/arm/boot/dts/bcm2835-rpi-b-rev2.dts | 1 +
|
||||
arch/arm/boot/dts/bcm2835-rpi-b.dts | 1 +
|
||||
arch/arm/boot/dts/bcm2836-rpi-2-b.dts | 1 +
|
||||
arch/arm/boot/dts/bcm283x-rpi-smsc9512.dtsi | 19 +++++++++++++++++++
|
||||
arch/arm/boot/dts/bcm283x-rpi-smsc9514.dtsi | 19 +++++++++++++++++++
|
||||
arch/arm/boot/dts/bcm283x.dtsi | 2 ++
|
||||
7 files changed, 44 insertions(+)
|
||||
create mode 100644 arch/arm/boot/dts/bcm283x-rpi-smsc9512.dtsi
|
||||
create mode 100644 arch/arm/boot/dts/bcm283x-rpi-smsc9514.dtsi
|
||||
|
||||
diff --git a/arch/arm/boot/dts/bcm2835-rpi-b-plus.dts b/arch/arm/boot/dts/bcm2835-rpi-b-plus.dts
|
||||
index ef54050..c3e01ce 100644
|
||||
--- a/arch/arm/boot/dts/bcm2835-rpi-b-plus.dts
|
||||
+++ b/arch/arm/boot/dts/bcm2835-rpi-b-plus.dts
|
||||
@@ -1,6 +1,7 @@
|
||||
/dts-v1/;
|
||||
#include "bcm2835.dtsi"
|
||||
#include "bcm2835-rpi.dtsi"
|
||||
+#include "bcm283x-rpi-smsc9514.dtsi"
|
||||
|
||||
/ {
|
||||
compatible = "raspberrypi,model-b-plus", "brcm,bcm2835";
|
||||
diff --git a/arch/arm/boot/dts/bcm2835-rpi-b-rev2.dts b/arch/arm/boot/dts/bcm2835-rpi-b-rev2.dts
|
||||
index 86f1f2f..364086a 100644
|
||||
--- a/arch/arm/boot/dts/bcm2835-rpi-b-rev2.dts
|
||||
+++ b/arch/arm/boot/dts/bcm2835-rpi-b-rev2.dts
|
||||
@@ -1,6 +1,7 @@
|
||||
/dts-v1/;
|
||||
#include "bcm2835.dtsi"
|
||||
#include "bcm2835-rpi.dtsi"
|
||||
+#include "bcm283x-rpi-smsc9512.dtsi"
|
||||
|
||||
/ {
|
||||
compatible = "raspberrypi,model-b-rev2", "brcm,bcm2835";
|
||||
diff --git a/arch/arm/boot/dts/bcm2835-rpi-b.dts b/arch/arm/boot/dts/bcm2835-rpi-b.dts
|
||||
index 4859e9d..4420b09 100644
|
||||
--- a/arch/arm/boot/dts/bcm2835-rpi-b.dts
|
||||
+++ b/arch/arm/boot/dts/bcm2835-rpi-b.dts
|
||||
@@ -1,6 +1,7 @@
|
||||
/dts-v1/;
|
||||
#include "bcm2835.dtsi"
|
||||
#include "bcm2835-rpi.dtsi"
|
||||
+#include "bcm283x-rpi-smsc9512.dtsi"
|
||||
|
||||
/ {
|
||||
compatible = "raspberrypi,model-b", "brcm,bcm2835";
|
||||
diff --git a/arch/arm/boot/dts/bcm2836-rpi-2-b.dts b/arch/arm/boot/dts/bcm2836-rpi-2-b.dts
|
||||
index ff94666..b975f29 100644
|
||||
--- a/arch/arm/boot/dts/bcm2836-rpi-2-b.dts
|
||||
+++ b/arch/arm/boot/dts/bcm2836-rpi-2-b.dts
|
||||
@@ -1,6 +1,7 @@
|
||||
/dts-v1/;
|
||||
#include "bcm2836.dtsi"
|
||||
#include "bcm2835-rpi.dtsi"
|
||||
+#include "bcm283x-rpi-smsc9514.dtsi"
|
||||
|
||||
/ {
|
||||
compatible = "raspberrypi,2-model-b", "brcm,bcm2836";
|
||||
diff --git a/arch/arm/boot/dts/bcm283x-rpi-smsc9512.dtsi b/arch/arm/boot/dts/bcm283x-rpi-smsc9512.dtsi
|
||||
new file mode 100644
|
||||
index 0000000..12c981e
|
||||
--- /dev/null
|
||||
+++ b/arch/arm/boot/dts/bcm283x-rpi-smsc9512.dtsi
|
||||
@@ -0,0 +1,19 @@
|
||||
+/ {
|
||||
+ aliases {
|
||||
+ ethernet = ðernet;
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&usb {
|
||||
+ usb1@1 {
|
||||
+ compatible = "usb424,9512";
|
||||
+ reg = <1>;
|
||||
+ #address-cells = <1>;
|
||||
+ #size-cells = <0>;
|
||||
+
|
||||
+ ethernet: usbether@1 {
|
||||
+ compatible = "usb424,ec00";
|
||||
+ reg = <1>;
|
||||
+ };
|
||||
+ };
|
||||
+};
|
||||
diff --git a/arch/arm/boot/dts/bcm283x-rpi-smsc9514.dtsi b/arch/arm/boot/dts/bcm283x-rpi-smsc9514.dtsi
|
||||
new file mode 100644
|
||||
index 0000000..3f0a56e
|
||||
--- /dev/null
|
||||
+++ b/arch/arm/boot/dts/bcm283x-rpi-smsc9514.dtsi
|
||||
@@ -0,0 +1,19 @@
|
||||
+/ {
|
||||
+ aliases {
|
||||
+ ethernet = ðernet;
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&usb {
|
||||
+ usb1@1 {
|
||||
+ compatible = "usb424,9514";
|
||||
+ reg = <1>;
|
||||
+ #address-cells = <1>;
|
||||
+ #size-cells = <0>;
|
||||
+
|
||||
+ ethernet: usbether@1 {
|
||||
+ compatible = "usb424,ec00";
|
||||
+ reg = <1>;
|
||||
+ };
|
||||
+ };
|
||||
+};
|
||||
diff --git a/arch/arm/boot/dts/bcm283x.dtsi b/arch/arm/boot/dts/bcm283x.dtsi
|
||||
index 8aaf193..04504b7 100644
|
||||
--- a/arch/arm/boot/dts/bcm283x.dtsi
|
||||
+++ b/arch/arm/boot/dts/bcm283x.dtsi
|
||||
@@ -230,6 +230,8 @@
|
||||
compatible = "brcm,bcm2835-usb";
|
||||
reg = <0x7e980000 0x10000>;
|
||||
interrupts = <1 9>;
|
||||
+ #address-cells = <1>;
|
||||
+ #size-cells = <0>;
|
||||
};
|
||||
};
|
||||
|
||||
--
|
||||
2.8.1
|
||||
|
||||
-29
@@ -1,29 +0,0 @@
|
||||
From 57e5c6d95b2cde884634586d833b02f54ba1c79d Mon Sep 17 00:00:00 2001
|
||||
From: Eric Anholt <eric@anholt.net>
|
||||
Date: Tue, 21 Apr 2015 09:42:21 -0700
|
||||
Subject: [PATCH 1/3] dt-bindings: Add root properties for Raspberry Pi 2
|
||||
|
||||
Signed-off-by: Eric Anholt <eric@anholt.net>
|
||||
Acked-by: Rob Herring <robh@kernel.org>
|
||||
---
|
||||
Documentation/devicetree/bindings/arm/bcm/brcm,bcm2835.txt | 4 ++++
|
||||
1 file changed, 4 insertions(+)
|
||||
|
||||
diff --git a/Documentation/devicetree/bindings/arm/bcm/brcm,bcm2835.txt b/Documentation/devicetree/bindings/arm/bcm/brcm,bcm2835.txt
|
||||
index c78576b..11d3056 100644
|
||||
--- a/Documentation/devicetree/bindings/arm/bcm/brcm,bcm2835.txt
|
||||
+++ b/Documentation/devicetree/bindings/arm/bcm/brcm,bcm2835.txt
|
||||
@@ -26,6 +26,10 @@ Raspberry Pi Model B+
|
||||
Required root node properties:
|
||||
compatible = "raspberrypi,model-b-plus", "brcm,bcm2835";
|
||||
|
||||
+Raspberry Pi 2 Model B
|
||||
+Required root node properties:
|
||||
+compatible = "raspberrypi,2-model-b", "brcm,bcm2836";
|
||||
+
|
||||
Raspberry Pi Compute Module
|
||||
Required root node properties:
|
||||
compatible = "raspberrypi,compute-module", "brcm,bcm2835";
|
||||
--
|
||||
2.3.10
|
||||
|
||||
-34
@@ -1,34 +0,0 @@
|
||||
From c1be3c1fc6178ca48750b4e66f1acb7c22b64997 Mon Sep 17 00:00:00 2001
|
||||
From: Eric Anholt <eric@anholt.net>
|
||||
Date: Wed, 16 Dec 2015 15:55:14 -0800
|
||||
Subject: [PATCH 2/3] ARM: bcm2835: Add a compat string for bcm2836 machine
|
||||
probe
|
||||
|
||||
Supporting the 2836 requires using the new interrupt controller, which
|
||||
we have support for.
|
||||
|
||||
Signed-off-by: Eric Anholt <eric@anholt.net>
|
||||
---
|
||||
arch/arm/mach-bcm/board_bcm2835.c | 5 +++++
|
||||
1 file changed, 5 insertions(+)
|
||||
|
||||
diff --git a/arch/arm/mach-bcm/board_bcm2835.c b/arch/arm/mach-bcm/board_bcm2835.c
|
||||
index 0f7b9ea..834d676 100644
|
||||
--- a/arch/arm/mach-bcm/board_bcm2835.c
|
||||
+++ b/arch/arm/mach-bcm/board_bcm2835.c
|
||||
@@ -36,7 +36,12 @@ static void __init bcm2835_init(void)
|
||||
}
|
||||
|
||||
static const char * const bcm2835_compat[] = {
|
||||
+#ifdef CONFIG_ARCH_MULTI_V6
|
||||
"brcm,bcm2835",
|
||||
+#endif
|
||||
+#ifdef CONFIG_ARCH_MULTI_V7
|
||||
+ "brcm,bcm2836",
|
||||
+#endif
|
||||
NULL
|
||||
};
|
||||
|
||||
--
|
||||
2.3.10
|
||||
|
||||
-79
@@ -1,79 +0,0 @@
|
||||
From 5234c34e4cd7695647ccc1cabb50c3e7720dd3fb Mon Sep 17 00:00:00 2001
|
||||
From: Eric Anholt <eric@anholt.net>
|
||||
Date: Tue, 24 Feb 2015 15:07:55 +0000
|
||||
Subject: [PATCH 3/3] ARM: bcm2835: Add Kconfig support for bcm2836
|
||||
|
||||
This should be a complete port of bcm2835 functionality to bcm2836
|
||||
(Raspberry Pi 2).
|
||||
|
||||
Signed-off-by: Eric Anholt <eric@anholt.net>
|
||||
---
|
||||
arch/arm/Kconfig.debug | 10 ++++++++--
|
||||
arch/arm/mach-bcm/Kconfig | 9 +++++----
|
||||
2 files changed, 13 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/arch/arm/Kconfig.debug b/arch/arm/Kconfig.debug
|
||||
index 259c0ca..957b876 100644
|
||||
--- a/arch/arm/Kconfig.debug
|
||||
+++ b/arch/arm/Kconfig.debug
|
||||
@@ -143,7 +143,12 @@ choice
|
||||
|
||||
config DEBUG_BCM2835
|
||||
bool "Kernel low-level debugging on BCM2835 PL011 UART"
|
||||
- depends on ARCH_BCM2835
|
||||
+ depends on ARCH_BCM2835 && ARCH_MULTI_V6
|
||||
+ select DEBUG_UART_PL01X
|
||||
+
|
||||
+ config DEBUG_BCM2836
|
||||
+ bool "Kernel low-level debugging on BCM2836 PL011 UART"
|
||||
+ depends on ARCH_BCM2835 && ARCH_MULTI_V7
|
||||
select DEBUG_UART_PL01X
|
||||
|
||||
config DEBUG_BCM_5301X
|
||||
@@ -1402,6 +1407,7 @@ config DEBUG_UART_PHYS
|
||||
default 0x20064000 if DEBUG_RK29_UART1 || DEBUG_RK3X_UART2
|
||||
default 0x20068000 if DEBUG_RK29_UART2 || DEBUG_RK3X_UART3
|
||||
default 0x20201000 if DEBUG_BCM2835
|
||||
+ default 0x3f201000 if DEBUG_BCM2836
|
||||
default 0x3e000000 if DEBUG_BCM_KONA_UART
|
||||
default 0x4000e400 if DEBUG_LL_UART_EFM32
|
||||
default 0x40081000 if DEBUG_LPC18XX_UART0
|
||||
@@ -1485,7 +1491,7 @@ config DEBUG_UART_VIRT
|
||||
default 0xf0000be0 if ARCH_EBSA110
|
||||
default 0xf0010000 if DEBUG_ASM9260_UART
|
||||
default 0xf01fb000 if DEBUG_NOMADIK_UART
|
||||
- default 0xf0201000 if DEBUG_BCM2835
|
||||
+ default 0xf0201000 if DEBUG_BCM2835 || DEBUG_BCM2836
|
||||
default 0xf1000300 if DEBUG_BCM_5301X
|
||||
default 0xf1002000 if DEBUG_MT8127_UART0
|
||||
default 0xf1006000 if DEBUG_MT6589_UART0
|
||||
diff --git a/arch/arm/mach-bcm/Kconfig b/arch/arm/mach-bcm/Kconfig
|
||||
index 8c53c55..3b2acf4 100644
|
||||
--- a/arch/arm/mach-bcm/Kconfig
|
||||
+++ b/arch/arm/mach-bcm/Kconfig
|
||||
@@ -122,17 +122,18 @@ config ARCH_BCM_MOBILE_SMP
|
||||
comment "Other Architectures"
|
||||
|
||||
config ARCH_BCM2835
|
||||
- bool "Broadcom BCM2835 family" if ARCH_MULTI_V6
|
||||
+ bool "Broadcom BCM2835 family" if ARCH_MULTI_V6 || ARCH_MULTI_V7
|
||||
select ARCH_REQUIRE_GPIOLIB
|
||||
select ARM_AMBA
|
||||
- select ARM_ERRATA_411920
|
||||
+ select ARM_ERRATA_411920 if ARCH_MULTI_V6
|
||||
select ARM_TIMER_SP804
|
||||
+ select HAVE_ARM_ARCH_TIMER if ARCH_MULTI_V7
|
||||
select CLKSRC_OF
|
||||
select PINCTRL
|
||||
select PINCTRL_BCM2835
|
||||
help
|
||||
- This enables support for the Broadcom BCM2835 SoC. This SoC is
|
||||
- used in the Raspberry Pi and Roku 2 devices.
|
||||
+ This enables support for the Broadcom BCM2835 and BCM2836 SoCs.
|
||||
+ This SoC is used in the Raspberry Pi and Roku 2 devices.
|
||||
|
||||
config ARCH_BCM_63XX
|
||||
bool "Broadcom BCM63xx DSL SoC" if ARCH_MULTI_V7
|
||||
--
|
||||
2.3.10
|
||||
|
||||
-36
@@ -1,36 +0,0 @@
|
||||
From 60d56333e869be6ad6926cdba3ba974512b2183b Mon Sep 17 00:00:00 2001
|
||||
From: Eric Anholt <eric@anholt.net>
|
||||
Date: Tue, 1 Dec 2015 16:49:12 -0800
|
||||
Subject: [PATCH 1/3] ARM: bcm2835: Define two new packets from the latest
|
||||
firmware.
|
||||
|
||||
These packets give us direct access to the firmware's power management
|
||||
code, as opposed to GET/SET_POWER_STATE packets that only had a couple
|
||||
of domains implemented.
|
||||
|
||||
Signed-off-by: Eric Anholt <eric@anholt.net>
|
||||
Reviewed-by: Kevin Hilman <khilman@linaro.org>
|
||||
---
|
||||
include/soc/bcm2835/raspberrypi-firmware.h | 2 ++
|
||||
1 file changed, 2 insertions(+)
|
||||
|
||||
diff --git a/include/soc/bcm2835/raspberrypi-firmware.h b/include/soc/bcm2835/raspberrypi-firmware.h
|
||||
index c07d74a..3fb3571 100644
|
||||
--- a/include/soc/bcm2835/raspberrypi-firmware.h
|
||||
+++ b/include/soc/bcm2835/raspberrypi-firmware.h
|
||||
@@ -72,10 +72,12 @@ enum rpi_firmware_property_tag {
|
||||
RPI_FIRMWARE_SET_ENABLE_QPU = 0x00030012,
|
||||
RPI_FIRMWARE_GET_DISPMANX_RESOURCE_MEM_HANDLE = 0x00030014,
|
||||
RPI_FIRMWARE_GET_EDID_BLOCK = 0x00030020,
|
||||
+ RPI_FIRMWARE_GET_DOMAIN_STATE = 0x00030030,
|
||||
RPI_FIRMWARE_SET_CLOCK_STATE = 0x00038001,
|
||||
RPI_FIRMWARE_SET_CLOCK_RATE = 0x00038002,
|
||||
RPI_FIRMWARE_SET_VOLTAGE = 0x00038003,
|
||||
RPI_FIRMWARE_SET_TURBO = 0x00038009,
|
||||
+ RPI_FIRMWARE_SET_DOMAIN_STATE = 0x00038030,
|
||||
|
||||
/* Dispmanx TAGS */
|
||||
RPI_FIRMWARE_FRAMEBUFFER_ALLOCATE = 0x00040001,
|
||||
--
|
||||
2.3.10
|
||||
|
||||
-74
@@ -1,74 +0,0 @@
|
||||
From 4c8b338f9ae38dee9c77bda023babc7f7543f52c Mon Sep 17 00:00:00 2001
|
||||
From: Alexander Aring <alex.aring@gmail.com>
|
||||
Date: Wed, 16 Dec 2015 16:26:48 -0800
|
||||
Subject: [PATCH 2/3] dt-bindings: add rpi power domain driver bindings
|
||||
|
||||
This patch adds devicetree tree bindings for the Raspberry Pi power
|
||||
domain driver.
|
||||
|
||||
Signed-off-by: Alexander Aring <alex.aring@gmail.com>
|
||||
Signed-off-by: Eric Anholt <eric@anholt.net>
|
||||
Acked-by: Rob Herring <robh@kernel.org>
|
||||
Reviewed-by: Ulf Hansson <ulf.hansson@linaro.org>
|
||||
Reviewed-by: Kevin Hilman <khilman@linaro.org>
|
||||
---
|
||||
.../bindings/soc/bcm/raspberrypi,bcm2835-power.txt | 47 ++++++++++++++++++++++
|
||||
1 file changed, 47 insertions(+)
|
||||
create mode 100644 Documentation/devicetree/bindings/soc/bcm/raspberrypi,bcm2835-power.txt
|
||||
|
||||
diff --git a/Documentation/devicetree/bindings/soc/bcm/raspberrypi,bcm2835-power.txt b/Documentation/devicetree/bindings/soc/bcm/raspberrypi,bcm2835-power.txt
|
||||
new file mode 100644
|
||||
index 0000000..30942cf
|
||||
--- /dev/null
|
||||
+++ b/Documentation/devicetree/bindings/soc/bcm/raspberrypi,bcm2835-power.txt
|
||||
@@ -0,0 +1,47 @@
|
||||
+Raspberry Pi power domain driver
|
||||
+
|
||||
+Required properties:
|
||||
+
|
||||
+- compatible: Should be "raspberrypi,bcm2835-power".
|
||||
+- firmware: Reference to the RPi firmware device node.
|
||||
+- #power-domain-cells: Should be <1>, we providing multiple power domains.
|
||||
+
|
||||
+The valid defines for power domain are:
|
||||
+
|
||||
+ RPI_POWER_DOMAIN_I2C0
|
||||
+ RPI_POWER_DOMAIN_I2C1
|
||||
+ RPI_POWER_DOMAIN_I2C2
|
||||
+ RPI_POWER_DOMAIN_VIDEO_SCALER
|
||||
+ RPI_POWER_DOMAIN_VPU1
|
||||
+ RPI_POWER_DOMAIN_HDMI
|
||||
+ RPI_POWER_DOMAIN_USB
|
||||
+ RPI_POWER_DOMAIN_VEC
|
||||
+ RPI_POWER_DOMAIN_JPEG
|
||||
+ RPI_POWER_DOMAIN_H264
|
||||
+ RPI_POWER_DOMAIN_V3D
|
||||
+ RPI_POWER_DOMAIN_ISP
|
||||
+ RPI_POWER_DOMAIN_UNICAM0
|
||||
+ RPI_POWER_DOMAIN_UNICAM1
|
||||
+ RPI_POWER_DOMAIN_CCP2RX
|
||||
+ RPI_POWER_DOMAIN_CSI2
|
||||
+ RPI_POWER_DOMAIN_CPI
|
||||
+ RPI_POWER_DOMAIN_DSI0
|
||||
+ RPI_POWER_DOMAIN_DSI1
|
||||
+ RPI_POWER_DOMAIN_TRANSPOSER
|
||||
+ RPI_POWER_DOMAIN_CCP2TX
|
||||
+ RPI_POWER_DOMAIN_CDP
|
||||
+ RPI_POWER_DOMAIN_ARM
|
||||
+
|
||||
+Example:
|
||||
+
|
||||
+power: power {
|
||||
+ compatible = "raspberrypi,bcm2835-power";
|
||||
+ firmware = <&firmware>;
|
||||
+ #power-domain-cells = <1>;
|
||||
+};
|
||||
+
|
||||
+Example for using power domain:
|
||||
+
|
||||
+&usb {
|
||||
+ power-domains = <&power RPI_POWER_DOMAIN_USB>;
|
||||
+};
|
||||
--
|
||||
2.3.10
|
||||
|
||||
-379
@@ -1,379 +0,0 @@
|
||||
From a09cd356586d33f64cbe64ee4f5c1a7c4a6abee5 Mon Sep 17 00:00:00 2001
|
||||
From: Alexander Aring <alex.aring@gmail.com>
|
||||
Date: Wed, 16 Dec 2015 16:26:47 -0800
|
||||
Subject: [PATCH 3/3] ARM: bcm2835: add rpi power domain driver
|
||||
|
||||
This patch adds support for several power domains on Raspberry Pi,
|
||||
including USB (so it can be enabled even if the bootloader didn't do
|
||||
it), and graphics.
|
||||
|
||||
This patch is the combined work of Eric Anholt (who wrote USB support
|
||||
inside of the Raspberry Pi firmware driver, and wrote the non-USB
|
||||
domain support) and Alexander Aring (who separated the original USB
|
||||
work out from the firmware driver).
|
||||
|
||||
Signed-off-by: Alexander Aring <alex.aring@gmail.com>
|
||||
Signed-off-by: Eric Anholt <eric@anholt.net>
|
||||
Reviewed-by: Ulf Hansson <ulf.hansson@linaro.org>
|
||||
Reviewed-by: Kevin Hilman <khilman@linaro.org>
|
||||
---
|
||||
drivers/soc/Kconfig | 1 +
|
||||
drivers/soc/Makefile | 1 +
|
||||
drivers/soc/bcm/Kconfig | 9 +
|
||||
drivers/soc/bcm/Makefile | 1 +
|
||||
drivers/soc/bcm/raspberrypi-power.c | 247 ++++++++++++++++++++++++++
|
||||
include/dt-bindings/power/raspberrypi-power.h | 41 +++++
|
||||
6 files changed, 300 insertions(+)
|
||||
create mode 100644 drivers/soc/bcm/Kconfig
|
||||
create mode 100644 drivers/soc/bcm/Makefile
|
||||
create mode 100644 drivers/soc/bcm/raspberrypi-power.c
|
||||
create mode 100644 include/dt-bindings/power/raspberrypi-power.h
|
||||
|
||||
diff --git a/drivers/soc/Kconfig b/drivers/soc/Kconfig
|
||||
index 4e853ed..8441426 100644
|
||||
--- a/drivers/soc/Kconfig
|
||||
+++ b/drivers/soc/Kconfig
|
||||
@@ -1,5 +1,6 @@
|
||||
menu "SOC (System On Chip) specific Drivers"
|
||||
|
||||
+source "drivers/soc/bcm/Kconfig"
|
||||
source "drivers/soc/brcmstb/Kconfig"
|
||||
source "drivers/soc/mediatek/Kconfig"
|
||||
source "drivers/soc/qcom/Kconfig"
|
||||
diff --git a/drivers/soc/Makefile b/drivers/soc/Makefile
|
||||
index f2ba2e9..f3f955c 100644
|
||||
--- a/drivers/soc/Makefile
|
||||
+++ b/drivers/soc/Makefile
|
||||
@@ -2,6 +2,7 @@
|
||||
# Makefile for the Linux Kernel SOC specific device drivers.
|
||||
#
|
||||
|
||||
+obj-y += bcm/
|
||||
obj-$(CONFIG_SOC_BRCMSTB) += brcmstb/
|
||||
obj-$(CONFIG_MACH_DOVE) += dove/
|
||||
obj-$(CONFIG_ARCH_MEDIATEK) += mediatek/
|
||||
diff --git a/drivers/soc/bcm/Kconfig b/drivers/soc/bcm/Kconfig
|
||||
new file mode 100644
|
||||
index 0000000..5ba1827
|
||||
--- /dev/null
|
||||
+++ b/drivers/soc/bcm/Kconfig
|
||||
@@ -0,0 +1,9 @@
|
||||
+config RASPBERRYPI_POWER
|
||||
+ bool "Raspberry Pi power domain driver"
|
||||
+ depends on ARCH_BCM2835 || COMPILE_TEST
|
||||
+ depends on RASPBERRYPI_FIRMWARE
|
||||
+ select PM_GENERIC_DOMAINS if PM
|
||||
+ select PM_GENERIC_DOMAINS_OF if PM
|
||||
+ help
|
||||
+ This enables support for the RPi power domains which can be enabled
|
||||
+ or disabled via the RPi firmware.
|
||||
diff --git a/drivers/soc/bcm/Makefile b/drivers/soc/bcm/Makefile
|
||||
new file mode 100644
|
||||
index 0000000..63aa3eb
|
||||
--- /dev/null
|
||||
+++ b/drivers/soc/bcm/Makefile
|
||||
@@ -0,0 +1 @@
|
||||
+obj-$(CONFIG_RASPBERRYPI_POWER) += raspberrypi-power.o
|
||||
diff --git a/drivers/soc/bcm/raspberrypi-power.c b/drivers/soc/bcm/raspberrypi-power.c
|
||||
new file mode 100644
|
||||
index 0000000..fe96a8b
|
||||
--- /dev/null
|
||||
+++ b/drivers/soc/bcm/raspberrypi-power.c
|
||||
@@ -0,0 +1,247 @@
|
||||
+/* (C) 2015 Pengutronix, Alexander Aring <aar@pengutronix.de>
|
||||
+ *
|
||||
+ * This program is free software; you can redistribute it and/or modify
|
||||
+ * it under the terms of the GNU General Public License version 2 as
|
||||
+ * published by the Free Software Foundation.
|
||||
+ *
|
||||
+ * Authors:
|
||||
+ * Alexander Aring <aar@pengutronix.de>
|
||||
+ * Eric Anholt <eric@anholt.net>
|
||||
+ */
|
||||
+
|
||||
+#include <linux/module.h>
|
||||
+#include <linux/of_platform.h>
|
||||
+#include <linux/platform_device.h>
|
||||
+#include <linux/pm_domain.h>
|
||||
+#include <dt-bindings/power/raspberrypi-power.h>
|
||||
+#include <soc/bcm2835/raspberrypi-firmware.h>
|
||||
+
|
||||
+/*
|
||||
+ * Firmware indices for the old power domains interface. Only a few
|
||||
+ * of them were actually implemented.
|
||||
+ */
|
||||
+#define RPI_OLD_POWER_DOMAIN_USB 3
|
||||
+#define RPI_OLD_POWER_DOMAIN_V3D 10
|
||||
+
|
||||
+struct rpi_power_domain {
|
||||
+ u32 domain;
|
||||
+ bool enabled;
|
||||
+ bool old_interface;
|
||||
+ struct generic_pm_domain base;
|
||||
+ struct rpi_firmware *fw;
|
||||
+};
|
||||
+
|
||||
+struct rpi_power_domains {
|
||||
+ bool has_new_interface;
|
||||
+ struct genpd_onecell_data xlate;
|
||||
+ struct rpi_firmware *fw;
|
||||
+ struct rpi_power_domain domains[RPI_POWER_DOMAIN_COUNT];
|
||||
+};
|
||||
+
|
||||
+/*
|
||||
+ * Packet definition used by RPI_FIRMWARE_SET_POWER_STATE and
|
||||
+ * RPI_FIRMWARE_SET_DOMAIN_STATE
|
||||
+ */
|
||||
+struct rpi_power_domain_packet {
|
||||
+ u32 domain;
|
||||
+ u32 on;
|
||||
+} __packet;
|
||||
+
|
||||
+/*
|
||||
+ * Asks the firmware to enable or disable power on a specific power
|
||||
+ * domain.
|
||||
+ */
|
||||
+static int rpi_firmware_set_power(struct rpi_power_domain *rpi_domain, bool on)
|
||||
+{
|
||||
+ struct rpi_power_domain_packet packet;
|
||||
+
|
||||
+ packet.domain = rpi_domain->domain;
|
||||
+ packet.on = on;
|
||||
+ return rpi_firmware_property(rpi_domain->fw,
|
||||
+ rpi_domain->old_interface ?
|
||||
+ RPI_FIRMWARE_SET_POWER_STATE :
|
||||
+ RPI_FIRMWARE_SET_DOMAIN_STATE,
|
||||
+ &packet, sizeof(packet));
|
||||
+}
|
||||
+
|
||||
+static int rpi_domain_off(struct generic_pm_domain *domain)
|
||||
+{
|
||||
+ struct rpi_power_domain *rpi_domain =
|
||||
+ container_of(domain, struct rpi_power_domain, base);
|
||||
+
|
||||
+ return rpi_firmware_set_power(rpi_domain, false);
|
||||
+}
|
||||
+
|
||||
+static int rpi_domain_on(struct generic_pm_domain *domain)
|
||||
+{
|
||||
+ struct rpi_power_domain *rpi_domain =
|
||||
+ container_of(domain, struct rpi_power_domain, base);
|
||||
+
|
||||
+ return rpi_firmware_set_power(rpi_domain, true);
|
||||
+}
|
||||
+
|
||||
+static void rpi_common_init_power_domain(struct rpi_power_domains *rpi_domains,
|
||||
+ int xlate_index, const char *name)
|
||||
+{
|
||||
+ struct rpi_power_domain *dom = &rpi_domains->domains[xlate_index];
|
||||
+
|
||||
+ dom->fw = rpi_domains->fw;
|
||||
+
|
||||
+ dom->base.name = name;
|
||||
+ dom->base.power_on = rpi_domain_on;
|
||||
+ dom->base.power_off = rpi_domain_off;
|
||||
+
|
||||
+ /*
|
||||
+ * Treat all power domains as off at boot.
|
||||
+ *
|
||||
+ * The firmware itself may be keeping some domains on, but
|
||||
+ * from Linux's perspective all we control is the refcounts
|
||||
+ * that we give to the firmware, and we can't ask the firmware
|
||||
+ * to turn off something that we haven't ourselves turned on.
|
||||
+ */
|
||||
+ pm_genpd_init(&dom->base, NULL, true);
|
||||
+
|
||||
+ rpi_domains->xlate.domains[xlate_index] = &dom->base;
|
||||
+}
|
||||
+
|
||||
+static void rpi_init_power_domain(struct rpi_power_domains *rpi_domains,
|
||||
+ int xlate_index, const char *name)
|
||||
+{
|
||||
+ struct rpi_power_domain *dom = &rpi_domains->domains[xlate_index];
|
||||
+
|
||||
+ if (!rpi_domains->has_new_interface)
|
||||
+ return;
|
||||
+
|
||||
+ /* The DT binding index is the firmware's domain index minus one. */
|
||||
+ dom->domain = xlate_index + 1;
|
||||
+
|
||||
+ rpi_common_init_power_domain(rpi_domains, xlate_index, name);
|
||||
+}
|
||||
+
|
||||
+static void rpi_init_old_power_domain(struct rpi_power_domains *rpi_domains,
|
||||
+ int xlate_index, int domain,
|
||||
+ const char *name)
|
||||
+{
|
||||
+ struct rpi_power_domain *dom = &rpi_domains->domains[xlate_index];
|
||||
+
|
||||
+ dom->old_interface = true;
|
||||
+ dom->domain = domain;
|
||||
+
|
||||
+ rpi_common_init_power_domain(rpi_domains, xlate_index, name);
|
||||
+}
|
||||
+
|
||||
+/*
|
||||
+ * Detects whether the firmware supports the new power domains interface.
|
||||
+ *
|
||||
+ * The firmware doesn't actually return an error on an unknown tag,
|
||||
+ * and just skips over it, so we do the detection by putting an
|
||||
+ * unexpected value in the return field and checking if it was
|
||||
+ * unchanged.
|
||||
+ */
|
||||
+static bool
|
||||
+rpi_has_new_domain_support(struct rpi_power_domains *rpi_domains)
|
||||
+{
|
||||
+ struct rpi_power_domain_packet packet;
|
||||
+ int ret;
|
||||
+
|
||||
+ packet.domain = RPI_POWER_DOMAIN_ARM;
|
||||
+ packet.on = ~0;
|
||||
+
|
||||
+ ret = rpi_firmware_property(rpi_domains->fw,
|
||||
+ RPI_FIRMWARE_GET_DOMAIN_STATE,
|
||||
+ &packet, sizeof(packet));
|
||||
+
|
||||
+ return ret == 0 && packet.on != ~0;
|
||||
+}
|
||||
+
|
||||
+static int rpi_power_probe(struct platform_device *pdev)
|
||||
+{
|
||||
+ struct device_node *fw_np;
|
||||
+ struct device *dev = &pdev->dev;
|
||||
+ struct rpi_power_domains *rpi_domains;
|
||||
+
|
||||
+ rpi_domains = devm_kzalloc(dev, sizeof(*rpi_domains), GFP_KERNEL);
|
||||
+ if (!rpi_domains)
|
||||
+ return -ENOMEM;
|
||||
+
|
||||
+ rpi_domains->xlate.domains =
|
||||
+ devm_kzalloc(dev, sizeof(*rpi_domains->xlate.domains) *
|
||||
+ RPI_POWER_DOMAIN_COUNT, GFP_KERNEL);
|
||||
+ if (!rpi_domains->xlate.domains)
|
||||
+ return -ENOMEM;
|
||||
+
|
||||
+ rpi_domains->xlate.num_domains = RPI_POWER_DOMAIN_COUNT;
|
||||
+
|
||||
+ fw_np = of_parse_phandle(pdev->dev.of_node, "firmware", 0);
|
||||
+ if (!fw_np) {
|
||||
+ dev_err(&pdev->dev, "no firmware node\n");
|
||||
+ return -ENODEV;
|
||||
+ }
|
||||
+
|
||||
+ rpi_domains->fw = rpi_firmware_get(fw_np);
|
||||
+ of_node_put(fw_np);
|
||||
+ if (!rpi_domains->fw)
|
||||
+ return -EPROBE_DEFER;
|
||||
+
|
||||
+ rpi_domains->has_new_interface =
|
||||
+ rpi_has_new_domain_support(rpi_domains);
|
||||
+
|
||||
+ rpi_init_power_domain(rpi_domains, RPI_POWER_DOMAIN_I2C0, "I2C0");
|
||||
+ rpi_init_power_domain(rpi_domains, RPI_POWER_DOMAIN_I2C1, "I2C1");
|
||||
+ rpi_init_power_domain(rpi_domains, RPI_POWER_DOMAIN_I2C2, "I2C2");
|
||||
+ rpi_init_power_domain(rpi_domains, RPI_POWER_DOMAIN_VIDEO_SCALER,
|
||||
+ "VIDEO_SCALER");
|
||||
+ rpi_init_power_domain(rpi_domains, RPI_POWER_DOMAIN_VPU1, "VPU1");
|
||||
+ rpi_init_power_domain(rpi_domains, RPI_POWER_DOMAIN_HDMI, "HDMI");
|
||||
+
|
||||
+ /*
|
||||
+ * Use the old firmware interface for USB power, so that we
|
||||
+ * can turn it on even if the firmware hasn't been updated.
|
||||
+ */
|
||||
+ rpi_init_old_power_domain(rpi_domains, RPI_POWER_DOMAIN_USB,
|
||||
+ RPI_OLD_POWER_DOMAIN_USB, "USB");
|
||||
+
|
||||
+ rpi_init_power_domain(rpi_domains, RPI_POWER_DOMAIN_VEC, "VEC");
|
||||
+ rpi_init_power_domain(rpi_domains, RPI_POWER_DOMAIN_JPEG, "JPEG");
|
||||
+ rpi_init_power_domain(rpi_domains, RPI_POWER_DOMAIN_H264, "H264");
|
||||
+ rpi_init_power_domain(rpi_domains, RPI_POWER_DOMAIN_V3D, "V3D");
|
||||
+ rpi_init_power_domain(rpi_domains, RPI_POWER_DOMAIN_ISP, "ISP");
|
||||
+ rpi_init_power_domain(rpi_domains, RPI_POWER_DOMAIN_UNICAM0, "UNICAM0");
|
||||
+ rpi_init_power_domain(rpi_domains, RPI_POWER_DOMAIN_UNICAM1, "UNICAM1");
|
||||
+ rpi_init_power_domain(rpi_domains, RPI_POWER_DOMAIN_CCP2RX, "CCP2RX");
|
||||
+ rpi_init_power_domain(rpi_domains, RPI_POWER_DOMAIN_CSI2, "CSI2");
|
||||
+ rpi_init_power_domain(rpi_domains, RPI_POWER_DOMAIN_CPI, "CPI");
|
||||
+ rpi_init_power_domain(rpi_domains, RPI_POWER_DOMAIN_DSI0, "DSI0");
|
||||
+ rpi_init_power_domain(rpi_domains, RPI_POWER_DOMAIN_DSI1, "DSI1");
|
||||
+ rpi_init_power_domain(rpi_domains, RPI_POWER_DOMAIN_TRANSPOSER,
|
||||
+ "TRANSPOSER");
|
||||
+ rpi_init_power_domain(rpi_domains, RPI_POWER_DOMAIN_CCP2TX, "CCP2TX");
|
||||
+ rpi_init_power_domain(rpi_domains, RPI_POWER_DOMAIN_CDP, "CDP");
|
||||
+ rpi_init_power_domain(rpi_domains, RPI_POWER_DOMAIN_ARM, "ARM");
|
||||
+
|
||||
+ of_genpd_add_provider_onecell(dev->of_node, &rpi_domains->xlate);
|
||||
+
|
||||
+ platform_set_drvdata(pdev, rpi_domains);
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+static const struct of_device_id rpi_power_of_match[] = {
|
||||
+ { .compatible = "raspberrypi,bcm2835-power", },
|
||||
+ {},
|
||||
+};
|
||||
+MODULE_DEVICE_TABLE(of, rpi_power_of_match);
|
||||
+
|
||||
+static struct platform_driver rpi_power_driver = {
|
||||
+ .driver = {
|
||||
+ .name = "raspberrypi-power",
|
||||
+ .of_match_table = rpi_power_of_match,
|
||||
+ },
|
||||
+ .probe = rpi_power_probe,
|
||||
+};
|
||||
+builtin_platform_driver(rpi_power_driver);
|
||||
+
|
||||
+MODULE_AUTHOR("Alexander Aring <aar@pengutronix.de>");
|
||||
+MODULE_AUTHOR("Eric Anholt <eric@anholt.net>");
|
||||
+MODULE_DESCRIPTION("Raspberry Pi power domain driver");
|
||||
+MODULE_LICENSE("GPL v2");
|
||||
diff --git a/include/dt-bindings/power/raspberrypi-power.h b/include/dt-bindings/power/raspberrypi-power.h
|
||||
new file mode 100644
|
||||
index 0000000..b3ff8e0
|
||||
--- /dev/null
|
||||
+++ b/include/dt-bindings/power/raspberrypi-power.h
|
||||
@@ -0,0 +1,41 @@
|
||||
+/*
|
||||
+ * Copyright © 2015 Broadcom
|
||||
+ *
|
||||
+ * This program is free software; you can redistribute it and/or modify
|
||||
+ * it under the terms of the GNU General Public License version 2 as
|
||||
+ * published by the Free Software Foundation.
|
||||
+ */
|
||||
+
|
||||
+#ifndef _DT_BINDINGS_ARM_BCM2835_RPI_POWER_H
|
||||
+#define _DT_BINDINGS_ARM_BCM2835_RPI_POWER_H
|
||||
+
|
||||
+/* These power domain indices are the firmware interface's indices
|
||||
+ * minus one.
|
||||
+ */
|
||||
+#define RPI_POWER_DOMAIN_I2C0 0
|
||||
+#define RPI_POWER_DOMAIN_I2C1 1
|
||||
+#define RPI_POWER_DOMAIN_I2C2 2
|
||||
+#define RPI_POWER_DOMAIN_VIDEO_SCALER 3
|
||||
+#define RPI_POWER_DOMAIN_VPU1 4
|
||||
+#define RPI_POWER_DOMAIN_HDMI 5
|
||||
+#define RPI_POWER_DOMAIN_USB 6
|
||||
+#define RPI_POWER_DOMAIN_VEC 7
|
||||
+#define RPI_POWER_DOMAIN_JPEG 8
|
||||
+#define RPI_POWER_DOMAIN_H264 9
|
||||
+#define RPI_POWER_DOMAIN_V3D 10
|
||||
+#define RPI_POWER_DOMAIN_ISP 11
|
||||
+#define RPI_POWER_DOMAIN_UNICAM0 12
|
||||
+#define RPI_POWER_DOMAIN_UNICAM1 13
|
||||
+#define RPI_POWER_DOMAIN_CCP2RX 14
|
||||
+#define RPI_POWER_DOMAIN_CSI2 15
|
||||
+#define RPI_POWER_DOMAIN_CPI 16
|
||||
+#define RPI_POWER_DOMAIN_DSI0 17
|
||||
+#define RPI_POWER_DOMAIN_DSI1 18
|
||||
+#define RPI_POWER_DOMAIN_TRANSPOSER 19
|
||||
+#define RPI_POWER_DOMAIN_CCP2TX 20
|
||||
+#define RPI_POWER_DOMAIN_CDP 21
|
||||
+#define RPI_POWER_DOMAIN_ARM 22
|
||||
+
|
||||
+#define RPI_POWER_DOMAIN_COUNT 23
|
||||
+
|
||||
+#endif /* _DT_BINDINGS_ARM_BCM2835_RPI_POWER_H */
|
||||
--
|
||||
2.3.10
|
||||
|
||||
-443
@@ -1,443 +0,0 @@
|
||||
From 482626063d446eac1809e025a79ad0a7d45bc22d Mon Sep 17 00:00:00 2001
|
||||
From: Eric Anholt <eric@anholt.net>
|
||||
Date: Wed, 16 Dec 2015 13:24:40 -0800
|
||||
Subject: [PATCH 1/4] ARM: bcm2835: Split the DT for peripherals from the DT
|
||||
for the CPU
|
||||
|
||||
The set of peripherals remained constant across bcm2835 (Raspberry Pi
|
||||
1) and bcm2836 (Raspberry Pi 2), but the CPU was swapped out. Split
|
||||
the files so that we can include just peripheral setup in 2836.
|
||||
|
||||
Signed-off-by: Eric Anholt <eric@anholt.net>
|
||||
---
|
||||
arch/arm/boot/dts/bcm2835.dtsi | 194 +-------------------------------------
|
||||
arch/arm/boot/dts/bcm283x.dtsi | 205 +++++++++++++++++++++++++++++++++++++++++
|
||||
2 files changed, 206 insertions(+), 193 deletions(-)
|
||||
create mode 100644 arch/arm/boot/dts/bcm283x.dtsi
|
||||
|
||||
diff --git a/arch/arm/boot/dts/bcm2835.dtsi b/arch/arm/boot/dts/bcm2835.dtsi
|
||||
index aef64de..b83b326 100644
|
||||
--- a/arch/arm/boot/dts/bcm2835.dtsi
|
||||
+++ b/arch/arm/boot/dts/bcm2835.dtsi
|
||||
@@ -1,206 +1,14 @@
|
||||
-#include <dt-bindings/pinctrl/bcm2835.h>
|
||||
-#include <dt-bindings/clock/bcm2835.h>
|
||||
-#include "skeleton.dtsi"
|
||||
+#include "bcm283x.dtsi"
|
||||
|
||||
/ {
|
||||
compatible = "brcm,bcm2835";
|
||||
- model = "BCM2835";
|
||||
- interrupt-parent = <&intc>;
|
||||
-
|
||||
- chosen {
|
||||
- bootargs = "earlyprintk console=ttyAMA0";
|
||||
- };
|
||||
|
||||
soc {
|
||||
- compatible = "simple-bus";
|
||||
- #address-cells = <1>;
|
||||
- #size-cells = <1>;
|
||||
ranges = <0x7e000000 0x20000000 0x02000000>;
|
||||
dma-ranges = <0x40000000 0x00000000 0x20000000>;
|
||||
|
||||
- timer@7e003000 {
|
||||
- compatible = "brcm,bcm2835-system-timer";
|
||||
- reg = <0x7e003000 0x1000>;
|
||||
- interrupts = <1 0>, <1 1>, <1 2>, <1 3>;
|
||||
- /* This could be a reference to BCM2835_CLOCK_TIMER,
|
||||
- * but we don't have the driver using the common clock
|
||||
- * support yet.
|
||||
- */
|
||||
- clock-frequency = <1000000>;
|
||||
- };
|
||||
-
|
||||
- dma: dma@7e007000 {
|
||||
- compatible = "brcm,bcm2835-dma";
|
||||
- reg = <0x7e007000 0xf00>;
|
||||
- interrupts = <1 16>,
|
||||
- <1 17>,
|
||||
- <1 18>,
|
||||
- <1 19>,
|
||||
- <1 20>,
|
||||
- <1 21>,
|
||||
- <1 22>,
|
||||
- <1 23>,
|
||||
- <1 24>,
|
||||
- <1 25>,
|
||||
- <1 26>,
|
||||
- <1 27>,
|
||||
- <1 28>;
|
||||
-
|
||||
- #dma-cells = <1>;
|
||||
- brcm,dma-channel-mask = <0x7f35>;
|
||||
- };
|
||||
-
|
||||
- intc: interrupt-controller@7e00b200 {
|
||||
- compatible = "brcm,bcm2835-armctrl-ic";
|
||||
- reg = <0x7e00b200 0x200>;
|
||||
- interrupt-controller;
|
||||
- #interrupt-cells = <2>;
|
||||
- };
|
||||
-
|
||||
- watchdog@7e100000 {
|
||||
- compatible = "brcm,bcm2835-pm-wdt";
|
||||
- reg = <0x7e100000 0x28>;
|
||||
- };
|
||||
-
|
||||
- clocks: cprman@7e101000 {
|
||||
- compatible = "brcm,bcm2835-cprman";
|
||||
- #clock-cells = <1>;
|
||||
- reg = <0x7e101000 0x2000>;
|
||||
-
|
||||
- /* CPRMAN derives everything from the platform's
|
||||
- * oscillator.
|
||||
- */
|
||||
- clocks = <&clk_osc>;
|
||||
- };
|
||||
-
|
||||
- rng@7e104000 {
|
||||
- compatible = "brcm,bcm2835-rng";
|
||||
- reg = <0x7e104000 0x10>;
|
||||
- };
|
||||
-
|
||||
- mailbox: mailbox@7e00b800 {
|
||||
- compatible = "brcm,bcm2835-mbox";
|
||||
- reg = <0x7e00b880 0x40>;
|
||||
- interrupts = <0 1>;
|
||||
- #mbox-cells = <0>;
|
||||
- };
|
||||
-
|
||||
- gpio: gpio@7e200000 {
|
||||
- compatible = "brcm,bcm2835-gpio";
|
||||
- reg = <0x7e200000 0xb4>;
|
||||
- /*
|
||||
- * The GPIO IP block is designed for 3 banks of GPIOs.
|
||||
- * Each bank has a GPIO interrupt for itself.
|
||||
- * There is an overall "any bank" interrupt.
|
||||
- * In order, these are GIC interrupts 17, 18, 19, 20.
|
||||
- * Since the BCM2835 only has 2 banks, the 2nd bank
|
||||
- * interrupt output appears to be mirrored onto the
|
||||
- * 3rd bank's interrupt signal.
|
||||
- * So, a bank0 interrupt shows up on 17, 20, and
|
||||
- * a bank1 interrupt shows up on 18, 19, 20!
|
||||
- */
|
||||
- interrupts = <2 17>, <2 18>, <2 19>, <2 20>;
|
||||
-
|
||||
- gpio-controller;
|
||||
- #gpio-cells = <2>;
|
||||
-
|
||||
- interrupt-controller;
|
||||
- #interrupt-cells = <2>;
|
||||
- };
|
||||
-
|
||||
- uart0: uart@7e201000 {
|
||||
- compatible = "brcm,bcm2835-pl011", "arm,pl011", "arm,primecell";
|
||||
- reg = <0x7e201000 0x1000>;
|
||||
- interrupts = <2 25>;
|
||||
- clocks = <&clocks BCM2835_CLOCK_UART>,
|
||||
- <&clocks BCM2835_CLOCK_VPU>;
|
||||
- clock-names = "uartclk", "apb_pclk";
|
||||
- arm,primecell-periphid = <0x00241011>;
|
||||
- };
|
||||
-
|
||||
- i2s: i2s@7e203000 {
|
||||
- compatible = "brcm,bcm2835-i2s";
|
||||
- reg = <0x7e203000 0x20>,
|
||||
- <0x7e101098 0x02>;
|
||||
-
|
||||
- dmas = <&dma 2>,
|
||||
- <&dma 3>;
|
||||
- dma-names = "tx", "rx";
|
||||
- status = "disabled";
|
||||
- };
|
||||
-
|
||||
- spi: spi@7e204000 {
|
||||
- compatible = "brcm,bcm2835-spi";
|
||||
- reg = <0x7e204000 0x1000>;
|
||||
- interrupts = <2 22>;
|
||||
- clocks = <&clocks BCM2835_CLOCK_VPU>;
|
||||
- #address-cells = <1>;
|
||||
- #size-cells = <0>;
|
||||
- status = "disabled";
|
||||
- };
|
||||
-
|
||||
- i2c0: i2c@7e205000 {
|
||||
- compatible = "brcm,bcm2835-i2c";
|
||||
- reg = <0x7e205000 0x1000>;
|
||||
- interrupts = <2 21>;
|
||||
- clocks = <&clocks BCM2835_CLOCK_VPU>;
|
||||
- #address-cells = <1>;
|
||||
- #size-cells = <0>;
|
||||
- status = "disabled";
|
||||
- };
|
||||
-
|
||||
- sdhci: sdhci@7e300000 {
|
||||
- compatible = "brcm,bcm2835-sdhci";
|
||||
- reg = <0x7e300000 0x100>;
|
||||
- interrupts = <2 30>;
|
||||
- clocks = <&clocks BCM2835_CLOCK_EMMC>;
|
||||
- status = "disabled";
|
||||
- };
|
||||
-
|
||||
- i2c1: i2c@7e804000 {
|
||||
- compatible = "brcm,bcm2835-i2c";
|
||||
- reg = <0x7e804000 0x1000>;
|
||||
- interrupts = <2 21>;
|
||||
- clocks = <&clocks BCM2835_CLOCK_VPU>;
|
||||
- #address-cells = <1>;
|
||||
- #size-cells = <0>;
|
||||
- status = "disabled";
|
||||
- };
|
||||
-
|
||||
- i2c2: i2c@7e805000 {
|
||||
- compatible = "brcm,bcm2835-i2c";
|
||||
- reg = <0x7e805000 0x1000>;
|
||||
- interrupts = <2 21>;
|
||||
- clocks = <&clocks BCM2835_CLOCK_VPU>;
|
||||
- #address-cells = <1>;
|
||||
- #size-cells = <0>;
|
||||
- status = "disabled";
|
||||
- };
|
||||
-
|
||||
- usb@7e980000 {
|
||||
- compatible = "brcm,bcm2835-usb";
|
||||
- reg = <0x7e980000 0x10000>;
|
||||
- interrupts = <1 9>;
|
||||
- };
|
||||
-
|
||||
arm-pmu {
|
||||
compatible = "arm,arm1176-pmu";
|
||||
};
|
||||
};
|
||||
-
|
||||
- clocks {
|
||||
- compatible = "simple-bus";
|
||||
- #address-cells = <1>;
|
||||
- #size-cells = <0>;
|
||||
-
|
||||
- /* The oscillator is the root of the clock tree. */
|
||||
- clk_osc: clock@3 {
|
||||
- compatible = "fixed-clock";
|
||||
- reg = <3>;
|
||||
- #clock-cells = <0>;
|
||||
- clock-output-names = "osc";
|
||||
- clock-frequency = <19200000>;
|
||||
- };
|
||||
-
|
||||
- };
|
||||
};
|
||||
diff --git a/arch/arm/boot/dts/bcm283x.dtsi b/arch/arm/boot/dts/bcm283x.dtsi
|
||||
new file mode 100644
|
||||
index 0000000..8a7e727
|
||||
--- /dev/null
|
||||
+++ b/arch/arm/boot/dts/bcm283x.dtsi
|
||||
@@ -0,0 +1,205 @@
|
||||
+#include <dt-bindings/pinctrl/bcm2835.h>
|
||||
+#include <dt-bindings/clock/bcm2835.h>
|
||||
+#include "skeleton.dtsi"
|
||||
+
|
||||
+/* This include file covers the common peripherals and configuration between
|
||||
+ * bcm2835 and bcm2836 implementations, leaving the CPU configuration to
|
||||
+ * bcm2835.dtsi and bcm2836.dtsi.
|
||||
+ */
|
||||
+
|
||||
+/ {
|
||||
+ compatible = "brcm,bcm2835";
|
||||
+ model = "BCM2835";
|
||||
+ interrupt-parent = <&intc>;
|
||||
+
|
||||
+ chosen {
|
||||
+ bootargs = "earlyprintk console=ttyAMA0";
|
||||
+ };
|
||||
+
|
||||
+ soc {
|
||||
+ compatible = "simple-bus";
|
||||
+ #address-cells = <1>;
|
||||
+ #size-cells = <1>;
|
||||
+
|
||||
+ timer@7e003000 {
|
||||
+ compatible = "brcm,bcm2835-system-timer";
|
||||
+ reg = <0x7e003000 0x1000>;
|
||||
+ interrupts = <1 0>, <1 1>, <1 2>, <1 3>;
|
||||
+ /* This could be a reference to BCM2835_CLOCK_TIMER,
|
||||
+ * but we don't have the driver using the common clock
|
||||
+ * support yet.
|
||||
+ */
|
||||
+ clock-frequency = <1000000>;
|
||||
+ };
|
||||
+
|
||||
+ dma: dma@7e007000 {
|
||||
+ compatible = "brcm,bcm2835-dma";
|
||||
+ reg = <0x7e007000 0xf00>;
|
||||
+ interrupts = <1 16>,
|
||||
+ <1 17>,
|
||||
+ <1 18>,
|
||||
+ <1 19>,
|
||||
+ <1 20>,
|
||||
+ <1 21>,
|
||||
+ <1 22>,
|
||||
+ <1 23>,
|
||||
+ <1 24>,
|
||||
+ <1 25>,
|
||||
+ <1 26>,
|
||||
+ <1 27>,
|
||||
+ <1 28>;
|
||||
+
|
||||
+ #dma-cells = <1>;
|
||||
+ brcm,dma-channel-mask = <0x7f35>;
|
||||
+ };
|
||||
+
|
||||
+ intc: interrupt-controller@7e00b200 {
|
||||
+ compatible = "brcm,bcm2835-armctrl-ic";
|
||||
+ reg = <0x7e00b200 0x200>;
|
||||
+ interrupt-controller;
|
||||
+ #interrupt-cells = <2>;
|
||||
+ };
|
||||
+
|
||||
+ watchdog@7e100000 {
|
||||
+ compatible = "brcm,bcm2835-pm-wdt";
|
||||
+ reg = <0x7e100000 0x28>;
|
||||
+ };
|
||||
+
|
||||
+ clocks: cprman@7e101000 {
|
||||
+ compatible = "brcm,bcm2835-cprman";
|
||||
+ #clock-cells = <1>;
|
||||
+ reg = <0x7e101000 0x2000>;
|
||||
+
|
||||
+ /* CPRMAN derives everything from the platform's
|
||||
+ * oscillator.
|
||||
+ */
|
||||
+ clocks = <&clk_osc>;
|
||||
+ };
|
||||
+
|
||||
+ rng@7e104000 {
|
||||
+ compatible = "brcm,bcm2835-rng";
|
||||
+ reg = <0x7e104000 0x10>;
|
||||
+ };
|
||||
+
|
||||
+ mailbox: mailbox@7e00b800 {
|
||||
+ compatible = "brcm,bcm2835-mbox";
|
||||
+ reg = <0x7e00b880 0x40>;
|
||||
+ interrupts = <0 1>;
|
||||
+ #mbox-cells = <0>;
|
||||
+ };
|
||||
+
|
||||
+ gpio: gpio@7e200000 {
|
||||
+ compatible = "brcm,bcm2835-gpio";
|
||||
+ reg = <0x7e200000 0xb4>;
|
||||
+ /*
|
||||
+ * The GPIO IP block is designed for 3 banks of GPIOs.
|
||||
+ * Each bank has a GPIO interrupt for itself.
|
||||
+ * There is an overall "any bank" interrupt.
|
||||
+ * In order, these are GIC interrupts 17, 18, 19, 20.
|
||||
+ * Since the BCM2835 only has 2 banks, the 2nd bank
|
||||
+ * interrupt output appears to be mirrored onto the
|
||||
+ * 3rd bank's interrupt signal.
|
||||
+ * So, a bank0 interrupt shows up on 17, 20, and
|
||||
+ * a bank1 interrupt shows up on 18, 19, 20!
|
||||
+ */
|
||||
+ interrupts = <2 17>, <2 18>, <2 19>, <2 20>;
|
||||
+
|
||||
+ gpio-controller;
|
||||
+ #gpio-cells = <2>;
|
||||
+
|
||||
+ interrupt-controller;
|
||||
+ #interrupt-cells = <2>;
|
||||
+ };
|
||||
+
|
||||
+ uart0: uart@7e201000 {
|
||||
+ compatible = "brcm,bcm2835-pl011", "arm,pl011", "arm,primecell";
|
||||
+ reg = <0x7e201000 0x1000>;
|
||||
+ interrupts = <2 25>;
|
||||
+ clocks = <&clocks BCM2835_CLOCK_UART>,
|
||||
+ <&clocks BCM2835_CLOCK_VPU>;
|
||||
+ clock-names = "uartclk", "apb_pclk";
|
||||
+ arm,primecell-periphid = <0x00241011>;
|
||||
+ };
|
||||
+
|
||||
+ i2s: i2s@7e203000 {
|
||||
+ compatible = "brcm,bcm2835-i2s";
|
||||
+ reg = <0x7e203000 0x20>,
|
||||
+ <0x7e101098 0x02>;
|
||||
+
|
||||
+ dmas = <&dma 2>,
|
||||
+ <&dma 3>;
|
||||
+ dma-names = "tx", "rx";
|
||||
+ status = "disabled";
|
||||
+ };
|
||||
+
|
||||
+ spi: spi@7e204000 {
|
||||
+ compatible = "brcm,bcm2835-spi";
|
||||
+ reg = <0x7e204000 0x1000>;
|
||||
+ interrupts = <2 22>;
|
||||
+ clocks = <&clocks BCM2835_CLOCK_VPU>;
|
||||
+ #address-cells = <1>;
|
||||
+ #size-cells = <0>;
|
||||
+ status = "disabled";
|
||||
+ };
|
||||
+
|
||||
+ i2c0: i2c@7e205000 {
|
||||
+ compatible = "brcm,bcm2835-i2c";
|
||||
+ reg = <0x7e205000 0x1000>;
|
||||
+ interrupts = <2 21>;
|
||||
+ clocks = <&clocks BCM2835_CLOCK_VPU>;
|
||||
+ #address-cells = <1>;
|
||||
+ #size-cells = <0>;
|
||||
+ status = "disabled";
|
||||
+ };
|
||||
+
|
||||
+ sdhci: sdhci@7e300000 {
|
||||
+ compatible = "brcm,bcm2835-sdhci";
|
||||
+ reg = <0x7e300000 0x100>;
|
||||
+ interrupts = <2 30>;
|
||||
+ clocks = <&clocks BCM2835_CLOCK_EMMC>;
|
||||
+ status = "disabled";
|
||||
+ };
|
||||
+
|
||||
+ i2c1: i2c@7e804000 {
|
||||
+ compatible = "brcm,bcm2835-i2c";
|
||||
+ reg = <0x7e804000 0x1000>;
|
||||
+ interrupts = <2 21>;
|
||||
+ clocks = <&clocks BCM2835_CLOCK_VPU>;
|
||||
+ #address-cells = <1>;
|
||||
+ #size-cells = <0>;
|
||||
+ status = "disabled";
|
||||
+ };
|
||||
+
|
||||
+ i2c2: i2c@7e805000 {
|
||||
+ compatible = "brcm,bcm2835-i2c";
|
||||
+ reg = <0x7e805000 0x1000>;
|
||||
+ interrupts = <2 21>;
|
||||
+ clocks = <&clocks BCM2835_CLOCK_VPU>;
|
||||
+ #address-cells = <1>;
|
||||
+ #size-cells = <0>;
|
||||
+ status = "disabled";
|
||||
+ };
|
||||
+
|
||||
+ usb@7e980000 {
|
||||
+ compatible = "brcm,bcm2835-usb";
|
||||
+ reg = <0x7e980000 0x10000>;
|
||||
+ interrupts = <1 9>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ clocks {
|
||||
+ compatible = "simple-bus";
|
||||
+ #address-cells = <1>;
|
||||
+ #size-cells = <0>;
|
||||
+
|
||||
+ /* The oscillator is the root of the clock tree. */
|
||||
+ clk_osc: clock@3 {
|
||||
+ compatible = "fixed-clock";
|
||||
+ reg = <3>;
|
||||
+ #clock-cells = <0>;
|
||||
+ clock-output-names = "osc";
|
||||
+ clock-frequency = <19200000>;
|
||||
+ };
|
||||
+
|
||||
+ };
|
||||
+};
|
||||
--
|
||||
2.3.10
|
||||
|
||||
-71
@@ -1,71 +0,0 @@
|
||||
From bafa68c08c33ddde3bc10d2d7e5d3b77b4a6c8ed Mon Sep 17 00:00:00 2001
|
||||
From: Eric Anholt <eric@anholt.net>
|
||||
Date: Wed, 16 Dec 2015 15:55:12 -0800
|
||||
Subject: [PATCH 2/4] ARM: bcm2835: Move the CPU/peripheral include out of
|
||||
common RPi DT.
|
||||
|
||||
For Raspberry Pi 2, we want to use the same general pin assignment
|
||||
bits, but need to use bcm2836.dtsi for the CPU instead.
|
||||
|
||||
Signed-off-by: Eric Anholt <eric@anholt.net>
|
||||
---
|
||||
arch/arm/boot/dts/bcm2835-rpi-a-plus.dts | 1 +
|
||||
arch/arm/boot/dts/bcm2835-rpi-b-plus.dts | 1 +
|
||||
arch/arm/boot/dts/bcm2835-rpi-b-rev2.dts | 1 +
|
||||
arch/arm/boot/dts/bcm2835-rpi-b.dts | 1 +
|
||||
arch/arm/boot/dts/bcm2835-rpi.dtsi | 2 --
|
||||
5 files changed, 4 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/arch/arm/boot/dts/bcm2835-rpi-a-plus.dts b/arch/arm/boot/dts/bcm2835-rpi-a-plus.dts
|
||||
index b2bff43..228614f 100644
|
||||
--- a/arch/arm/boot/dts/bcm2835-rpi-a-plus.dts
|
||||
+++ b/arch/arm/boot/dts/bcm2835-rpi-a-plus.dts
|
||||
@@ -1,4 +1,5 @@
|
||||
/dts-v1/;
|
||||
+#include "bcm2835.dtsi"
|
||||
#include "bcm2835-rpi.dtsi"
|
||||
|
||||
/ {
|
||||
diff --git a/arch/arm/boot/dts/bcm2835-rpi-b-plus.dts b/arch/arm/boot/dts/bcm2835-rpi-b-plus.dts
|
||||
index 668442b..ef54050 100644
|
||||
--- a/arch/arm/boot/dts/bcm2835-rpi-b-plus.dts
|
||||
+++ b/arch/arm/boot/dts/bcm2835-rpi-b-plus.dts
|
||||
@@ -1,4 +1,5 @@
|
||||
/dts-v1/;
|
||||
+#include "bcm2835.dtsi"
|
||||
#include "bcm2835-rpi.dtsi"
|
||||
|
||||
/ {
|
||||
diff --git a/arch/arm/boot/dts/bcm2835-rpi-b-rev2.dts b/arch/arm/boot/dts/bcm2835-rpi-b-rev2.dts
|
||||
index eab8b591..86f1f2f 100644
|
||||
--- a/arch/arm/boot/dts/bcm2835-rpi-b-rev2.dts
|
||||
+++ b/arch/arm/boot/dts/bcm2835-rpi-b-rev2.dts
|
||||
@@ -1,4 +1,5 @@
|
||||
/dts-v1/;
|
||||
+#include "bcm2835.dtsi"
|
||||
#include "bcm2835-rpi.dtsi"
|
||||
|
||||
/ {
|
||||
diff --git a/arch/arm/boot/dts/bcm2835-rpi-b.dts b/arch/arm/boot/dts/bcm2835-rpi-b.dts
|
||||
index ff6b2d1..4859e9d 100644
|
||||
--- a/arch/arm/boot/dts/bcm2835-rpi-b.dts
|
||||
+++ b/arch/arm/boot/dts/bcm2835-rpi-b.dts
|
||||
@@ -1,4 +1,5 @@
|
||||
/dts-v1/;
|
||||
+#include "bcm2835.dtsi"
|
||||
#include "bcm2835-rpi.dtsi"
|
||||
|
||||
/ {
|
||||
diff --git a/arch/arm/boot/dts/bcm2835-rpi.dtsi b/arch/arm/boot/dts/bcm2835-rpi.dtsi
|
||||
index 3572f03..3afb9fe 100644
|
||||
--- a/arch/arm/boot/dts/bcm2835-rpi.dtsi
|
||||
+++ b/arch/arm/boot/dts/bcm2835-rpi.dtsi
|
||||
@@ -1,5 +1,3 @@
|
||||
-#include "bcm2835.dtsi"
|
||||
-
|
||||
/ {
|
||||
memory {
|
||||
reg = <0 0x10000000>;
|
||||
--
|
||||
2.3.10
|
||||
|
||||
-160
@@ -1,160 +0,0 @@
|
||||
From c33319cd945001741d1b381655c8b7310d756163 Mon Sep 17 00:00:00 2001
|
||||
From: Eric Anholt <eric@anholt.net>
|
||||
Date: Thu, 16 Apr 2015 15:26:45 -0700
|
||||
Subject: [PATCH 3/4] ARM: bcm2835: Add devicetree for bcm2836 and Raspberry Pi
|
||||
2 B
|
||||
|
||||
The Pi 2 B ends up like a Pi 1 B+, with the same peripherals and
|
||||
pinout, but the CPU and memory layout changed to use the 2836.
|
||||
|
||||
Signed-off-by: Eric Anholt <eric@anholt.net>
|
||||
---
|
||||
arch/arm/boot/dts/Makefile | 3 +-
|
||||
arch/arm/boot/dts/bcm2836-rpi-2-b.dts | 35 ++++++++++++++++
|
||||
arch/arm/boot/dts/bcm2836.dtsi | 78 +++++++++++++++++++++++++++++++++++
|
||||
3 files changed, 115 insertions(+), 1 deletion(-)
|
||||
create mode 100644 arch/arm/boot/dts/bcm2836-rpi-2-b.dts
|
||||
create mode 100644 arch/arm/boot/dts/bcm2836.dtsi
|
||||
|
||||
diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
|
||||
index 30bbc37..54e8f6b 100644
|
||||
--- a/arch/arm/boot/dts/Makefile
|
||||
+++ b/arch/arm/boot/dts/Makefile
|
||||
@@ -60,7 +60,8 @@ dtb-$(CONFIG_ARCH_BCM2835) += \
|
||||
bcm2835-rpi-b.dtb \
|
||||
bcm2835-rpi-b-rev2.dtb \
|
||||
bcm2835-rpi-b-plus.dtb \
|
||||
- bcm2835-rpi-a-plus.dtb
|
||||
+ bcm2835-rpi-a-plus.dtb \
|
||||
+ bcm2836-rpi-2-b.dtb
|
||||
dtb-$(CONFIG_ARCH_BCM_5301X) += \
|
||||
bcm4708-asus-rt-ac56u.dtb \
|
||||
bcm4708-asus-rt-ac68u.dtb \
|
||||
diff --git a/arch/arm/boot/dts/bcm2836-rpi-2-b.dts b/arch/arm/boot/dts/bcm2836-rpi-2-b.dts
|
||||
new file mode 100644
|
||||
index 0000000..ff94666
|
||||
--- /dev/null
|
||||
+++ b/arch/arm/boot/dts/bcm2836-rpi-2-b.dts
|
||||
@@ -0,0 +1,35 @@
|
||||
+/dts-v1/;
|
||||
+#include "bcm2836.dtsi"
|
||||
+#include "bcm2835-rpi.dtsi"
|
||||
+
|
||||
+/ {
|
||||
+ compatible = "raspberrypi,2-model-b", "brcm,bcm2836";
|
||||
+ model = "Raspberry Pi 2 Model B";
|
||||
+
|
||||
+ memory {
|
||||
+ reg = <0 0x40000000>;
|
||||
+ };
|
||||
+
|
||||
+ leds {
|
||||
+ act {
|
||||
+ gpios = <&gpio 47 0>;
|
||||
+ };
|
||||
+
|
||||
+ pwr {
|
||||
+ label = "PWR";
|
||||
+ gpios = <&gpio 35 0>;
|
||||
+ default-state = "keep";
|
||||
+ linux,default-trigger = "default-on";
|
||||
+ };
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&gpio {
|
||||
+ pinctrl-0 = <&gpioout &alt0 &i2s_alt0 &alt3>;
|
||||
+
|
||||
+ /* I2S interface */
|
||||
+ i2s_alt0: i2s_alt0 {
|
||||
+ brcm,pins = <18 19 20 21>;
|
||||
+ brcm,function = <BCM2835_FSEL_ALT0>;
|
||||
+ };
|
||||
+};
|
||||
diff --git a/arch/arm/boot/dts/bcm2836.dtsi b/arch/arm/boot/dts/bcm2836.dtsi
|
||||
new file mode 100644
|
||||
index 0000000..9d0651d
|
||||
--- /dev/null
|
||||
+++ b/arch/arm/boot/dts/bcm2836.dtsi
|
||||
@@ -0,0 +1,78 @@
|
||||
+#include "bcm283x.dtsi"
|
||||
+
|
||||
+/ {
|
||||
+ compatible = "brcm,bcm2836";
|
||||
+
|
||||
+ soc {
|
||||
+ ranges = <0x7e000000 0x3f000000 0x1000000>,
|
||||
+ <0x40000000 0x40000000 0x00001000>;
|
||||
+ dma-ranges = <0xc0000000 0x00000000 0x3f000000>;
|
||||
+
|
||||
+ local_intc: local_intc {
|
||||
+ compatible = "brcm,bcm2836-l1-intc";
|
||||
+ reg = <0x40000000 0x100>;
|
||||
+ interrupt-controller;
|
||||
+ #interrupt-cells = <1>;
|
||||
+ interrupt-parent = <&local_intc>;
|
||||
+ };
|
||||
+
|
||||
+ arm-pmu {
|
||||
+ compatible = "arm,cortex-a7-pmu";
|
||||
+ interrupt-parent = <&local_intc>;
|
||||
+ interrupts = <9>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ timer {
|
||||
+ compatible = "arm,armv7-timer";
|
||||
+ interrupt-parent = <&local_intc>;
|
||||
+ interrupts = <0>, // PHYS_SECURE_PPI
|
||||
+ <1>, // PHYS_NONSECURE_PPI
|
||||
+ <3>, // VIRT_PPI
|
||||
+ <2>; // HYP_PPI
|
||||
+ always-on;
|
||||
+ };
|
||||
+
|
||||
+ cpus: cpus {
|
||||
+ #address-cells = <1>;
|
||||
+ #size-cells = <0>;
|
||||
+
|
||||
+ v7_cpu0: cpu@0 {
|
||||
+ device_type = "cpu";
|
||||
+ compatible = "arm,cortex-a7";
|
||||
+ reg = <0xf00>;
|
||||
+ clock-frequency = <800000000>;
|
||||
+ };
|
||||
+
|
||||
+ v7_cpu1: cpu@1 {
|
||||
+ device_type = "cpu";
|
||||
+ compatible = "arm,cortex-a7";
|
||||
+ reg = <0xf01>;
|
||||
+ clock-frequency = <800000000>;
|
||||
+ };
|
||||
+
|
||||
+ v7_cpu2: cpu@2 {
|
||||
+ device_type = "cpu";
|
||||
+ compatible = "arm,cortex-a7";
|
||||
+ reg = <0xf02>;
|
||||
+ clock-frequency = <800000000>;
|
||||
+ };
|
||||
+
|
||||
+ v7_cpu3: cpu@3 {
|
||||
+ device_type = "cpu";
|
||||
+ compatible = "arm,cortex-a7";
|
||||
+ reg = <0xf03>;
|
||||
+ clock-frequency = <800000000>;
|
||||
+ };
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+/* Make the BCM2835-style global interrupt controller be a child of the
|
||||
+ * CPU-local interrupt controller.
|
||||
+ */
|
||||
+&intc {
|
||||
+ compatible = "brcm,bcm2836-armctrl-ic";
|
||||
+ reg = <0x7e00b200 0x200>;
|
||||
+ interrupt-parent = <&local_intc>;
|
||||
+ interrupts = <8>;
|
||||
+};
|
||||
--
|
||||
2.3.10
|
||||
|
||||
-34
@@ -1,34 +0,0 @@
|
||||
From 53b6084357a44d7c34044504e1bf149d9156934f Mon Sep 17 00:00:00 2001
|
||||
From: Eric Anholt <eric@anholt.net>
|
||||
Date: Tue, 15 Dec 2015 15:35:59 -0800
|
||||
Subject: [PATCH 4/4] ARM: bcm2835: Add the auxiliary clocks to the device
|
||||
tree.
|
||||
|
||||
These will be used for enabling UART1, SPI1, and SPI2.
|
||||
|
||||
Signed-off-by: Eric Anholt <eric@anholt.net>
|
||||
---
|
||||
arch/arm/boot/dts/bcm283x.dtsi | 7 +++++++
|
||||
1 file changed, 7 insertions(+)
|
||||
|
||||
diff --git a/arch/arm/boot/dts/bcm283x.dtsi b/arch/arm/boot/dts/bcm283x.dtsi
|
||||
index 8a7e727..971e741 100644
|
||||
--- a/arch/arm/boot/dts/bcm283x.dtsi
|
||||
+++ b/arch/arm/boot/dts/bcm283x.dtsi
|
||||
@@ -152,6 +152,13 @@
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
+ aux: aux@0x7e215000 {
|
||||
+ compatible = "brcm,bcm2835-aux";
|
||||
+ #clock-cells = <1>;
|
||||
+ reg = <0x7e215000 0x8>;
|
||||
+ clocks = <&clocks BCM2835_CLOCK_VPU>;
|
||||
+ };
|
||||
+
|
||||
sdhci: sdhci@7e300000 {
|
||||
compatible = "brcm,bcm2835-sdhci";
|
||||
reg = <0x7e300000 0x100>;
|
||||
--
|
||||
2.3.10
|
||||
|
||||
-132
@@ -1,132 +0,0 @@
|
||||
From 8c821c590f791ade672609c2f59b1ce0af750653 Mon Sep 17 00:00:00 2001
|
||||
From: Stefan Wahren <stefan.wahren@i2se.com>
|
||||
Date: Tue, 27 Oct 2015 19:08:58 +0100
|
||||
Subject: [PATCH 1/2] ARM: bcm2835: enable all bcm2835-relevant in defconfig
|
||||
|
||||
Rebuild bcm2835_defconfig using "make bcm2835_defconfig;
|
||||
make savedefconfig", and enable manually the following features:
|
||||
|
||||
* all bcm2835-relevant drivers (MBOX, WDT, DMA, PWM, SND)
|
||||
* enable regular stackprotector because CONFIG_CC_STACKPROTECTOR
|
||||
disappear
|
||||
* enable some new dependencies in order to keep LED heartbeat
|
||||
( CONFIG_NEW_LEDS, CONFIG_LEDS_CLASS, CONFIG_LEDS_TRIGGERS )
|
||||
|
||||
The following options were removed, because they are enabled implicit:
|
||||
|
||||
CONFIG_RD_BZIP2, CONFIG_RD_LZMA, CONFIG_RD_XZ, CONFIG_RD_LZO,
|
||||
CONFIG_USB_DWC2_HOST, CONFIG_EXT4_FS, CONFIG_EXT4_FS_POSIX_ACL
|
||||
|
||||
These options became obsolete:
|
||||
|
||||
CONFIG_RESOURCE_COUNTERS, CONFIG_SCSI_MULTI_LUN
|
||||
|
||||
Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
|
||||
Signed-off-by: Eric Anholt <eric@anholt.net>
|
||||
Acked-by: Stephen Warren <swarren@wwwdotorg.org>
|
||||
---
|
||||
arch/arm/configs/bcm2835_defconfig | 28 +++++++++++++++++-----------
|
||||
1 file changed, 17 insertions(+), 11 deletions(-)
|
||||
|
||||
diff --git a/arch/arm/configs/bcm2835_defconfig b/arch/arm/configs/bcm2835_defconfig
|
||||
index 31cb073..0fda844 100644
|
||||
--- a/arch/arm/configs/bcm2835_defconfig
|
||||
+++ b/arch/arm/configs/bcm2835_defconfig
|
||||
@@ -10,7 +10,6 @@ CONFIG_CGROUP_FREEZER=y
|
||||
CONFIG_CGROUP_DEVICE=y
|
||||
CONFIG_CPUSETS=y
|
||||
CONFIG_CGROUP_CPUACCT=y
|
||||
-CONFIG_RESOURCE_COUNTERS=y
|
||||
CONFIG_CGROUP_PERF=y
|
||||
CONFIG_CFS_BANDWIDTH=y
|
||||
CONFIG_RT_GROUP_SCHED=y
|
||||
@@ -18,10 +17,6 @@ CONFIG_NAMESPACES=y
|
||||
CONFIG_SCHED_AUTOGROUP=y
|
||||
CONFIG_RELAY=y
|
||||
CONFIG_BLK_DEV_INITRD=y
|
||||
-CONFIG_RD_BZIP2=y
|
||||
-CONFIG_RD_LZMA=y
|
||||
-CONFIG_RD_XZ=y
|
||||
-CONFIG_RD_LZO=y
|
||||
CONFIG_CC_OPTIMIZE_FOR_SIZE=y
|
||||
CONFIG_KALLSYMS_ALL=y
|
||||
CONFIG_EMBEDDED=y
|
||||
@@ -29,6 +24,7 @@ CONFIG_EMBEDDED=y
|
||||
CONFIG_PROFILING=y
|
||||
CONFIG_OPROFILE=y
|
||||
CONFIG_JUMP_LABEL=y
|
||||
+CONFIG_CC_STACKPROTECTOR_REGULAR=y
|
||||
CONFIG_ARCH_MULTI_V6=y
|
||||
# CONFIG_ARCH_MULTI_V7 is not set
|
||||
CONFIG_ARCH_BCM=y
|
||||
@@ -38,7 +34,6 @@ CONFIG_AEABI=y
|
||||
CONFIG_KSM=y
|
||||
CONFIG_CLEANCACHE=y
|
||||
CONFIG_SECCOMP=y
|
||||
-CONFIG_CC_STACKPROTECTOR=y
|
||||
CONFIG_KEXEC=y
|
||||
CONFIG_CRASH_DUMP=y
|
||||
CONFIG_VFP=y
|
||||
@@ -57,7 +52,6 @@ CONFIG_DEVTMPFS_MOUNT=y
|
||||
# CONFIG_STANDALONE is not set
|
||||
CONFIG_SCSI=y
|
||||
CONFIG_BLK_DEV_SD=y
|
||||
-CONFIG_SCSI_MULTI_LUN=y
|
||||
CONFIG_SCSI_CONSTANTS=y
|
||||
CONFIG_SCSI_SCAN_ASYNC=y
|
||||
CONFIG_NETDEVICES=y
|
||||
@@ -77,17 +71,27 @@ CONFIG_SPI=y
|
||||
CONFIG_SPI_BCM2835=y
|
||||
CONFIG_GPIO_SYSFS=y
|
||||
# CONFIG_HWMON is not set
|
||||
+CONFIG_WATCHDOG=y
|
||||
+CONFIG_BCM2835_WDT=y
|
||||
CONFIG_FB=y
|
||||
CONFIG_FB_SIMPLE=y
|
||||
CONFIG_FRAMEBUFFER_CONSOLE=y
|
||||
CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY=y
|
||||
+CONFIG_SOUND=y
|
||||
+CONFIG_SND=y
|
||||
+CONFIG_SND_SOC=y
|
||||
+CONFIG_SND_BCM2835_SOC_I2S=y
|
||||
CONFIG_USB=y
|
||||
CONFIG_USB_STORAGE=y
|
||||
+CONFIG_USB_DWC2=y
|
||||
CONFIG_MMC=y
|
||||
CONFIG_MMC_SDHCI=y
|
||||
CONFIG_MMC_SDHCI_PLTFM=y
|
||||
CONFIG_MMC_SDHCI_BCM2835=y
|
||||
+CONFIG_NEW_LEDS=y
|
||||
+CONFIG_LEDS_CLASS=y
|
||||
CONFIG_LEDS_GPIO=y
|
||||
+CONFIG_LEDS_TRIGGERS=y
|
||||
CONFIG_LEDS_TRIGGER_TIMER=y
|
||||
CONFIG_LEDS_TRIGGER_ONESHOT=y
|
||||
CONFIG_LEDS_TRIGGER_HEARTBEAT=y
|
||||
@@ -96,17 +100,19 @@ CONFIG_LEDS_TRIGGER_GPIO=y
|
||||
CONFIG_LEDS_TRIGGER_DEFAULT_ON=y
|
||||
CONFIG_LEDS_TRIGGER_TRANSIENT=y
|
||||
CONFIG_LEDS_TRIGGER_CAMERA=y
|
||||
+CONFIG_DMADEVICES=y
|
||||
+CONFIG_DMA_BCM2835=y
|
||||
CONFIG_STAGING=y
|
||||
-CONFIG_USB_DWC2=y
|
||||
-CONFIG_USB_DWC2_HOST=y
|
||||
+CONFIG_MAILBOX=y
|
||||
+CONFIG_BCM2835_MBOX=y
|
||||
# CONFIG_IOMMU_SUPPORT is not set
|
||||
+CONFIG_PWM=y
|
||||
+CONFIG_PWM_BCM2835=y
|
||||
CONFIG_EXT2_FS=y
|
||||
CONFIG_EXT2_FS_XATTR=y
|
||||
CONFIG_EXT2_FS_POSIX_ACL=y
|
||||
CONFIG_EXT3_FS=y
|
||||
CONFIG_EXT3_FS_POSIX_ACL=y
|
||||
-CONFIG_EXT4_FS=y
|
||||
-CONFIG_EXT4_FS_POSIX_ACL=y
|
||||
CONFIG_FANOTIFY=y
|
||||
CONFIG_MSDOS_FS=y
|
||||
CONFIG_VFAT_FS=y
|
||||
--
|
||||
2.3.10
|
||||
|
||||
-28
@@ -1,28 +0,0 @@
|
||||
From b63074fccbeb81e46b2553a200de54ff3bfadd10 Mon Sep 17 00:00:00 2001
|
||||
From: Martin Sperl <kernel@martin.sperl.org>
|
||||
Date: Fri, 11 Sep 2015 11:22:06 +0000
|
||||
Subject: [PATCH 2/2] ARM: bcm2835: enable auxiliary spi driver in defconfig
|
||||
|
||||
add the auxiliary spi driver to the default config
|
||||
|
||||
Signed-off-by: Martin Sperl <kernel@martin.sperl.org>
|
||||
Signed-off-by: Eric Anholt <eric@anholt.net>
|
||||
---
|
||||
arch/arm/configs/bcm2835_defconfig | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/arch/arm/configs/bcm2835_defconfig b/arch/arm/configs/bcm2835_defconfig
|
||||
index 0fda844..72def20 100644
|
||||
--- a/arch/arm/configs/bcm2835_defconfig
|
||||
+++ b/arch/arm/configs/bcm2835_defconfig
|
||||
@@ -69,6 +69,7 @@ CONFIG_I2C_CHARDEV=y
|
||||
CONFIG_I2C_BCM2835=y
|
||||
CONFIG_SPI=y
|
||||
CONFIG_SPI_BCM2835=y
|
||||
+CONFIG_SPI_BCM2835AUX=y
|
||||
CONFIG_GPIO_SYSFS=y
|
||||
# CONFIG_HWMON is not set
|
||||
CONFIG_WATCHDOG=y
|
||||
--
|
||||
2.3.10
|
||||
|
||||
+60
@@ -0,0 +1,60 @@
|
||||
From 6b7e9cde49691e04314342b7dce90c67ad567fcc Mon Sep 17 00:00:00 2001
|
||||
From: "Martin K. Petersen" <martin.petersen@oracle.com>
|
||||
Date: Thu, 12 May 2016 22:17:34 -0400
|
||||
Subject: [PATCH] sd: Fix rw_max for devices that report an optimal xfer size
|
||||
|
||||
For historic reasons, io_opt is in bytes and max_sectors in block layer
|
||||
sectors. This interface inconsistency is error prone and should be
|
||||
fixed. But for 4.4--4.7 let's make the unit difference explicit via a
|
||||
wrapper function.
|
||||
|
||||
Fixes: d0eb20a863ba ("sd: Optimal I/O size is in bytes, not sectors")
|
||||
Cc: stable@vger.kernel.org # 4.4+
|
||||
Reported-by: Fam Zheng <famz@redhat.com>
|
||||
Reviewed-by: Bart Van Assche <bart.vanassche@sandisk.com>
|
||||
Reviewed-by: Christoph Hellwig <hch@lst.de>
|
||||
Tested-by: Andrew Patterson <andrew.patterson@hpe.com>
|
||||
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
|
||||
---
|
||||
drivers/scsi/sd.c | 8 ++++----
|
||||
drivers/scsi/sd.h | 5 +++++
|
||||
2 files changed, 9 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/drivers/scsi/sd.c b/drivers/scsi/sd.c
|
||||
index f459dff..60bff78 100644
|
||||
--- a/drivers/scsi/sd.c
|
||||
+++ b/drivers/scsi/sd.c
|
||||
@@ -2867,10 +2867,10 @@ static int sd_revalidate_disk(struct gendisk *disk)
|
||||
if (sdkp->opt_xfer_blocks &&
|
||||
sdkp->opt_xfer_blocks <= dev_max &&
|
||||
sdkp->opt_xfer_blocks <= SD_DEF_XFER_BLOCKS &&
|
||||
- sdkp->opt_xfer_blocks * sdp->sector_size >= PAGE_SIZE)
|
||||
- rw_max = q->limits.io_opt =
|
||||
- sdkp->opt_xfer_blocks * sdp->sector_size;
|
||||
- else
|
||||
+ logical_to_bytes(sdp, sdkp->opt_xfer_blocks) >= PAGE_SIZE) {
|
||||
+ q->limits.io_opt = logical_to_bytes(sdp, sdkp->opt_xfer_blocks);
|
||||
+ rw_max = logical_to_sectors(sdp, sdkp->opt_xfer_blocks);
|
||||
+ } else
|
||||
rw_max = BLK_DEF_MAX_SECTORS;
|
||||
|
||||
/* Combine with controller limits */
|
||||
diff --git a/drivers/scsi/sd.h b/drivers/scsi/sd.h
|
||||
index 654630b..765a6f1 100644
|
||||
--- a/drivers/scsi/sd.h
|
||||
+++ b/drivers/scsi/sd.h
|
||||
@@ -151,6 +151,11 @@ static inline sector_t logical_to_sectors(struct scsi_device *sdev, sector_t blo
|
||||
return blocks << (ilog2(sdev->sector_size) - 9);
|
||||
}
|
||||
|
||||
+static inline unsigned int logical_to_bytes(struct scsi_device *sdev, sector_t blocks)
|
||||
+{
|
||||
+ return blocks * sdev->sector_size;
|
||||
+}
|
||||
+
|
||||
/*
|
||||
* A DIF-capable target device can be formatted with different
|
||||
* protection schemes. Currently 0 through 3 are defined:
|
||||
--
|
||||
2.9.0
|
||||
|
||||
+64
-64
@@ -17,9 +17,9 @@
|
||||
security/security.c | 10 ++++++++++
|
||||
16 files changed, 40 insertions(+), 1 deletion(-)
|
||||
|
||||
diff -Nurp linux-4.4.3-aufs/fs/aufs/Kconfig linux-4.4.3-aufs-mod/fs/aufs/Kconfig
|
||||
--- linux-4.4.3-aufs/fs/aufs/Kconfig 2016-03-02 17:59:37.360498681 +0200
|
||||
+++ linux-4.4.3-aufs-mod/fs/aufs/Kconfig 2016-03-03 09:50:41.232631276 +0200
|
||||
diff -Nurp linux-4.6-aufs/fs/aufs/Kconfig linux-4.6-aufs-mod/fs/aufs/Kconfig
|
||||
--- linux-4.6-aufs/fs/aufs/Kconfig 2016-06-01 22:44:04.029679796 +0300
|
||||
+++ linux-4.6-aufs-mod/fs/aufs/Kconfig 2016-06-01 22:44:52.623752681 +0300
|
||||
@@ -1,5 +1,5 @@
|
||||
config AUFS_FS
|
||||
- bool "Aufs (Advanced multi layered unification filesystem) support"
|
||||
@@ -27,10 +27,10 @@ diff -Nurp linux-4.4.3-aufs/fs/aufs/Kconfig linux-4.4.3-aufs-mod/fs/aufs/Kconfig
|
||||
help
|
||||
Aufs is a stackable unification filesystem such as Unionfs,
|
||||
which unifies several directories and provides a merged single
|
||||
diff -Nurp linux-4.4.3-aufs/fs/dcache.c linux-4.4.3-aufs-mod/fs/dcache.c
|
||||
--- linux-4.4.3-aufs/fs/dcache.c 2016-03-02 17:59:37.376498796 +0200
|
||||
+++ linux-4.4.3-aufs-mod/fs/dcache.c 2016-03-03 09:50:34.633586562 +0200
|
||||
@@ -1272,6 +1272,7 @@ rename_retry:
|
||||
diff -Nurp linux-4.6-aufs/fs/dcache.c linux-4.6-aufs-mod/fs/dcache.c
|
||||
--- linux-4.6-aufs/fs/dcache.c 2016-06-01 22:44:04.041679813 +0300
|
||||
+++ linux-4.6-aufs-mod/fs/dcache.c 2016-06-01 22:44:52.623752681 +0300
|
||||
@@ -1261,6 +1261,7 @@ rename_retry:
|
||||
seq = 1;
|
||||
goto again;
|
||||
}
|
||||
@@ -38,10 +38,10 @@ diff -Nurp linux-4.4.3-aufs/fs/dcache.c linux-4.4.3-aufs-mod/fs/dcache.c
|
||||
|
||||
/*
|
||||
* Search for at least 1 mount point in the dentry's subdirs.
|
||||
diff -Nurp linux-4.4.3-aufs/fs/exec.c linux-4.4.3-aufs-mod/fs/exec.c
|
||||
--- linux-4.4.3-aufs/fs/exec.c 2016-01-11 01:01:32.000000000 +0200
|
||||
+++ linux-4.4.3-aufs-mod/fs/exec.c 2016-03-03 09:50:34.633586562 +0200
|
||||
@@ -103,6 +103,7 @@ bool path_noexec(const struct path *path
|
||||
diff -Nurp linux-4.6-aufs/fs/exec.c linux-4.6-aufs-mod/fs/exec.c
|
||||
--- linux-4.6-aufs/fs/exec.c 2016-05-16 01:43:13.000000000 +0300
|
||||
+++ linux-4.6-aufs-mod/fs/exec.c 2016-06-01 22:44:52.624752682 +0300
|
||||
@@ -104,6 +104,7 @@ bool path_noexec(const struct path *path
|
||||
return (path->mnt->mnt_flags & MNT_NOEXEC) ||
|
||||
(path->mnt->mnt_sb->s_iflags & SB_I_NOEXEC);
|
||||
}
|
||||
@@ -49,10 +49,10 @@ diff -Nurp linux-4.4.3-aufs/fs/exec.c linux-4.4.3-aufs-mod/fs/exec.c
|
||||
|
||||
#ifdef CONFIG_USELIB
|
||||
/*
|
||||
diff -Nurp linux-4.4.3-aufs/fs/fcntl.c linux-4.4.3-aufs-mod/fs/fcntl.c
|
||||
--- linux-4.4.3-aufs/fs/fcntl.c 2016-03-02 17:59:37.376498796 +0200
|
||||
+++ linux-4.4.3-aufs-mod/fs/fcntl.c 2016-03-03 09:50:34.633586562 +0200
|
||||
@@ -81,6 +81,7 @@ int setfl(int fd, struct file * filp, un
|
||||
diff -Nurp linux-4.6-aufs/fs/fcntl.c linux-4.6-aufs-mod/fs/fcntl.c
|
||||
--- linux-4.6-aufs/fs/fcntl.c 2016-06-01 22:44:04.041679813 +0300
|
||||
+++ linux-4.6-aufs-mod/fs/fcntl.c 2016-06-01 22:44:52.624752682 +0300
|
||||
@@ -82,6 +82,7 @@ int setfl(int fd, struct file * filp, un
|
||||
out:
|
||||
return error;
|
||||
}
|
||||
@@ -60,9 +60,9 @@ diff -Nurp linux-4.4.3-aufs/fs/fcntl.c linux-4.4.3-aufs-mod/fs/fcntl.c
|
||||
|
||||
static void f_modown(struct file *filp, struct pid *pid, enum pid_type type,
|
||||
int force)
|
||||
diff -Nurp linux-4.4.3-aufs/fs/file_table.c linux-4.4.3-aufs-mod/fs/file_table.c
|
||||
--- linux-4.4.3-aufs/fs/file_table.c 2016-01-11 01:01:32.000000000 +0200
|
||||
+++ linux-4.4.3-aufs-mod/fs/file_table.c 2016-03-03 09:50:34.633586562 +0200
|
||||
diff -Nurp linux-4.6-aufs/fs/file_table.c linux-4.6-aufs-mod/fs/file_table.c
|
||||
--- linux-4.6-aufs/fs/file_table.c 2016-05-16 01:43:13.000000000 +0300
|
||||
+++ linux-4.6-aufs-mod/fs/file_table.c 2016-06-01 22:44:52.624752682 +0300
|
||||
@@ -147,6 +147,7 @@ over:
|
||||
}
|
||||
return ERR_PTR(-ENFILE);
|
||||
@@ -95,9 +95,9 @@ diff -Nurp linux-4.4.3-aufs/fs/file_table.c linux-4.4.3-aufs-mod/fs/file_table.c
|
||||
|
||||
void __init files_init(void)
|
||||
{
|
||||
diff -Nurp linux-4.4.3-aufs/fs/namespace.c linux-4.4.3-aufs-mod/fs/namespace.c
|
||||
--- linux-4.4.3-aufs/fs/namespace.c 2016-01-11 01:01:32.000000000 +0200
|
||||
+++ linux-4.4.3-aufs-mod/fs/namespace.c 2016-03-03 09:50:34.634586569 +0200
|
||||
diff -Nurp linux-4.6-aufs/fs/namespace.c linux-4.6-aufs-mod/fs/namespace.c
|
||||
--- linux-4.6-aufs/fs/namespace.c 2016-05-16 01:43:13.000000000 +0300
|
||||
+++ linux-4.6-aufs-mod/fs/namespace.c 2016-06-01 22:44:52.625752684 +0300
|
||||
@@ -463,6 +463,7 @@ void __mnt_drop_write(struct vfsmount *m
|
||||
mnt_dec_writers(real_mount(mnt));
|
||||
preempt_enable();
|
||||
@@ -106,7 +106,7 @@ diff -Nurp linux-4.4.3-aufs/fs/namespace.c linux-4.4.3-aufs-mod/fs/namespace.c
|
||||
|
||||
/**
|
||||
* mnt_drop_write - give up write access to a mount
|
||||
@@ -1803,6 +1804,7 @@ int iterate_mounts(int (*f)(struct vfsmo
|
||||
@@ -1811,6 +1812,7 @@ int iterate_mounts(int (*f)(struct vfsmo
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
@@ -114,9 +114,9 @@ diff -Nurp linux-4.4.3-aufs/fs/namespace.c linux-4.4.3-aufs-mod/fs/namespace.c
|
||||
|
||||
static void cleanup_group_ids(struct mount *mnt, struct mount *end)
|
||||
{
|
||||
diff -Nurp linux-4.4.3-aufs/fs/notify/group.c linux-4.4.3-aufs-mod/fs/notify/group.c
|
||||
--- linux-4.4.3-aufs/fs/notify/group.c 2016-01-11 01:01:32.000000000 +0200
|
||||
+++ linux-4.4.3-aufs-mod/fs/notify/group.c 2016-03-03 09:50:34.634586569 +0200
|
||||
diff -Nurp linux-4.6-aufs/fs/notify/group.c linux-4.6-aufs-mod/fs/notify/group.c
|
||||
--- linux-4.6-aufs/fs/notify/group.c 2016-05-16 01:43:13.000000000 +0300
|
||||
+++ linux-4.6-aufs-mod/fs/notify/group.c 2016-06-01 22:44:52.625752684 +0300
|
||||
@@ -22,6 +22,7 @@
|
||||
#include <linux/srcu.h>
|
||||
#include <linux/rculist.h>
|
||||
@@ -149,10 +149,10 @@ diff -Nurp linux-4.4.3-aufs/fs/notify/group.c linux-4.4.3-aufs-mod/fs/notify/gro
|
||||
|
||||
int fsnotify_fasync(int fd, struct file *file, int on)
|
||||
{
|
||||
diff -Nurp linux-4.4.3-aufs/fs/notify/mark.c linux-4.4.3-aufs-mod/fs/notify/mark.c
|
||||
--- linux-4.4.3-aufs/fs/notify/mark.c 2016-01-11 01:01:32.000000000 +0200
|
||||
+++ linux-4.4.3-aufs-mod/fs/notify/mark.c 2016-03-03 09:50:34.634586569 +0200
|
||||
@@ -109,6 +109,7 @@ void fsnotify_put_mark(struct fsnotify_m
|
||||
diff -Nurp linux-4.6-aufs/fs/notify/mark.c linux-4.6-aufs-mod/fs/notify/mark.c
|
||||
--- linux-4.6-aufs/fs/notify/mark.c 2016-05-16 01:43:13.000000000 +0300
|
||||
+++ linux-4.6-aufs-mod/fs/notify/mark.c 2016-06-01 22:44:52.625752684 +0300
|
||||
@@ -113,6 +113,7 @@ void fsnotify_put_mark(struct fsnotify_m
|
||||
mark->free_mark(mark);
|
||||
}
|
||||
}
|
||||
@@ -160,7 +160,7 @@ diff -Nurp linux-4.4.3-aufs/fs/notify/mark.c linux-4.4.3-aufs-mod/fs/notify/mark
|
||||
|
||||
/* Calculate mask of events for a list of marks */
|
||||
u32 fsnotify_recalc_mask(struct hlist_head *head)
|
||||
@@ -208,6 +209,7 @@ void fsnotify_destroy_mark(struct fsnoti
|
||||
@@ -213,6 +214,7 @@ void fsnotify_destroy_mark(struct fsnoti
|
||||
mutex_unlock(&group->mark_mutex);
|
||||
fsnotify_free_mark(mark);
|
||||
}
|
||||
@@ -168,7 +168,7 @@ diff -Nurp linux-4.4.3-aufs/fs/notify/mark.c linux-4.4.3-aufs-mod/fs/notify/mark
|
||||
|
||||
void fsnotify_destroy_marks(struct hlist_head *head, spinlock_t *lock)
|
||||
{
|
||||
@@ -392,6 +394,7 @@ err:
|
||||
@@ -398,6 +400,7 @@ err:
|
||||
|
||||
return ret;
|
||||
}
|
||||
@@ -176,19 +176,19 @@ diff -Nurp linux-4.4.3-aufs/fs/notify/mark.c linux-4.4.3-aufs-mod/fs/notify/mark
|
||||
|
||||
int fsnotify_add_mark(struct fsnotify_mark *mark, struct fsnotify_group *group,
|
||||
struct inode *inode, struct vfsmount *mnt, int allow_dups)
|
||||
@@ -492,6 +495,7 @@ void fsnotify_init_mark(struct fsnotify_
|
||||
@@ -498,6 +501,7 @@ void fsnotify_init_mark(struct fsnotify_
|
||||
atomic_set(&mark->refcnt, 1);
|
||||
mark->free_mark = free_mark;
|
||||
}
|
||||
+EXPORT_SYMBOL_GPL(fsnotify_init_mark);
|
||||
|
||||
static int fsnotify_mark_destroy(void *ignored)
|
||||
static void fsnotify_mark_destroy(struct work_struct *work)
|
||||
{
|
||||
diff -Nurp linux-4.4.3-aufs/fs/open.c linux-4.4.3-aufs-mod/fs/open.c
|
||||
--- linux-4.4.3-aufs/fs/open.c 2016-01-11 01:01:32.000000000 +0200
|
||||
+++ linux-4.4.3-aufs-mod/fs/open.c 2016-03-03 09:50:34.634586569 +0200
|
||||
diff -Nurp linux-4.6-aufs/fs/open.c linux-4.6-aufs-mod/fs/open.c
|
||||
--- linux-4.6-aufs/fs/open.c 2016-05-16 01:43:13.000000000 +0300
|
||||
+++ linux-4.6-aufs-mod/fs/open.c 2016-06-01 22:44:52.625752684 +0300
|
||||
@@ -64,6 +64,7 @@ int do_truncate(struct dentry *dentry, l
|
||||
mutex_unlock(&dentry->d_inode->i_mutex);
|
||||
inode_unlock(dentry->d_inode);
|
||||
return ret;
|
||||
}
|
||||
+EXPORT_SYMBOL_GPL(do_truncate);
|
||||
@@ -203,10 +203,10 @@ diff -Nurp linux-4.4.3-aufs/fs/open.c linux-4.4.3-aufs-mod/fs/open.c
|
||||
|
||||
static int do_dentry_open(struct file *f,
|
||||
struct inode *inode,
|
||||
diff -Nurp linux-4.4.3-aufs/fs/read_write.c linux-4.4.3-aufs-mod/fs/read_write.c
|
||||
--- linux-4.4.3-aufs/fs/read_write.c 2016-03-02 17:59:37.377498803 +0200
|
||||
+++ linux-4.4.3-aufs-mod/fs/read_write.c 2016-03-03 09:50:34.634586569 +0200
|
||||
@@ -504,6 +504,7 @@ vfs_readf_t vfs_readf(struct file *file)
|
||||
diff -Nurp linux-4.6-aufs/fs/read_write.c linux-4.6-aufs-mod/fs/read_write.c
|
||||
--- linux-4.6-aufs/fs/read_write.c 2016-06-01 22:44:04.042679815 +0300
|
||||
+++ linux-4.6-aufs-mod/fs/read_write.c 2016-06-01 22:44:52.626752685 +0300
|
||||
@@ -544,6 +544,7 @@ vfs_readf_t vfs_readf(struct file *file)
|
||||
return new_sync_read;
|
||||
return ERR_PTR(-ENOSYS);
|
||||
}
|
||||
@@ -214,7 +214,7 @@ diff -Nurp linux-4.4.3-aufs/fs/read_write.c linux-4.4.3-aufs-mod/fs/read_write.c
|
||||
|
||||
vfs_writef_t vfs_writef(struct file *file)
|
||||
{
|
||||
@@ -515,6 +516,7 @@ vfs_writef_t vfs_writef(struct file *fil
|
||||
@@ -555,6 +556,7 @@ vfs_writef_t vfs_writef(struct file *fil
|
||||
return new_sync_write;
|
||||
return ERR_PTR(-ENOSYS);
|
||||
}
|
||||
@@ -222,10 +222,10 @@ diff -Nurp linux-4.4.3-aufs/fs/read_write.c linux-4.4.3-aufs-mod/fs/read_write.c
|
||||
|
||||
ssize_t __kernel_write(struct file *file, const char *buf, size_t count, loff_t *pos)
|
||||
{
|
||||
diff -Nurp linux-4.4.3-aufs/fs/splice.c linux-4.4.3-aufs-mod/fs/splice.c
|
||||
--- linux-4.4.3-aufs/fs/splice.c 2016-03-02 17:59:37.377498803 +0200
|
||||
+++ linux-4.4.3-aufs-mod/fs/splice.c 2016-03-03 09:50:34.635586575 +0200
|
||||
@@ -1123,6 +1123,7 @@ long do_splice_from(struct pipe_inode_in
|
||||
diff -Nurp linux-4.6-aufs/fs/splice.c linux-4.6-aufs-mod/fs/splice.c
|
||||
--- linux-4.6-aufs/fs/splice.c 2016-06-01 22:44:04.042679815 +0300
|
||||
+++ linux-4.6-aufs-mod/fs/splice.c 2016-06-01 22:44:52.626752685 +0300
|
||||
@@ -1124,6 +1124,7 @@ long do_splice_from(struct pipe_inode_in
|
||||
|
||||
return splice_write(pipe, out, ppos, len, flags);
|
||||
}
|
||||
@@ -233,7 +233,7 @@ diff -Nurp linux-4.4.3-aufs/fs/splice.c linux-4.4.3-aufs-mod/fs/splice.c
|
||||
|
||||
/*
|
||||
* Attempt to initiate a splice from a file to a pipe.
|
||||
@@ -1149,6 +1150,7 @@ long do_splice_to(struct file *in, loff_
|
||||
@@ -1153,6 +1154,7 @@ long do_splice_to(struct file *in, loff_
|
||||
|
||||
return splice_read(in, ppos, pipe, len, flags);
|
||||
}
|
||||
@@ -241,28 +241,28 @@ diff -Nurp linux-4.4.3-aufs/fs/splice.c linux-4.4.3-aufs-mod/fs/splice.c
|
||||
|
||||
/**
|
||||
* splice_direct_to_actor - splices data directly between two non-pipes
|
||||
diff -Nurp linux-4.4.3-aufs/fs/xattr.c linux-4.4.3-aufs-mod/fs/xattr.c
|
||||
--- linux-4.4.3-aufs/fs/xattr.c 2016-01-11 01:01:32.000000000 +0200
|
||||
+++ linux-4.4.3-aufs-mod/fs/xattr.c 2016-03-03 09:50:34.635586575 +0200
|
||||
diff -Nurp linux-4.6-aufs/fs/xattr.c linux-4.6-aufs-mod/fs/xattr.c
|
||||
--- linux-4.6-aufs/fs/xattr.c 2016-05-16 01:43:13.000000000 +0300
|
||||
+++ linux-4.6-aufs-mod/fs/xattr.c 2016-06-01 22:44:52.626752685 +0300
|
||||
@@ -207,6 +207,7 @@ vfs_getxattr_alloc(struct dentry *dentry
|
||||
*xattr_value = value;
|
||||
return error;
|
||||
}
|
||||
+EXPORT_SYMBOL_GPL(vfs_getxattr_alloc);
|
||||
|
||||
/* Compare an extended attribute value with the given value */
|
||||
int vfs_xattr_cmp(struct dentry *dentry, const char *xattr_name,
|
||||
diff -Nurp linux-4.4.3-aufs/kernel/task_work.c linux-4.4.3-aufs-mod/kernel/task_work.c
|
||||
--- linux-4.4.3-aufs/kernel/task_work.c 2016-01-11 01:01:32.000000000 +0200
|
||||
+++ linux-4.4.3-aufs-mod/kernel/task_work.c 2016-03-03 09:50:34.635586575 +0200
|
||||
ssize_t
|
||||
vfs_getxattr(struct dentry *dentry, const char *name, void *value, size_t size)
|
||||
diff -Nurp linux-4.6-aufs/kernel/task_work.c linux-4.6-aufs-mod/kernel/task_work.c
|
||||
--- linux-4.6-aufs/kernel/task_work.c 2016-05-16 01:43:13.000000000 +0300
|
||||
+++ linux-4.6-aufs-mod/kernel/task_work.c 2016-06-01 22:44:52.626752685 +0300
|
||||
@@ -118,3 +118,4 @@ void task_work_run(void)
|
||||
} while (work);
|
||||
}
|
||||
}
|
||||
+EXPORT_SYMBOL_GPL(task_work_run);
|
||||
diff -Nurp linux-4.4.3-aufs/security/commoncap.c linux-4.4.3-aufs-mod/security/commoncap.c
|
||||
--- linux-4.4.3-aufs/security/commoncap.c 2016-03-02 17:42:59.463713410 +0200
|
||||
+++ linux-4.4.3-aufs-mod/security/commoncap.c 2016-03-03 09:50:34.635586575 +0200
|
||||
diff -Nurp linux-4.6-aufs/security/commoncap.c linux-4.6-aufs-mod/security/commoncap.c
|
||||
--- linux-4.6-aufs/security/commoncap.c 2016-05-16 01:43:13.000000000 +0300
|
||||
+++ linux-4.6-aufs-mod/security/commoncap.c 2016-06-01 22:44:52.627752687 +0300
|
||||
@@ -1058,12 +1058,14 @@ int cap_mmap_addr(unsigned long addr)
|
||||
}
|
||||
return ret;
|
||||
@@ -278,9 +278,9 @@ diff -Nurp linux-4.4.3-aufs/security/commoncap.c linux-4.4.3-aufs-mod/security/c
|
||||
|
||||
#ifdef CONFIG_SECURITY
|
||||
|
||||
diff -Nurp linux-4.4.3-aufs/security/device_cgroup.c linux-4.4.3-aufs-mod/security/device_cgroup.c
|
||||
--- linux-4.4.3-aufs/security/device_cgroup.c 2016-01-11 01:01:32.000000000 +0200
|
||||
+++ linux-4.4.3-aufs-mod/security/device_cgroup.c 2016-03-03 09:50:34.635586575 +0200
|
||||
diff -Nurp linux-4.6-aufs/security/device_cgroup.c linux-4.6-aufs-mod/security/device_cgroup.c
|
||||
--- linux-4.6-aufs/security/device_cgroup.c 2016-05-16 01:43:13.000000000 +0300
|
||||
+++ linux-4.6-aufs-mod/security/device_cgroup.c 2016-06-01 22:44:52.627752687 +0300
|
||||
@@ -7,6 +7,7 @@
|
||||
#include <linux/device_cgroup.h>
|
||||
#include <linux/cgroup.h>
|
||||
@@ -297,9 +297,9 @@ diff -Nurp linux-4.4.3-aufs/security/device_cgroup.c linux-4.4.3-aufs-mod/securi
|
||||
|
||||
int devcgroup_inode_mknod(int mode, dev_t dev)
|
||||
{
|
||||
diff -Nurp linux-4.4.3-aufs/security/security.c linux-4.4.3-aufs-mod/security/security.c
|
||||
--- linux-4.4.3-aufs/security/security.c 2016-01-11 01:01:32.000000000 +0200
|
||||
+++ linux-4.4.3-aufs-mod/security/security.c 2016-03-03 09:50:34.636586582 +0200
|
||||
diff -Nurp linux-4.6-aufs/security/security.c linux-4.6-aufs-mod/security/security.c
|
||||
--- linux-4.6-aufs/security/security.c 2016-05-16 01:43:13.000000000 +0300
|
||||
+++ linux-4.6-aufs-mod/security/security.c 2016-06-01 22:44:52.627752687 +0300
|
||||
@@ -433,6 +433,7 @@ int security_path_rmdir(struct path *dir
|
||||
return 0;
|
||||
return call_int_hook(path_rmdir, 0, dir, dentry);
|
||||
+7720
-7596
File diff suppressed because it is too large
Load Diff
-46
@@ -1,46 +0,0 @@
|
||||
From 257f871993474e2bde6c497b54022c362cf398e1 Mon Sep 17 00:00:00 2001
|
||||
From: Stephen Hemminger <stephen@networkplumber.org>
|
||||
Date: Wed, 4 Nov 2015 10:59:52 -0800
|
||||
Subject: [PATCH 3/6] ovl: move super block magic number to magic.h
|
||||
|
||||
The overlayfs file system is not recognized by programs
|
||||
like tail because the magic number is not in standard header location.
|
||||
|
||||
Move it so that the value will propagate on for the GNU library
|
||||
and utilities. Needs to go in the fstatfs manual page as well.
|
||||
|
||||
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
|
||||
Signed-off-by: Miklos Szeredi <miklos@szeredi.hu>
|
||||
---
|
||||
fs/overlayfs/super.c | 2 --
|
||||
include/uapi/linux/magic.h | 1 +
|
||||
2 files changed, 1 insertion(+), 2 deletions(-)
|
||||
|
||||
diff --git a/fs/overlayfs/super.c b/fs/overlayfs/super.c
|
||||
index 97cacb5..32f3124 100644
|
||||
--- a/fs/overlayfs/super.c
|
||||
+++ b/fs/overlayfs/super.c
|
||||
@@ -24,8 +24,6 @@ MODULE_AUTHOR("Miklos Szeredi <miklos@szeredi.hu>");
|
||||
MODULE_DESCRIPTION("Overlay filesystem");
|
||||
MODULE_LICENSE("GPL");
|
||||
|
||||
-#define OVERLAYFS_SUPER_MAGIC 0x794c7630
|
||||
-
|
||||
struct ovl_config {
|
||||
char *lowerdir;
|
||||
char *upperdir;
|
||||
diff --git a/include/uapi/linux/magic.h b/include/uapi/linux/magic.h
|
||||
index 7b1425a..eec4389 100644
|
||||
--- a/include/uapi/linux/magic.h
|
||||
+++ b/include/uapi/linux/magic.h
|
||||
@@ -31,6 +31,7 @@
|
||||
#define PSTOREFS_MAGIC 0x6165676C
|
||||
#define EFIVARFS_MAGIC 0xde5e81e4
|
||||
#define HOSTFS_SUPER_MAGIC 0x00c0ffee
|
||||
+#define OVERLAYFS_SUPER_MAGIC 0x794c7630
|
||||
|
||||
#define MINIX_SUPER_MAGIC 0x137F /* minix v1 fs, 14 char names */
|
||||
#define MINIX_SUPER_MAGIC2 0x138F /* minix v1 fs, 30 char names */
|
||||
--
|
||||
2.7.0
|
||||
|
||||
-30
@@ -1,30 +0,0 @@
|
||||
From a6351c68fe1ea89ebb39e8c405d622464bcb339e Mon Sep 17 00:00:00 2001
|
||||
From: Philipp Zabel <philipp.zabel@gmail.com>
|
||||
Date: Thu, 2 Apr 2015 17:29:03 +0200
|
||||
Subject: [PATCH 1/4] devicetree: add vendor prefix for Vivante Corporation
|
||||
|
||||
Trivial patch to add Vivante Corporation to the list of
|
||||
devicetree vendor prefixes.
|
||||
|
||||
Signed-off-by: Philipp Zabel <philipp.zabel@gmail.com>
|
||||
Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
|
||||
Acked-by: Rob Herring <robh@kernel.org>
|
||||
---
|
||||
Documentation/devicetree/bindings/vendor-prefixes.txt | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/Documentation/devicetree/bindings/vendor-prefixes.txt b/Documentation/devicetree/bindings/vendor-prefixes.txt
|
||||
index 55df1d4..c2767a7 100644
|
||||
--- a/Documentation/devicetree/bindings/vendor-prefixes.txt
|
||||
+++ b/Documentation/devicetree/bindings/vendor-prefixes.txt
|
||||
@@ -238,6 +238,7 @@ v3 V3 Semiconductor
|
||||
variscite Variscite Ltd.
|
||||
via VIA Technologies, Inc.
|
||||
virtio Virtual I/O Device Specification, developed by the OASIS consortium
|
||||
+vivante Vivante Corporation
|
||||
voipac Voipac Technologies s.r.o.
|
||||
wexler Wexler
|
||||
winbond Winbond Electronics corp.
|
||||
--
|
||||
2.6.4
|
||||
|
||||
-79
@@ -1,79 +0,0 @@
|
||||
From f04b205ac143413831b193f39fd9592665111d4b Mon Sep 17 00:00:00 2001
|
||||
From: Lucas Stach <l.stach@pengutronix.de>
|
||||
Date: Thu, 2 Apr 2015 17:29:04 +0200
|
||||
Subject: [PATCH 2/4] drm/etnaviv: add devicetree bindings
|
||||
|
||||
Etnaviv follows the same priciple as imx-drm to have a virtual
|
||||
master device node to bind all the individual GPU cores together
|
||||
into one DRM device.
|
||||
|
||||
Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
|
||||
Acked-by: Rob Herring <robh@kernel.org>
|
||||
---
|
||||
.../bindings/display/etnaviv/etnaviv-drm.txt | 54 ++++++++++++++++++++++
|
||||
1 file changed, 54 insertions(+)
|
||||
create mode 100644 Documentation/devicetree/bindings/display/etnaviv/etnaviv-drm.txt
|
||||
|
||||
diff --git a/Documentation/devicetree/bindings/display/etnaviv/etnaviv-drm.txt b/Documentation/devicetree/bindings/display/etnaviv/etnaviv-drm.txt
|
||||
new file mode 100644
|
||||
index 0000000..ed5e0a7
|
||||
--- /dev/null
|
||||
+++ b/Documentation/devicetree/bindings/display/etnaviv/etnaviv-drm.txt
|
||||
@@ -0,0 +1,54 @@
|
||||
+Etnaviv DRM master device
|
||||
+=========================
|
||||
+
|
||||
+The Etnaviv DRM master device is a virtual device needed to list all
|
||||
+Vivante GPU cores that comprise the GPU subsystem.
|
||||
+
|
||||
+Required properties:
|
||||
+- compatible: Should be one of
|
||||
+ "fsl,imx-gpu-subsystem"
|
||||
+ "marvell,dove-gpu-subsystem"
|
||||
+- cores: Should contain a list of phandles pointing to Vivante GPU devices
|
||||
+
|
||||
+example:
|
||||
+
|
||||
+gpu-subsystem {
|
||||
+ compatible = "fsl,imx-gpu-subsystem";
|
||||
+ cores = <&gpu_2d>, <&gpu_3d>;
|
||||
+};
|
||||
+
|
||||
+
|
||||
+Vivante GPU core devices
|
||||
+========================
|
||||
+
|
||||
+Required properties:
|
||||
+- compatible: Should be "vivante,gc"
|
||||
+ A more specific compatible is not needed, as the cores contain chip
|
||||
+ identification registers at fixed locations, which provide all the
|
||||
+ necessary information to the driver.
|
||||
+- reg: should be register base and length as documented in the
|
||||
+ datasheet
|
||||
+- interrupts: Should contain the cores interrupt line
|
||||
+- clocks: should contain one clock for entry in clock-names
|
||||
+ see Documentation/devicetree/bindings/clock/clock-bindings.txt
|
||||
+- clock-names:
|
||||
+ - "bus": AXI/register clock
|
||||
+ - "core": GPU core clock
|
||||
+ - "shader": Shader clock (only required if GPU has feature PIPE_3D)
|
||||
+
|
||||
+Optional properties:
|
||||
+- power-domains: a power domain consumer specifier according to
|
||||
+ Documentation/devicetree/bindings/power/power_domain.txt
|
||||
+
|
||||
+example:
|
||||
+
|
||||
+gpu_3d: gpu@00130000 {
|
||||
+ compatible = "vivante,gc";
|
||||
+ reg = <0x00130000 0x4000>;
|
||||
+ interrupts = <0 9 IRQ_TYPE_LEVEL_HIGH>;
|
||||
+ clocks = <&clks IMX6QDL_CLK_GPU3D_AXI>,
|
||||
+ <&clks IMX6QDL_CLK_GPU3D_CORE>,
|
||||
+ <&clks IMX6QDL_CLK_GPU3D_SHADER>;
|
||||
+ clock-names = "bus", "core", "shader";
|
||||
+ power-domains = <&gpc 1>;
|
||||
+};
|
||||
--
|
||||
2.6.4
|
||||
|
||||
-7474
File diff suppressed because it is too large
Load Diff
-36
@@ -1,36 +0,0 @@
|
||||
From 8bb0bce92ec9330b0ea931df90f719fb5c4a5224 Mon Sep 17 00:00:00 2001
|
||||
From: Lucas Stach <l.stach@pengutronix.de>
|
||||
Date: Thu, 3 Dec 2015 17:12:07 +0100
|
||||
Subject: [PATCH 4/4] MAINTAINERS: add maintainer and reviewers for the etnaviv
|
||||
DRM driver
|
||||
|
||||
Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
|
||||
Acked-by: Russell King <rmk+kernel@arm.linux.org.uk>
|
||||
Acked-by: Christian Gmeiner <christian.gmeiner@gmail.com>
|
||||
---
|
||||
MAINTAINERS | 9 +++++++++
|
||||
1 file changed, 9 insertions(+)
|
||||
|
||||
diff --git a/MAINTAINERS b/MAINTAINERS
|
||||
index e9caa4b..9990a3b 100644
|
||||
--- a/MAINTAINERS
|
||||
+++ b/MAINTAINERS
|
||||
@@ -3741,6 +3741,15 @@ S: Maintained
|
||||
F: drivers/gpu/drm/sti
|
||||
F: Documentation/devicetree/bindings/display/st,stih4xx.txt
|
||||
|
||||
+DRM DRIVERS FOR VIVANTE GPU IP
|
||||
+M: Lucas Stach <l.stach@pengutronix.de>
|
||||
+R: Russell King <linux+etnaviv@arm.linux.org.uk>
|
||||
+R: Christian Gmeiner <christian.gmeiner@gmail.com>
|
||||
+L: dri-devel@lists.freedesktop.org
|
||||
+S: Maintained
|
||||
+F: drivers/gpu/drm/etnaviv
|
||||
+F: Documentation/devicetree/bindings/display/etnaviv
|
||||
+
|
||||
DSBR100 USB FM RADIO DRIVER
|
||||
M: Alexey Klimov <klimov.linux@gmail.com>
|
||||
L: linux-media@vger.kernel.org
|
||||
--
|
||||
2.6.4
|
||||
|
||||
-34
@@ -1,34 +0,0 @@
|
||||
From ed94add00e290e675c36cef6767d7d1f51a02f28 Mon Sep 17 00:00:00 2001
|
||||
From: Dan Carpenter <dan.carpenter@oracle.com>
|
||||
Date: Mon, 4 Jan 2016 16:10:24 +0300
|
||||
Subject: [PATCH 1/2] drm/etnaviv: unlock on error in etnaviv_gem_get_iova()
|
||||
|
||||
We have to drop a lock before returning -ENOMEM here.
|
||||
|
||||
Fixes: a8c21a5451d8 ('drm/etnaviv: add initial etnaviv DRM driver')
|
||||
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
|
||||
Acked-by: Russell King <rmk+kernel@arm.linux.org.uk>
|
||||
---
|
||||
drivers/gpu/drm/etnaviv/etnaviv_gem.c | 6 ++++--
|
||||
1 file changed, 4 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/drivers/gpu/drm/etnaviv/etnaviv_gem.c b/drivers/gpu/drm/etnaviv/etnaviv_gem.c
|
||||
index 8d6f859..9f77c3b 100644
|
||||
--- a/drivers/gpu/drm/etnaviv/etnaviv_gem.c
|
||||
+++ b/drivers/gpu/drm/etnaviv/etnaviv_gem.c
|
||||
@@ -305,8 +305,10 @@ int etnaviv_gem_get_iova(struct etnaviv_gpu *gpu,
|
||||
mapping = etnaviv_gem_get_vram_mapping(etnaviv_obj, NULL);
|
||||
if (!mapping) {
|
||||
mapping = kzalloc(sizeof(*mapping), GFP_KERNEL);
|
||||
- if (!mapping)
|
||||
- return -ENOMEM;
|
||||
+ if (!mapping) {
|
||||
+ ret = -ENOMEM;
|
||||
+ goto out;
|
||||
+ }
|
||||
|
||||
INIT_LIST_HEAD(&mapping->scan_node);
|
||||
mapping->object = etnaviv_obj;
|
||||
--
|
||||
2.7.0
|
||||
|
||||
-38
@@ -1,38 +0,0 @@
|
||||
From c33246d793b5bb9d8be7c67918136c310185c23d Mon Sep 17 00:00:00 2001
|
||||
From: Lucas Stach <l.stach@pengutronix.de>
|
||||
Date: Wed, 6 Jan 2016 14:36:40 +0100
|
||||
Subject: [PATCH 2/2] drm/etnaviv: fix workaround for GC500
|
||||
|
||||
The hardware description macros define the mask and shifts the wrong
|
||||
way around for the intended use, leading to the condition never being
|
||||
true and the chip revision ending up with the wrong value.
|
||||
|
||||
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
|
||||
Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
|
||||
Acked-by: Christian Gmeiner <christian.gmeiner@gmail.com>
|
||||
---
|
||||
drivers/gpu/drm/etnaviv/etnaviv_gpu.c | 7 +++++--
|
||||
1 file changed, 5 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/drivers/gpu/drm/etnaviv/etnaviv_gpu.c b/drivers/gpu/drm/etnaviv/etnaviv_gpu.c
|
||||
index d39093d..056a72e 100644
|
||||
--- a/drivers/gpu/drm/etnaviv/etnaviv_gpu.c
|
||||
+++ b/drivers/gpu/drm/etnaviv/etnaviv_gpu.c
|
||||
@@ -251,9 +251,12 @@ static void etnaviv_hw_identify(struct etnaviv_gpu *gpu)
|
||||
chipIdentity = gpu_read(gpu, VIVS_HI_CHIP_IDENTITY);
|
||||
|
||||
/* Special case for older graphic cores. */
|
||||
- if (VIVS_HI_CHIP_IDENTITY_FAMILY(chipIdentity) == 0x01) {
|
||||
+ if (((chipIdentity & VIVS_HI_CHIP_IDENTITY_FAMILY__MASK)
|
||||
+ >> VIVS_HI_CHIP_IDENTITY_FAMILY__SHIFT) == 0x01) {
|
||||
gpu->identity.model = 0x500; /* gc500 */
|
||||
- gpu->identity.revision = VIVS_HI_CHIP_IDENTITY_REVISION(chipIdentity);
|
||||
+ gpu->identity.revision =
|
||||
+ (chipIdentity & VIVS_HI_CHIP_IDENTITY_REVISION__MASK)
|
||||
+ >> VIVS_HI_CHIP_IDENTITY_REVISION__SHIFT;
|
||||
} else {
|
||||
|
||||
gpu->identity.model = gpu_read(gpu, VIVS_HI_CHIP_MODEL);
|
||||
--
|
||||
2.7.0
|
||||
|
||||
-62
@@ -1,62 +0,0 @@
|
||||
From 10028c5ab107d3765c7fc282b6c45324d1602155 Mon Sep 17 00:00:00 2001
|
||||
From: Eric Anholt <eric@anholt.net>
|
||||
Date: Mon, 30 Nov 2015 10:55:13 -0800
|
||||
Subject: [PATCH 1/9] drm: Create a driver hook for allocating GEM object
|
||||
structs.
|
||||
|
||||
The CMA helpers had no way for a driver to extend the struct with its
|
||||
own fields. Since the CMA helpers are mostly "Allocate a
|
||||
drm_gem_cma_object, then fill in a few fields", it's hard to write as
|
||||
pure helpers without passing in a driver callback for the allocate
|
||||
step.
|
||||
|
||||
Signed-off-by: Eric Anholt <eric@anholt.net>
|
||||
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
|
||||
---
|
||||
drivers/gpu/drm/drm_gem_cma_helper.c | 10 ++++++----
|
||||
include/drm/drmP.h | 7 +++++++
|
||||
2 files changed, 13 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/drivers/gpu/drm/drm_gem_cma_helper.c b/drivers/gpu/drm/drm_gem_cma_helper.c
|
||||
index e109b49..0f7b00b 100644
|
||||
--- a/drivers/gpu/drm/drm_gem_cma_helper.c
|
||||
+++ b/drivers/gpu/drm/drm_gem_cma_helper.c
|
||||
@@ -59,11 +59,13 @@ __drm_gem_cma_create(struct drm_device *drm, size_t size)
|
||||
struct drm_gem_object *gem_obj;
|
||||
int ret;
|
||||
|
||||
- cma_obj = kzalloc(sizeof(*cma_obj), GFP_KERNEL);
|
||||
- if (!cma_obj)
|
||||
+ if (drm->driver->gem_create_object)
|
||||
+ gem_obj = drm->driver->gem_create_object(drm, size);
|
||||
+ else
|
||||
+ gem_obj = kzalloc(sizeof(*cma_obj), GFP_KERNEL);
|
||||
+ if (!gem_obj)
|
||||
return ERR_PTR(-ENOMEM);
|
||||
-
|
||||
- gem_obj = &cma_obj->base;
|
||||
+ cma_obj = container_of(gem_obj, struct drm_gem_cma_object, base);
|
||||
|
||||
ret = drm_gem_object_init(drm, gem_obj, size);
|
||||
if (ret)
|
||||
diff --git a/include/drm/drmP.h b/include/drm/drmP.h
|
||||
index 0b921ae..22ff162 100644
|
||||
--- a/include/drm/drmP.h
|
||||
+++ b/include/drm/drmP.h
|
||||
@@ -580,6 +580,13 @@ struct drm_driver {
|
||||
int (*gem_open_object) (struct drm_gem_object *, struct drm_file *);
|
||||
void (*gem_close_object) (struct drm_gem_object *, struct drm_file *);
|
||||
|
||||
+ /**
|
||||
+ * Hook for allocating the GEM object struct, for use by core
|
||||
+ * helpers.
|
||||
+ */
|
||||
+ struct drm_gem_object *(*gem_create_object)(struct drm_device *dev,
|
||||
+ size_t size);
|
||||
+
|
||||
/* prime: */
|
||||
/* export handle -> fd (see drm_gem_prime_handle_to_fd() helper) */
|
||||
int (*prime_handle_to_fd)(struct drm_device *dev, struct drm_file *file_priv,
|
||||
--
|
||||
2.6.4
|
||||
|
||||
@@ -1,512 +0,0 @@
|
||||
From c826a6e1064419f78855463cf29ce9e8b9d25bf4 Mon Sep 17 00:00:00 2001
|
||||
From: Eric Anholt <eric@anholt.net>
|
||||
Date: Fri, 9 Oct 2015 20:25:07 -0700
|
||||
Subject: [PATCH 2/9] drm/vc4: Add a BO cache.
|
||||
|
||||
We need to allocate new BOs in the kernel as part of each frame, but
|
||||
the CMA allocator is way too slow for that. As an optimization, keep
|
||||
track of recently-freed BOs and reuse them, with a 1 second timeout to
|
||||
fully free them back to the system.
|
||||
|
||||
This improves 3D performance by about 15%.
|
||||
|
||||
Signed-off-by: Eric Anholt <eric@anholt.net>
|
||||
---
|
||||
drivers/gpu/drm/vc4/vc4_bo.c | 336 +++++++++++++++++++++++++++++++++++++-
|
||||
drivers/gpu/drm/vc4/vc4_debugfs.c | 1 +
|
||||
drivers/gpu/drm/vc4/vc4_drv.c | 6 +-
|
||||
drivers/gpu/drm/vc4/vc4_drv.h | 49 +++++-
|
||||
4 files changed, 384 insertions(+), 8 deletions(-)
|
||||
|
||||
diff --git a/drivers/gpu/drm/vc4/vc4_bo.c b/drivers/gpu/drm/vc4/vc4_bo.c
|
||||
index ab9f510..18faa5b 100644
|
||||
--- a/drivers/gpu/drm/vc4/vc4_bo.c
|
||||
+++ b/drivers/gpu/drm/vc4/vc4_bo.c
|
||||
@@ -12,19 +12,229 @@
|
||||
* access to system memory with no MMU in between. To support it, we
|
||||
* use the GEM CMA helper functions to allocate contiguous ranges of
|
||||
* physical memory for our BOs.
|
||||
+ *
|
||||
+ * Since the CMA allocator is very slow, we keep a cache of recently
|
||||
+ * freed BOs around so that the kernel's allocation of objects for 3D
|
||||
+ * rendering can return quickly.
|
||||
*/
|
||||
|
||||
#include "vc4_drv.h"
|
||||
|
||||
-struct vc4_bo *vc4_bo_create(struct drm_device *dev, size_t size)
|
||||
+static void vc4_bo_stats_dump(struct vc4_dev *vc4)
|
||||
+{
|
||||
+ DRM_INFO("num bos allocated: %d\n",
|
||||
+ vc4->bo_stats.num_allocated);
|
||||
+ DRM_INFO("size bos allocated: %dkb\n",
|
||||
+ vc4->bo_stats.size_allocated / 1024);
|
||||
+ DRM_INFO("num bos used: %d\n",
|
||||
+ vc4->bo_stats.num_allocated - vc4->bo_stats.num_cached);
|
||||
+ DRM_INFO("size bos used: %dkb\n",
|
||||
+ (vc4->bo_stats.size_allocated -
|
||||
+ vc4->bo_stats.size_cached) / 1024);
|
||||
+ DRM_INFO("num bos cached: %d\n",
|
||||
+ vc4->bo_stats.num_cached);
|
||||
+ DRM_INFO("size bos cached: %dkb\n",
|
||||
+ vc4->bo_stats.size_cached / 1024);
|
||||
+}
|
||||
+
|
||||
+#ifdef CONFIG_DEBUG_FS
|
||||
+int vc4_bo_stats_debugfs(struct seq_file *m, void *unused)
|
||||
+{
|
||||
+ struct drm_info_node *node = (struct drm_info_node *)m->private;
|
||||
+ struct drm_device *dev = node->minor->dev;
|
||||
+ struct vc4_dev *vc4 = to_vc4_dev(dev);
|
||||
+ struct vc4_bo_stats stats;
|
||||
+
|
||||
+ /* Take a snapshot of the current stats with the lock held. */
|
||||
+ mutex_lock(&vc4->bo_lock);
|
||||
+ stats = vc4->bo_stats;
|
||||
+ mutex_unlock(&vc4->bo_lock);
|
||||
+
|
||||
+ seq_printf(m, "num bos allocated: %d\n",
|
||||
+ stats.num_allocated);
|
||||
+ seq_printf(m, "size bos allocated: %dkb\n",
|
||||
+ stats.size_allocated / 1024);
|
||||
+ seq_printf(m, "num bos used: %d\n",
|
||||
+ stats.num_allocated - stats.num_cached);
|
||||
+ seq_printf(m, "size bos used: %dkb\n",
|
||||
+ (stats.size_allocated - stats.size_cached) / 1024);
|
||||
+ seq_printf(m, "num bos cached: %d\n",
|
||||
+ stats.num_cached);
|
||||
+ seq_printf(m, "size bos cached: %dkb\n",
|
||||
+ stats.size_cached / 1024);
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+#endif
|
||||
+
|
||||
+static uint32_t bo_page_index(size_t size)
|
||||
+{
|
||||
+ return (size / PAGE_SIZE) - 1;
|
||||
+}
|
||||
+
|
||||
+/* Must be called with bo_lock held. */
|
||||
+static void vc4_bo_destroy(struct vc4_bo *bo)
|
||||
{
|
||||
+ struct drm_gem_object *obj = &bo->base.base;
|
||||
+ struct vc4_dev *vc4 = to_vc4_dev(obj->dev);
|
||||
+
|
||||
+ vc4->bo_stats.num_allocated--;
|
||||
+ vc4->bo_stats.size_allocated -= obj->size;
|
||||
+ drm_gem_cma_free_object(obj);
|
||||
+}
|
||||
+
|
||||
+/* Must be called with bo_lock held. */
|
||||
+static void vc4_bo_remove_from_cache(struct vc4_bo *bo)
|
||||
+{
|
||||
+ struct drm_gem_object *obj = &bo->base.base;
|
||||
+ struct vc4_dev *vc4 = to_vc4_dev(obj->dev);
|
||||
+
|
||||
+ vc4->bo_stats.num_cached--;
|
||||
+ vc4->bo_stats.size_cached -= obj->size;
|
||||
+
|
||||
+ list_del(&bo->unref_head);
|
||||
+ list_del(&bo->size_head);
|
||||
+}
|
||||
+
|
||||
+static struct list_head *vc4_get_cache_list_for_size(struct drm_device *dev,
|
||||
+ size_t size)
|
||||
+{
|
||||
+ struct vc4_dev *vc4 = to_vc4_dev(dev);
|
||||
+ uint32_t page_index = bo_page_index(size);
|
||||
+
|
||||
+ if (vc4->bo_cache.size_list_size <= page_index) {
|
||||
+ uint32_t new_size = max(vc4->bo_cache.size_list_size * 2,
|
||||
+ page_index + 1);
|
||||
+ struct list_head *new_list;
|
||||
+ uint32_t i;
|
||||
+
|
||||
+ new_list = kmalloc_array(new_size, sizeof(struct list_head),
|
||||
+ GFP_KERNEL);
|
||||
+ if (!new_list)
|
||||
+ return NULL;
|
||||
+
|
||||
+ /* Rebase the old cached BO lists to their new list
|
||||
+ * head locations.
|
||||
+ */
|
||||
+ for (i = 0; i < vc4->bo_cache.size_list_size; i++) {
|
||||
+ struct list_head *old_list =
|
||||
+ &vc4->bo_cache.size_list[i];
|
||||
+
|
||||
+ if (list_empty(old_list))
|
||||
+ INIT_LIST_HEAD(&new_list[i]);
|
||||
+ else
|
||||
+ list_replace(old_list, &new_list[i]);
|
||||
+ }
|
||||
+ /* And initialize the brand new BO list heads. */
|
||||
+ for (i = vc4->bo_cache.size_list_size; i < new_size; i++)
|
||||
+ INIT_LIST_HEAD(&new_list[i]);
|
||||
+
|
||||
+ kfree(vc4->bo_cache.size_list);
|
||||
+ vc4->bo_cache.size_list = new_list;
|
||||
+ vc4->bo_cache.size_list_size = new_size;
|
||||
+ }
|
||||
+
|
||||
+ return &vc4->bo_cache.size_list[page_index];
|
||||
+}
|
||||
+
|
||||
+void vc4_bo_cache_purge(struct drm_device *dev)
|
||||
+{
|
||||
+ struct vc4_dev *vc4 = to_vc4_dev(dev);
|
||||
+
|
||||
+ mutex_lock(&vc4->bo_lock);
|
||||
+ while (!list_empty(&vc4->bo_cache.time_list)) {
|
||||
+ struct vc4_bo *bo = list_last_entry(&vc4->bo_cache.time_list,
|
||||
+ struct vc4_bo, unref_head);
|
||||
+ vc4_bo_remove_from_cache(bo);
|
||||
+ vc4_bo_destroy(bo);
|
||||
+ }
|
||||
+ mutex_unlock(&vc4->bo_lock);
|
||||
+}
|
||||
+
|
||||
+static struct vc4_bo *vc4_bo_get_from_cache(struct drm_device *dev,
|
||||
+ uint32_t size)
|
||||
+{
|
||||
+ struct vc4_dev *vc4 = to_vc4_dev(dev);
|
||||
+ uint32_t page_index = bo_page_index(size);
|
||||
+ struct vc4_bo *bo = NULL;
|
||||
+
|
||||
+ size = roundup(size, PAGE_SIZE);
|
||||
+
|
||||
+ mutex_lock(&vc4->bo_lock);
|
||||
+ if (page_index >= vc4->bo_cache.size_list_size)
|
||||
+ goto out;
|
||||
+
|
||||
+ if (list_empty(&vc4->bo_cache.size_list[page_index]))
|
||||
+ goto out;
|
||||
+
|
||||
+ bo = list_first_entry(&vc4->bo_cache.size_list[page_index],
|
||||
+ struct vc4_bo, size_head);
|
||||
+ vc4_bo_remove_from_cache(bo);
|
||||
+ kref_init(&bo->base.base.refcount);
|
||||
+
|
||||
+out:
|
||||
+ mutex_unlock(&vc4->bo_lock);
|
||||
+ return bo;
|
||||
+}
|
||||
+
|
||||
+/**
|
||||
+ * vc4_gem_create_object - Implementation of driver->gem_create_object.
|
||||
+ *
|
||||
+ * This lets the CMA helpers allocate object structs for us, and keep
|
||||
+ * our BO stats correct.
|
||||
+ */
|
||||
+struct drm_gem_object *vc4_create_object(struct drm_device *dev, size_t size)
|
||||
+{
|
||||
+ struct vc4_dev *vc4 = to_vc4_dev(dev);
|
||||
+ struct vc4_bo *bo;
|
||||
+
|
||||
+ bo = kzalloc(sizeof(*bo), GFP_KERNEL);
|
||||
+ if (!bo)
|
||||
+ return ERR_PTR(-ENOMEM);
|
||||
+
|
||||
+ mutex_lock(&vc4->bo_lock);
|
||||
+ vc4->bo_stats.num_allocated++;
|
||||
+ vc4->bo_stats.size_allocated += size;
|
||||
+ mutex_unlock(&vc4->bo_lock);
|
||||
+
|
||||
+ return &bo->base.base;
|
||||
+}
|
||||
+
|
||||
+struct vc4_bo *vc4_bo_create(struct drm_device *dev, size_t unaligned_size,
|
||||
+ bool from_cache)
|
||||
+{
|
||||
+ size_t size = roundup(unaligned_size, PAGE_SIZE);
|
||||
+ struct vc4_dev *vc4 = to_vc4_dev(dev);
|
||||
struct drm_gem_cma_object *cma_obj;
|
||||
|
||||
- cma_obj = drm_gem_cma_create(dev, size);
|
||||
- if (IS_ERR(cma_obj))
|
||||
+ if (size == 0)
|
||||
return NULL;
|
||||
- else
|
||||
- return to_vc4_bo(&cma_obj->base);
|
||||
+
|
||||
+ /* First, try to get a vc4_bo from the kernel BO cache. */
|
||||
+ if (from_cache) {
|
||||
+ struct vc4_bo *bo = vc4_bo_get_from_cache(dev, size);
|
||||
+
|
||||
+ if (bo)
|
||||
+ return bo;
|
||||
+ }
|
||||
+
|
||||
+ cma_obj = drm_gem_cma_create(dev, size);
|
||||
+ if (IS_ERR(cma_obj)) {
|
||||
+ /*
|
||||
+ * If we've run out of CMA memory, kill the cache of
|
||||
+ * CMA allocations we've got laying around and try again.
|
||||
+ */
|
||||
+ vc4_bo_cache_purge(dev);
|
||||
+
|
||||
+ cma_obj = drm_gem_cma_create(dev, size);
|
||||
+ if (IS_ERR(cma_obj)) {
|
||||
+ DRM_ERROR("Failed to allocate from CMA:\n");
|
||||
+ vc4_bo_stats_dump(vc4);
|
||||
+ return NULL;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ return to_vc4_bo(&cma_obj->base);
|
||||
}
|
||||
|
||||
int vc4_dumb_create(struct drm_file *file_priv,
|
||||
@@ -41,7 +251,7 @@ int vc4_dumb_create(struct drm_file *file_priv,
|
||||
if (args->size < args->pitch * args->height)
|
||||
args->size = args->pitch * args->height;
|
||||
|
||||
- bo = vc4_bo_create(dev, roundup(args->size, PAGE_SIZE));
|
||||
+ bo = vc4_bo_create(dev, args->size, false);
|
||||
if (!bo)
|
||||
return -ENOMEM;
|
||||
|
||||
@@ -50,3 +260,117 @@ int vc4_dumb_create(struct drm_file *file_priv,
|
||||
|
||||
return ret;
|
||||
}
|
||||
+
|
||||
+/* Must be called with bo_lock held. */
|
||||
+static void vc4_bo_cache_free_old(struct drm_device *dev)
|
||||
+{
|
||||
+ struct vc4_dev *vc4 = to_vc4_dev(dev);
|
||||
+ unsigned long expire_time = jiffies - msecs_to_jiffies(1000);
|
||||
+
|
||||
+ while (!list_empty(&vc4->bo_cache.time_list)) {
|
||||
+ struct vc4_bo *bo = list_last_entry(&vc4->bo_cache.time_list,
|
||||
+ struct vc4_bo, unref_head);
|
||||
+ if (time_before(expire_time, bo->free_time)) {
|
||||
+ mod_timer(&vc4->bo_cache.time_timer,
|
||||
+ round_jiffies_up(jiffies +
|
||||
+ msecs_to_jiffies(1000)));
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
+ vc4_bo_remove_from_cache(bo);
|
||||
+ vc4_bo_destroy(bo);
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+/* Called on the last userspace/kernel unreference of the BO. Returns
|
||||
+ * it to the BO cache if possible, otherwise frees it.
|
||||
+ *
|
||||
+ * Note that this is called with the struct_mutex held.
|
||||
+ */
|
||||
+void vc4_free_object(struct drm_gem_object *gem_bo)
|
||||
+{
|
||||
+ struct drm_device *dev = gem_bo->dev;
|
||||
+ struct vc4_dev *vc4 = to_vc4_dev(dev);
|
||||
+ struct vc4_bo *bo = to_vc4_bo(gem_bo);
|
||||
+ struct list_head *cache_list;
|
||||
+
|
||||
+ mutex_lock(&vc4->bo_lock);
|
||||
+ /* If the object references someone else's memory, we can't cache it.
|
||||
+ */
|
||||
+ if (gem_bo->import_attach) {
|
||||
+ vc4_bo_destroy(bo);
|
||||
+ goto out;
|
||||
+ }
|
||||
+
|
||||
+ /* Don't cache if it was publicly named. */
|
||||
+ if (gem_bo->name) {
|
||||
+ vc4_bo_destroy(bo);
|
||||
+ goto out;
|
||||
+ }
|
||||
+
|
||||
+ cache_list = vc4_get_cache_list_for_size(dev, gem_bo->size);
|
||||
+ if (!cache_list) {
|
||||
+ vc4_bo_destroy(bo);
|
||||
+ goto out;
|
||||
+ }
|
||||
+
|
||||
+ bo->free_time = jiffies;
|
||||
+ list_add(&bo->size_head, cache_list);
|
||||
+ list_add(&bo->unref_head, &vc4->bo_cache.time_list);
|
||||
+
|
||||
+ vc4->bo_stats.num_cached++;
|
||||
+ vc4->bo_stats.size_cached += gem_bo->size;
|
||||
+
|
||||
+ vc4_bo_cache_free_old(dev);
|
||||
+
|
||||
+out:
|
||||
+ mutex_unlock(&vc4->bo_lock);
|
||||
+}
|
||||
+
|
||||
+static void vc4_bo_cache_time_work(struct work_struct *work)
|
||||
+{
|
||||
+ struct vc4_dev *vc4 =
|
||||
+ container_of(work, struct vc4_dev, bo_cache.time_work);
|
||||
+ struct drm_device *dev = vc4->dev;
|
||||
+
|
||||
+ mutex_lock(&vc4->bo_lock);
|
||||
+ vc4_bo_cache_free_old(dev);
|
||||
+ mutex_unlock(&vc4->bo_lock);
|
||||
+}
|
||||
+
|
||||
+static void vc4_bo_cache_time_timer(unsigned long data)
|
||||
+{
|
||||
+ struct drm_device *dev = (struct drm_device *)data;
|
||||
+ struct vc4_dev *vc4 = to_vc4_dev(dev);
|
||||
+
|
||||
+ schedule_work(&vc4->bo_cache.time_work);
|
||||
+}
|
||||
+
|
||||
+void vc4_bo_cache_init(struct drm_device *dev)
|
||||
+{
|
||||
+ struct vc4_dev *vc4 = to_vc4_dev(dev);
|
||||
+
|
||||
+ mutex_init(&vc4->bo_lock);
|
||||
+
|
||||
+ INIT_LIST_HEAD(&vc4->bo_cache.time_list);
|
||||
+
|
||||
+ INIT_WORK(&vc4->bo_cache.time_work, vc4_bo_cache_time_work);
|
||||
+ setup_timer(&vc4->bo_cache.time_timer,
|
||||
+ vc4_bo_cache_time_timer,
|
||||
+ (unsigned long)dev);
|
||||
+}
|
||||
+
|
||||
+void vc4_bo_cache_destroy(struct drm_device *dev)
|
||||
+{
|
||||
+ struct vc4_dev *vc4 = to_vc4_dev(dev);
|
||||
+
|
||||
+ del_timer(&vc4->bo_cache.time_timer);
|
||||
+ cancel_work_sync(&vc4->bo_cache.time_work);
|
||||
+
|
||||
+ vc4_bo_cache_purge(dev);
|
||||
+
|
||||
+ if (vc4->bo_stats.num_allocated) {
|
||||
+ DRM_ERROR("Destroying BO cache while BOs still allocated:\n");
|
||||
+ vc4_bo_stats_dump(vc4);
|
||||
+ }
|
||||
+}
|
||||
diff --git a/drivers/gpu/drm/vc4/vc4_debugfs.c b/drivers/gpu/drm/vc4/vc4_debugfs.c
|
||||
index 4297b0a5..6bcf96e 100644
|
||||
--- a/drivers/gpu/drm/vc4/vc4_debugfs.c
|
||||
+++ b/drivers/gpu/drm/vc4/vc4_debugfs.c
|
||||
@@ -16,6 +16,7 @@
|
||||
#include "vc4_regs.h"
|
||||
|
||||
static const struct drm_info_list vc4_debugfs_list[] = {
|
||||
+ {"bo_stats", vc4_bo_stats_debugfs, 0},
|
||||
{"hdmi_regs", vc4_hdmi_debugfs_regs, 0},
|
||||
{"hvs_regs", vc4_hvs_debugfs_regs, 0},
|
||||
{"crtc0_regs", vc4_crtc_debugfs_regs, 0, (void *)(uintptr_t)0},
|
||||
diff --git a/drivers/gpu/drm/vc4/vc4_drv.c b/drivers/gpu/drm/vc4/vc4_drv.c
|
||||
index 6e73060..da041fa 100644
|
||||
--- a/drivers/gpu/drm/vc4/vc4_drv.c
|
||||
+++ b/drivers/gpu/drm/vc4/vc4_drv.c
|
||||
@@ -92,7 +92,8 @@ static struct drm_driver vc4_drm_driver = {
|
||||
.debugfs_cleanup = vc4_debugfs_cleanup,
|
||||
#endif
|
||||
|
||||
- .gem_free_object = drm_gem_cma_free_object,
|
||||
+ .gem_create_object = vc4_create_object,
|
||||
+ .gem_free_object = vc4_free_object,
|
||||
.gem_vm_ops = &drm_gem_cma_vm_ops,
|
||||
|
||||
.prime_handle_to_fd = drm_gem_prime_handle_to_fd,
|
||||
@@ -170,6 +171,8 @@ static int vc4_drm_bind(struct device *dev)
|
||||
|
||||
drm_dev_set_unique(drm, dev_name(dev));
|
||||
|
||||
+ vc4_bo_cache_init(drm);
|
||||
+
|
||||
drm_mode_config_init(drm);
|
||||
if (ret)
|
||||
goto unref;
|
||||
@@ -202,6 +205,7 @@ unbind_all:
|
||||
component_unbind_all(dev, drm);
|
||||
unref:
|
||||
drm_dev_unref(drm);
|
||||
+ vc4_bo_cache_destroy(drm);
|
||||
return ret;
|
||||
}
|
||||
|
||||
diff --git a/drivers/gpu/drm/vc4/vc4_drv.h b/drivers/gpu/drm/vc4/vc4_drv.h
|
||||
index fd8319f..39a1ff5 100644
|
||||
--- a/drivers/gpu/drm/vc4/vc4_drv.h
|
||||
+++ b/drivers/gpu/drm/vc4/vc4_drv.h
|
||||
@@ -17,6 +17,37 @@ struct vc4_dev {
|
||||
struct vc4_crtc *crtc[3];
|
||||
|
||||
struct drm_fbdev_cma *fbdev;
|
||||
+
|
||||
+ /* The kernel-space BO cache. Tracks buffers that have been
|
||||
+ * unreferenced by all other users (refcounts of 0!) but not
|
||||
+ * yet freed, so we can do cheap allocations.
|
||||
+ */
|
||||
+ struct vc4_bo_cache {
|
||||
+ /* Array of list heads for entries in the BO cache,
|
||||
+ * based on number of pages, so we can do O(1) lookups
|
||||
+ * in the cache when allocating.
|
||||
+ */
|
||||
+ struct list_head *size_list;
|
||||
+ uint32_t size_list_size;
|
||||
+
|
||||
+ /* List of all BOs in the cache, ordered by age, so we
|
||||
+ * can do O(1) lookups when trying to free old
|
||||
+ * buffers.
|
||||
+ */
|
||||
+ struct list_head time_list;
|
||||
+ struct work_struct time_work;
|
||||
+ struct timer_list time_timer;
|
||||
+ } bo_cache;
|
||||
+
|
||||
+ struct vc4_bo_stats {
|
||||
+ u32 num_allocated;
|
||||
+ u32 size_allocated;
|
||||
+ u32 num_cached;
|
||||
+ u32 size_cached;
|
||||
+ } bo_stats;
|
||||
+
|
||||
+ /* Protects bo_cache and the BO stats. */
|
||||
+ struct mutex bo_lock;
|
||||
};
|
||||
|
||||
static inline struct vc4_dev *
|
||||
@@ -27,6 +58,17 @@ to_vc4_dev(struct drm_device *dev)
|
||||
|
||||
struct vc4_bo {
|
||||
struct drm_gem_cma_object base;
|
||||
+
|
||||
+ /* List entry for the BO's position in either
|
||||
+ * vc4_exec_info->unref_list or vc4_dev->bo_cache.time_list
|
||||
+ */
|
||||
+ struct list_head unref_head;
|
||||
+
|
||||
+ /* Time in jiffies when the BO was put in vc4->bo_cache. */
|
||||
+ unsigned long free_time;
|
||||
+
|
||||
+ /* List entry for the BO's position in vc4_dev->bo_cache.size_list */
|
||||
+ struct list_head size_head;
|
||||
};
|
||||
|
||||
static inline struct vc4_bo *
|
||||
@@ -104,13 +146,18 @@ to_vc4_encoder(struct drm_encoder *encoder)
|
||||
#define wait_for(COND, MS) _wait_for(COND, MS, 1)
|
||||
|
||||
/* vc4_bo.c */
|
||||
+struct drm_gem_object *vc4_create_object(struct drm_device *dev, size_t size);
|
||||
void vc4_free_object(struct drm_gem_object *gem_obj);
|
||||
-struct vc4_bo *vc4_bo_create(struct drm_device *dev, size_t size);
|
||||
+struct vc4_bo *vc4_bo_create(struct drm_device *dev, size_t size,
|
||||
+ bool from_cache);
|
||||
int vc4_dumb_create(struct drm_file *file_priv,
|
||||
struct drm_device *dev,
|
||||
struct drm_mode_create_dumb *args);
|
||||
struct dma_buf *vc4_prime_export(struct drm_device *dev,
|
||||
struct drm_gem_object *obj, int flags);
|
||||
+void vc4_bo_cache_init(struct drm_device *dev);
|
||||
+void vc4_bo_cache_destroy(struct drm_device *dev);
|
||||
+int vc4_bo_stats_debugfs(struct seq_file *m, void *arg);
|
||||
|
||||
/* vc4_crtc.c */
|
||||
extern struct platform_driver vc4_crtc_driver;
|
||||
--
|
||||
2.6.4
|
||||
|
||||
-204
@@ -1,204 +0,0 @@
|
||||
From d5bc60f6ad05b3c676b057bec662cfafc3ee24dd Mon Sep 17 00:00:00 2001
|
||||
From: Eric Anholt <eric@anholt.net>
|
||||
Date: Sun, 18 Jan 2015 09:33:17 +1300
|
||||
Subject: [PATCH 3/9] drm/vc4: Add create and map BO ioctls.
|
||||
|
||||
While there exist dumb APIs for creating and mapping BOs, one of the
|
||||
rules is that drivers doing 3D acceleration have to provide their own
|
||||
APIs for buffer allocation (besides, the pitch/height parameters of
|
||||
the dumb alloc don't really make sense for a lot of 3D allocations).
|
||||
|
||||
v2: Use __u32-style types, use "drm.h" instead of <drm/drm.h>.
|
||||
|
||||
Signed-off-by: Eric Anholt <eric@anholt.net>
|
||||
---
|
||||
drivers/gpu/drm/vc4/vc4_bo.c | 41 ++++++++++++++++++++++++++
|
||||
drivers/gpu/drm/vc4/vc4_drv.c | 3 ++
|
||||
drivers/gpu/drm/vc4/vc4_drv.h | 4 +++
|
||||
include/uapi/drm/Kbuild | 1 +
|
||||
include/uapi/drm/vc4_drm.h | 68 +++++++++++++++++++++++++++++++++++++++++++
|
||||
5 files changed, 117 insertions(+)
|
||||
create mode 100644 include/uapi/drm/vc4_drm.h
|
||||
|
||||
diff --git a/drivers/gpu/drm/vc4/vc4_bo.c b/drivers/gpu/drm/vc4/vc4_bo.c
|
||||
index 18faa5b..06cba26 100644
|
||||
--- a/drivers/gpu/drm/vc4/vc4_bo.c
|
||||
+++ b/drivers/gpu/drm/vc4/vc4_bo.c
|
||||
@@ -19,6 +19,7 @@
|
||||
*/
|
||||
|
||||
#include "vc4_drv.h"
|
||||
+#include "uapi/drm/vc4_drm.h"
|
||||
|
||||
static void vc4_bo_stats_dump(struct vc4_dev *vc4)
|
||||
{
|
||||
@@ -346,6 +347,46 @@ static void vc4_bo_cache_time_timer(unsigned long data)
|
||||
schedule_work(&vc4->bo_cache.time_work);
|
||||
}
|
||||
|
||||
+int vc4_create_bo_ioctl(struct drm_device *dev, void *data,
|
||||
+ struct drm_file *file_priv)
|
||||
+{
|
||||
+ struct drm_vc4_create_bo *args = data;
|
||||
+ struct vc4_bo *bo = NULL;
|
||||
+ int ret;
|
||||
+
|
||||
+ /*
|
||||
+ * We can't allocate from the BO cache, because the BOs don't
|
||||
+ * get zeroed, and that might leak data between users.
|
||||
+ */
|
||||
+ bo = vc4_bo_create(dev, args->size, false);
|
||||
+ if (!bo)
|
||||
+ return -ENOMEM;
|
||||
+
|
||||
+ ret = drm_gem_handle_create(file_priv, &bo->base.base, &args->handle);
|
||||
+ drm_gem_object_unreference_unlocked(&bo->base.base);
|
||||
+
|
||||
+ return ret;
|
||||
+}
|
||||
+
|
||||
+int vc4_mmap_bo_ioctl(struct drm_device *dev, void *data,
|
||||
+ struct drm_file *file_priv)
|
||||
+{
|
||||
+ struct drm_vc4_mmap_bo *args = data;
|
||||
+ struct drm_gem_object *gem_obj;
|
||||
+
|
||||
+ gem_obj = drm_gem_object_lookup(dev, file_priv, args->handle);
|
||||
+ if (!gem_obj) {
|
||||
+ DRM_ERROR("Failed to look up GEM BO %d\n", args->handle);
|
||||
+ return -EINVAL;
|
||||
+ }
|
||||
+
|
||||
+ /* The mmap offset was set up at BO allocation time. */
|
||||
+ args->offset = drm_vma_node_offset_addr(&gem_obj->vma_node);
|
||||
+
|
||||
+ drm_gem_object_unreference_unlocked(gem_obj);
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
void vc4_bo_cache_init(struct drm_device *dev)
|
||||
{
|
||||
struct vc4_dev *vc4 = to_vc4_dev(dev);
|
||||
diff --git a/drivers/gpu/drm/vc4/vc4_drv.c b/drivers/gpu/drm/vc4/vc4_drv.c
|
||||
index da041fa..5fa4688 100644
|
||||
--- a/drivers/gpu/drm/vc4/vc4_drv.c
|
||||
+++ b/drivers/gpu/drm/vc4/vc4_drv.c
|
||||
@@ -16,6 +16,7 @@
|
||||
#include <linux/platform_device.h>
|
||||
#include "drm_fb_cma_helper.h"
|
||||
|
||||
+#include "uapi/drm/vc4_drm.h"
|
||||
#include "vc4_drv.h"
|
||||
#include "vc4_regs.h"
|
||||
|
||||
@@ -73,6 +74,8 @@ static const struct file_operations vc4_drm_fops = {
|
||||
};
|
||||
|
||||
static const struct drm_ioctl_desc vc4_drm_ioctls[] = {
|
||||
+ DRM_IOCTL_DEF_DRV(VC4_CREATE_BO, vc4_create_bo_ioctl, 0),
|
||||
+ DRM_IOCTL_DEF_DRV(VC4_MMAP_BO, vc4_mmap_bo_ioctl, 0),
|
||||
};
|
||||
|
||||
static struct drm_driver vc4_drm_driver = {
|
||||
diff --git a/drivers/gpu/drm/vc4/vc4_drv.h b/drivers/gpu/drm/vc4/vc4_drv.h
|
||||
index 39a1ff5..fddb0a0 100644
|
||||
--- a/drivers/gpu/drm/vc4/vc4_drv.h
|
||||
+++ b/drivers/gpu/drm/vc4/vc4_drv.h
|
||||
@@ -155,6 +155,10 @@ int vc4_dumb_create(struct drm_file *file_priv,
|
||||
struct drm_mode_create_dumb *args);
|
||||
struct dma_buf *vc4_prime_export(struct drm_device *dev,
|
||||
struct drm_gem_object *obj, int flags);
|
||||
+int vc4_create_bo_ioctl(struct drm_device *dev, void *data,
|
||||
+ struct drm_file *file_priv);
|
||||
+int vc4_mmap_bo_ioctl(struct drm_device *dev, void *data,
|
||||
+ struct drm_file *file_priv);
|
||||
void vc4_bo_cache_init(struct drm_device *dev);
|
||||
void vc4_bo_cache_destroy(struct drm_device *dev);
|
||||
int vc4_bo_stats_debugfs(struct seq_file *m, void *arg);
|
||||
diff --git a/include/uapi/drm/Kbuild b/include/uapi/drm/Kbuild
|
||||
index 38d4370..974fcd5 100644
|
||||
--- a/include/uapi/drm/Kbuild
|
||||
+++ b/include/uapi/drm/Kbuild
|
||||
@@ -17,4 +17,5 @@ header-y += tegra_drm.h
|
||||
header-y += via_drm.h
|
||||
header-y += vmwgfx_drm.h
|
||||
header-y += msm_drm.h
|
||||
+header-y += vc4_drm.h
|
||||
header-y += virtgpu_drm.h
|
||||
diff --git a/include/uapi/drm/vc4_drm.h b/include/uapi/drm/vc4_drm.h
|
||||
new file mode 100644
|
||||
index 0000000..219d34c
|
||||
--- /dev/null
|
||||
+++ b/include/uapi/drm/vc4_drm.h
|
||||
@@ -0,0 +1,68 @@
|
||||
+/*
|
||||
+ * Copyright © 2014-2015 Broadcom
|
||||
+ *
|
||||
+ * 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 (including the next
|
||||
+ * paragraph) 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 AUTHORS OR COPYRIGHT HOLDERS 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.
|
||||
+ */
|
||||
+
|
||||
+#ifndef _UAPI_VC4_DRM_H_
|
||||
+#define _UAPI_VC4_DRM_H_
|
||||
+
|
||||
+#include "drm.h"
|
||||
+
|
||||
+#define DRM_VC4_CREATE_BO 0x03
|
||||
+#define DRM_VC4_MMAP_BO 0x04
|
||||
+
|
||||
+#define DRM_IOCTL_VC4_CREATE_BO DRM_IOWR(DRM_COMMAND_BASE + DRM_VC4_CREATE_BO, struct drm_vc4_create_bo)
|
||||
+#define DRM_IOCTL_VC4_MMAP_BO DRM_IOWR(DRM_COMMAND_BASE + DRM_VC4_MMAP_BO, struct drm_vc4_mmap_bo)
|
||||
+
|
||||
+/**
|
||||
+ * struct drm_vc4_create_bo - ioctl argument for creating VC4 BOs.
|
||||
+ *
|
||||
+ * There are currently no values for the flags argument, but it may be
|
||||
+ * used in a future extension.
|
||||
+ */
|
||||
+struct drm_vc4_create_bo {
|
||||
+ __u32 size;
|
||||
+ __u32 flags;
|
||||
+ /** Returned GEM handle for the BO. */
|
||||
+ __u32 handle;
|
||||
+ __u32 pad;
|
||||
+};
|
||||
+
|
||||
+/**
|
||||
+ * struct drm_vc4_mmap_bo - ioctl argument for mapping VC4 BOs.
|
||||
+ *
|
||||
+ * This doesn't actually perform an mmap. Instead, it returns the
|
||||
+ * offset you need to use in an mmap on the DRM device node. This
|
||||
+ * means that tools like valgrind end up knowing about the mapped
|
||||
+ * memory.
|
||||
+ *
|
||||
+ * There are currently no values for the flags argument, but it may be
|
||||
+ * used in a future extension.
|
||||
+ */
|
||||
+struct drm_vc4_mmap_bo {
|
||||
+ /** Handle for the object being mapped. */
|
||||
+ __u32 handle;
|
||||
+ __u32 flags;
|
||||
+ /** offset into the drm node to use for subsequent mmap call. */
|
||||
+ __u64 offset;
|
||||
+};
|
||||
+
|
||||
+#endif /* _UAPI_VC4_DRM_H_ */
|
||||
--
|
||||
2.6.4
|
||||
|
||||
-1168
File diff suppressed because it is too large
Load Diff
-26
@@ -1,26 +0,0 @@
|
||||
From 1fa81589bbac16af6baf153ccc9b3f38fb16a498 Mon Sep 17 00:00:00 2001
|
||||
From: Eric Anholt <eric@anholt.net>
|
||||
Date: Fri, 23 Oct 2015 14:57:22 +0100
|
||||
Subject: [PATCH 5/9] drm/vc4: Fix a typo in a V3D debug register.
|
||||
|
||||
Signed-off-by: Eric Anholt <eric@anholt.net>
|
||||
---
|
||||
drivers/gpu/drm/vc4/vc4_regs.h | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/drivers/gpu/drm/vc4/vc4_regs.h b/drivers/gpu/drm/vc4/vc4_regs.h
|
||||
index 9e4e904..4e52a0a 100644
|
||||
--- a/drivers/gpu/drm/vc4/vc4_regs.h
|
||||
+++ b/drivers/gpu/drm/vc4/vc4_regs.h
|
||||
@@ -154,7 +154,7 @@
|
||||
#define V3D_PCTRS14 0x006f4
|
||||
#define V3D_PCTR15 0x006f8
|
||||
#define V3D_PCTRS15 0x006fc
|
||||
-#define V3D_BGE 0x00f00
|
||||
+#define V3D_DBGE 0x00f00
|
||||
#define V3D_FDBGO 0x00f04
|
||||
#define V3D_FDBGB 0x00f08
|
||||
#define V3D_FDBGR 0x00f0c
|
||||
--
|
||||
2.6.4
|
||||
|
||||
-333
@@ -1,333 +0,0 @@
|
||||
From d3f5168a0810005920e7a3d5ba83e249bd9a750c Mon Sep 17 00:00:00 2001
|
||||
From: Eric Anholt <eric@anholt.net>
|
||||
Date: Mon, 2 Mar 2015 13:01:12 -0800
|
||||
Subject: [PATCH 6/9] drm/vc4: Bind and initialize the V3D engine.
|
||||
|
||||
This is the component of the GPU that does 3D rendering.
|
||||
|
||||
Signed-off-by: Eric Anholt <eric@anholt.net>
|
||||
---
|
||||
drivers/gpu/drm/vc4/Makefile | 1 +
|
||||
drivers/gpu/drm/vc4/vc4_debugfs.c | 2 +
|
||||
drivers/gpu/drm/vc4/vc4_drv.c | 1 +
|
||||
drivers/gpu/drm/vc4/vc4_drv.h | 13 +++
|
||||
drivers/gpu/drm/vc4/vc4_v3d.c | 225 ++++++++++++++++++++++++++++++++++++++
|
||||
5 files changed, 242 insertions(+)
|
||||
create mode 100644 drivers/gpu/drm/vc4/vc4_v3d.c
|
||||
|
||||
diff --git a/drivers/gpu/drm/vc4/Makefile b/drivers/gpu/drm/vc4/Makefile
|
||||
index eb776a6..e87a6f2 100644
|
||||
--- a/drivers/gpu/drm/vc4/Makefile
|
||||
+++ b/drivers/gpu/drm/vc4/Makefile
|
||||
@@ -11,6 +11,7 @@ vc4-y := \
|
||||
vc4_hdmi.o \
|
||||
vc4_hvs.o \
|
||||
vc4_plane.o \
|
||||
+ vc4_v3d.o \
|
||||
vc4_validate_shaders.o
|
||||
|
||||
vc4-$(CONFIG_DEBUG_FS) += vc4_debugfs.o
|
||||
diff --git a/drivers/gpu/drm/vc4/vc4_debugfs.c b/drivers/gpu/drm/vc4/vc4_debugfs.c
|
||||
index 6bcf96e..d76ad10 100644
|
||||
--- a/drivers/gpu/drm/vc4/vc4_debugfs.c
|
||||
+++ b/drivers/gpu/drm/vc4/vc4_debugfs.c
|
||||
@@ -22,6 +22,8 @@ static const struct drm_info_list vc4_debugfs_list[] = {
|
||||
{"crtc0_regs", vc4_crtc_debugfs_regs, 0, (void *)(uintptr_t)0},
|
||||
{"crtc1_regs", vc4_crtc_debugfs_regs, 0, (void *)(uintptr_t)1},
|
||||
{"crtc2_regs", vc4_crtc_debugfs_regs, 0, (void *)(uintptr_t)2},
|
||||
+ {"v3d_ident", vc4_v3d_debugfs_ident, 0},
|
||||
+ {"v3d_regs", vc4_v3d_debugfs_regs, 0},
|
||||
};
|
||||
|
||||
#define VC4_DEBUGFS_ENTRIES ARRAY_SIZE(vc4_debugfs_list)
|
||||
diff --git a/drivers/gpu/drm/vc4/vc4_drv.c b/drivers/gpu/drm/vc4/vc4_drv.c
|
||||
index da4be9c..db58d74 100644
|
||||
--- a/drivers/gpu/drm/vc4/vc4_drv.c
|
||||
+++ b/drivers/gpu/drm/vc4/vc4_drv.c
|
||||
@@ -236,6 +236,7 @@ static struct platform_driver *const component_drivers[] = {
|
||||
&vc4_hdmi_driver,
|
||||
&vc4_crtc_driver,
|
||||
&vc4_hvs_driver,
|
||||
+ &vc4_v3d_driver,
|
||||
};
|
||||
|
||||
static int vc4_platform_drm_probe(struct platform_device *pdev)
|
||||
diff --git a/drivers/gpu/drm/vc4/vc4_drv.h b/drivers/gpu/drm/vc4/vc4_drv.h
|
||||
index bd77d55..8945463 100644
|
||||
--- a/drivers/gpu/drm/vc4/vc4_drv.h
|
||||
+++ b/drivers/gpu/drm/vc4/vc4_drv.h
|
||||
@@ -15,6 +15,7 @@ struct vc4_dev {
|
||||
struct vc4_hdmi *hdmi;
|
||||
struct vc4_hvs *hvs;
|
||||
struct vc4_crtc *crtc[3];
|
||||
+ struct vc4_v3d *v3d;
|
||||
|
||||
struct drm_fbdev_cma *fbdev;
|
||||
|
||||
@@ -82,6 +83,11 @@ to_vc4_bo(struct drm_gem_object *bo)
|
||||
return (struct vc4_bo *)bo;
|
||||
}
|
||||
|
||||
+struct vc4_v3d {
|
||||
+ struct platform_device *pdev;
|
||||
+ void __iomem *regs;
|
||||
+};
|
||||
+
|
||||
struct vc4_hvs {
|
||||
struct platform_device *pdev;
|
||||
void __iomem *regs;
|
||||
@@ -119,6 +125,8 @@ to_vc4_encoder(struct drm_encoder *encoder)
|
||||
return container_of(encoder, struct vc4_encoder, base);
|
||||
}
|
||||
|
||||
+#define V3D_READ(offset) readl(vc4->v3d->regs + offset)
|
||||
+#define V3D_WRITE(offset, val) writel(val, vc4->v3d->regs + offset)
|
||||
#define HVS_READ(offset) readl(vc4->hvs->regs + offset)
|
||||
#define HVS_WRITE(offset, val) writel(val, vc4->hvs->regs + offset)
|
||||
|
||||
@@ -241,6 +249,11 @@ struct drm_plane *vc4_plane_init(struct drm_device *dev,
|
||||
u32 vc4_plane_write_dlist(struct drm_plane *plane, u32 __iomem *dlist);
|
||||
u32 vc4_plane_dlist_size(struct drm_plane_state *state);
|
||||
|
||||
+/* vc4_v3d.c */
|
||||
+extern struct platform_driver vc4_v3d_driver;
|
||||
+int vc4_v3d_debugfs_ident(struct seq_file *m, void *unused);
|
||||
+int vc4_v3d_debugfs_regs(struct seq_file *m, void *unused);
|
||||
+
|
||||
/* vc4_validate_shader.c */
|
||||
struct vc4_validated_shader_info *
|
||||
vc4_validate_shader(struct drm_gem_cma_object *shader_obj);
|
||||
diff --git a/drivers/gpu/drm/vc4/vc4_v3d.c b/drivers/gpu/drm/vc4/vc4_v3d.c
|
||||
new file mode 100644
|
||||
index 0000000..040ad0d
|
||||
--- /dev/null
|
||||
+++ b/drivers/gpu/drm/vc4/vc4_v3d.c
|
||||
@@ -0,0 +1,225 @@
|
||||
+/*
|
||||
+ * Copyright (c) 2014 The Linux Foundation. All rights reserved.
|
||||
+ * Copyright (C) 2013 Red Hat
|
||||
+ * Author: Rob Clark <robdclark@gmail.com>
|
||||
+ *
|
||||
+ * This program is free software; you can redistribute it and/or modify it
|
||||
+ * under the terms of the GNU General Public License version 2 as published by
|
||||
+ * the Free Software Foundation.
|
||||
+ *
|
||||
+ * This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
+ * more details.
|
||||
+ *
|
||||
+ * You should have received a copy of the GNU General Public License along with
|
||||
+ * this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
+ */
|
||||
+
|
||||
+#include "linux/component.h"
|
||||
+#include "vc4_drv.h"
|
||||
+#include "vc4_regs.h"
|
||||
+
|
||||
+#ifdef CONFIG_DEBUG_FS
|
||||
+#define REGDEF(reg) { reg, #reg }
|
||||
+static const struct {
|
||||
+ uint32_t reg;
|
||||
+ const char *name;
|
||||
+} vc4_reg_defs[] = {
|
||||
+ REGDEF(V3D_IDENT0),
|
||||
+ REGDEF(V3D_IDENT1),
|
||||
+ REGDEF(V3D_IDENT2),
|
||||
+ REGDEF(V3D_SCRATCH),
|
||||
+ REGDEF(V3D_L2CACTL),
|
||||
+ REGDEF(V3D_SLCACTL),
|
||||
+ REGDEF(V3D_INTCTL),
|
||||
+ REGDEF(V3D_INTENA),
|
||||
+ REGDEF(V3D_INTDIS),
|
||||
+ REGDEF(V3D_CT0CS),
|
||||
+ REGDEF(V3D_CT1CS),
|
||||
+ REGDEF(V3D_CT0EA),
|
||||
+ REGDEF(V3D_CT1EA),
|
||||
+ REGDEF(V3D_CT0CA),
|
||||
+ REGDEF(V3D_CT1CA),
|
||||
+ REGDEF(V3D_CT00RA0),
|
||||
+ REGDEF(V3D_CT01RA0),
|
||||
+ REGDEF(V3D_CT0LC),
|
||||
+ REGDEF(V3D_CT1LC),
|
||||
+ REGDEF(V3D_CT0PC),
|
||||
+ REGDEF(V3D_CT1PC),
|
||||
+ REGDEF(V3D_PCS),
|
||||
+ REGDEF(V3D_BFC),
|
||||
+ REGDEF(V3D_RFC),
|
||||
+ REGDEF(V3D_BPCA),
|
||||
+ REGDEF(V3D_BPCS),
|
||||
+ REGDEF(V3D_BPOA),
|
||||
+ REGDEF(V3D_BPOS),
|
||||
+ REGDEF(V3D_BXCF),
|
||||
+ REGDEF(V3D_SQRSV0),
|
||||
+ REGDEF(V3D_SQRSV1),
|
||||
+ REGDEF(V3D_SQCNTL),
|
||||
+ REGDEF(V3D_SRQPC),
|
||||
+ REGDEF(V3D_SRQUA),
|
||||
+ REGDEF(V3D_SRQUL),
|
||||
+ REGDEF(V3D_SRQCS),
|
||||
+ REGDEF(V3D_VPACNTL),
|
||||
+ REGDEF(V3D_VPMBASE),
|
||||
+ REGDEF(V3D_PCTRC),
|
||||
+ REGDEF(V3D_PCTRE),
|
||||
+ REGDEF(V3D_PCTR0),
|
||||
+ REGDEF(V3D_PCTRS0),
|
||||
+ REGDEF(V3D_PCTR1),
|
||||
+ REGDEF(V3D_PCTRS1),
|
||||
+ REGDEF(V3D_PCTR2),
|
||||
+ REGDEF(V3D_PCTRS2),
|
||||
+ REGDEF(V3D_PCTR3),
|
||||
+ REGDEF(V3D_PCTRS3),
|
||||
+ REGDEF(V3D_PCTR4),
|
||||
+ REGDEF(V3D_PCTRS4),
|
||||
+ REGDEF(V3D_PCTR5),
|
||||
+ REGDEF(V3D_PCTRS5),
|
||||
+ REGDEF(V3D_PCTR6),
|
||||
+ REGDEF(V3D_PCTRS6),
|
||||
+ REGDEF(V3D_PCTR7),
|
||||
+ REGDEF(V3D_PCTRS7),
|
||||
+ REGDEF(V3D_PCTR8),
|
||||
+ REGDEF(V3D_PCTRS8),
|
||||
+ REGDEF(V3D_PCTR9),
|
||||
+ REGDEF(V3D_PCTRS9),
|
||||
+ REGDEF(V3D_PCTR10),
|
||||
+ REGDEF(V3D_PCTRS10),
|
||||
+ REGDEF(V3D_PCTR11),
|
||||
+ REGDEF(V3D_PCTRS11),
|
||||
+ REGDEF(V3D_PCTR12),
|
||||
+ REGDEF(V3D_PCTRS12),
|
||||
+ REGDEF(V3D_PCTR13),
|
||||
+ REGDEF(V3D_PCTRS13),
|
||||
+ REGDEF(V3D_PCTR14),
|
||||
+ REGDEF(V3D_PCTRS14),
|
||||
+ REGDEF(V3D_PCTR15),
|
||||
+ REGDEF(V3D_PCTRS15),
|
||||
+ REGDEF(V3D_DBGE),
|
||||
+ REGDEF(V3D_FDBGO),
|
||||
+ REGDEF(V3D_FDBGB),
|
||||
+ REGDEF(V3D_FDBGR),
|
||||
+ REGDEF(V3D_FDBGS),
|
||||
+ REGDEF(V3D_ERRSTAT),
|
||||
+};
|
||||
+
|
||||
+int vc4_v3d_debugfs_regs(struct seq_file *m, void *unused)
|
||||
+{
|
||||
+ struct drm_info_node *node = (struct drm_info_node *)m->private;
|
||||
+ struct drm_device *dev = node->minor->dev;
|
||||
+ struct vc4_dev *vc4 = to_vc4_dev(dev);
|
||||
+ int i;
|
||||
+
|
||||
+ for (i = 0; i < ARRAY_SIZE(vc4_reg_defs); i++) {
|
||||
+ seq_printf(m, "%s (0x%04x): 0x%08x\n",
|
||||
+ vc4_reg_defs[i].name, vc4_reg_defs[i].reg,
|
||||
+ V3D_READ(vc4_reg_defs[i].reg));
|
||||
+ }
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+int vc4_v3d_debugfs_ident(struct seq_file *m, void *unused)
|
||||
+{
|
||||
+ struct drm_info_node *node = (struct drm_info_node *)m->private;
|
||||
+ struct drm_device *dev = node->minor->dev;
|
||||
+ struct vc4_dev *vc4 = to_vc4_dev(dev);
|
||||
+ uint32_t ident1 = V3D_READ(V3D_IDENT1);
|
||||
+ uint32_t nslc = VC4_GET_FIELD(ident1, V3D_IDENT1_NSLC);
|
||||
+ uint32_t tups = VC4_GET_FIELD(ident1, V3D_IDENT1_TUPS);
|
||||
+ uint32_t qups = VC4_GET_FIELD(ident1, V3D_IDENT1_QUPS);
|
||||
+
|
||||
+ seq_printf(m, "Revision: %d\n",
|
||||
+ VC4_GET_FIELD(ident1, V3D_IDENT1_REV));
|
||||
+ seq_printf(m, "Slices: %d\n", nslc);
|
||||
+ seq_printf(m, "TMUs: %d\n", nslc * tups);
|
||||
+ seq_printf(m, "QPUs: %d\n", nslc * qups);
|
||||
+ seq_printf(m, "Semaphores: %d\n",
|
||||
+ VC4_GET_FIELD(ident1, V3D_IDENT1_NSEM));
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+#endif /* CONFIG_DEBUG_FS */
|
||||
+
|
||||
+static void vc4_v3d_init_hw(struct drm_device *dev)
|
||||
+{
|
||||
+ struct vc4_dev *vc4 = to_vc4_dev(dev);
|
||||
+
|
||||
+ /* Take all the memory that would have been reserved for user
|
||||
+ * QPU programs, since we don't have an interface for running
|
||||
+ * them, anyway.
|
||||
+ */
|
||||
+ V3D_WRITE(V3D_VPMBASE, 0);
|
||||
+}
|
||||
+
|
||||
+static int vc4_v3d_bind(struct device *dev, struct device *master, void *data)
|
||||
+{
|
||||
+ struct platform_device *pdev = to_platform_device(dev);
|
||||
+ struct drm_device *drm = dev_get_drvdata(master);
|
||||
+ struct vc4_dev *vc4 = to_vc4_dev(drm);
|
||||
+ struct vc4_v3d *v3d = NULL;
|
||||
+
|
||||
+ v3d = devm_kzalloc(&pdev->dev, sizeof(*v3d), GFP_KERNEL);
|
||||
+ if (!v3d)
|
||||
+ return -ENOMEM;
|
||||
+
|
||||
+ v3d->pdev = pdev;
|
||||
+
|
||||
+ v3d->regs = vc4_ioremap_regs(pdev, 0);
|
||||
+ if (IS_ERR(v3d->regs))
|
||||
+ return PTR_ERR(v3d->regs);
|
||||
+
|
||||
+ vc4->v3d = v3d;
|
||||
+
|
||||
+ if (V3D_READ(V3D_IDENT0) != V3D_EXPECTED_IDENT0) {
|
||||
+ DRM_ERROR("V3D_IDENT0 read 0x%08x instead of 0x%08x\n",
|
||||
+ V3D_READ(V3D_IDENT0), V3D_EXPECTED_IDENT0);
|
||||
+ return -EINVAL;
|
||||
+ }
|
||||
+
|
||||
+ vc4_v3d_init_hw(drm);
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+static void vc4_v3d_unbind(struct device *dev, struct device *master,
|
||||
+ void *data)
|
||||
+{
|
||||
+ struct drm_device *drm = dev_get_drvdata(master);
|
||||
+ struct vc4_dev *vc4 = to_vc4_dev(drm);
|
||||
+
|
||||
+ vc4->v3d = NULL;
|
||||
+}
|
||||
+
|
||||
+static const struct component_ops vc4_v3d_ops = {
|
||||
+ .bind = vc4_v3d_bind,
|
||||
+ .unbind = vc4_v3d_unbind,
|
||||
+};
|
||||
+
|
||||
+static int vc4_v3d_dev_probe(struct platform_device *pdev)
|
||||
+{
|
||||
+ return component_add(&pdev->dev, &vc4_v3d_ops);
|
||||
+}
|
||||
+
|
||||
+static int vc4_v3d_dev_remove(struct platform_device *pdev)
|
||||
+{
|
||||
+ component_del(&pdev->dev, &vc4_v3d_ops);
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+static const struct of_device_id vc4_v3d_dt_match[] = {
|
||||
+ { .compatible = "brcm,vc4-v3d" },
|
||||
+ {}
|
||||
+};
|
||||
+
|
||||
+struct platform_driver vc4_v3d_driver = {
|
||||
+ .probe = vc4_v3d_dev_probe,
|
||||
+ .remove = vc4_v3d_dev_remove,
|
||||
+ .driver = {
|
||||
+ .name = "vc4_v3d",
|
||||
+ .of_match_table = vc4_v3d_dt_match,
|
||||
+ },
|
||||
+};
|
||||
--
|
||||
2.6.4
|
||||
|
||||
-3477
File diff suppressed because it is too large
Load Diff
-511
@@ -1,511 +0,0 @@
|
||||
From b501bacc6060fd62654b756469cc3091eb53de3a Mon Sep 17 00:00:00 2001
|
||||
From: Eric Anholt <eric@anholt.net>
|
||||
Date: Mon, 30 Nov 2015 12:34:01 -0800
|
||||
Subject: [PATCH 8/9] drm/vc4: Add support for async pageflips.
|
||||
|
||||
An async pageflip stores the modeset to be done and executes it once
|
||||
the BOs are ready to be displayed. This gets us about 3x performance
|
||||
in full screen rendering with pageflipping.
|
||||
|
||||
Signed-off-by: Eric Anholt <eric@anholt.net>
|
||||
---
|
||||
drivers/gpu/drm/vc4/vc4_crtc.c | 99 +++++++++++++++++++++++++-
|
||||
drivers/gpu/drm/vc4/vc4_drv.h | 16 +++++
|
||||
drivers/gpu/drm/vc4/vc4_gem.c | 40 +++++++++++
|
||||
drivers/gpu/drm/vc4/vc4_kms.c | 149 +++++++++++++++++++++++++++++++++++++++-
|
||||
drivers/gpu/drm/vc4/vc4_plane.c | 40 +++++++++++
|
||||
5 files changed, 342 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/drivers/gpu/drm/vc4/vc4_crtc.c b/drivers/gpu/drm/vc4/vc4_crtc.c
|
||||
index 7a9f476..a319332 100644
|
||||
--- a/drivers/gpu/drm/vc4/vc4_crtc.c
|
||||
+++ b/drivers/gpu/drm/vc4/vc4_crtc.c
|
||||
@@ -35,6 +35,7 @@
|
||||
#include "drm_atomic_helper.h"
|
||||
#include "drm_crtc_helper.h"
|
||||
#include "linux/clk.h"
|
||||
+#include "drm_fb_cma_helper.h"
|
||||
#include "linux/component.h"
|
||||
#include "linux/of_device.h"
|
||||
#include "vc4_drv.h"
|
||||
@@ -475,10 +476,106 @@ static irqreturn_t vc4_crtc_irq_handler(int irq, void *data)
|
||||
return ret;
|
||||
}
|
||||
|
||||
+struct vc4_async_flip_state {
|
||||
+ struct drm_crtc *crtc;
|
||||
+ struct drm_framebuffer *fb;
|
||||
+ struct drm_pending_vblank_event *event;
|
||||
+
|
||||
+ struct vc4_seqno_cb cb;
|
||||
+};
|
||||
+
|
||||
+/* Called when the V3D execution for the BO being flipped to is done, so that
|
||||
+ * we can actually update the plane's address to point to it.
|
||||
+ */
|
||||
+static void
|
||||
+vc4_async_page_flip_complete(struct vc4_seqno_cb *cb)
|
||||
+{
|
||||
+ struct vc4_async_flip_state *flip_state =
|
||||
+ container_of(cb, struct vc4_async_flip_state, cb);
|
||||
+ struct drm_crtc *crtc = flip_state->crtc;
|
||||
+ struct drm_device *dev = crtc->dev;
|
||||
+ struct vc4_dev *vc4 = to_vc4_dev(dev);
|
||||
+ struct drm_plane *plane = crtc->primary;
|
||||
+
|
||||
+ vc4_plane_async_set_fb(plane, flip_state->fb);
|
||||
+ if (flip_state->event) {
|
||||
+ unsigned long flags;
|
||||
+
|
||||
+ spin_lock_irqsave(&dev->event_lock, flags);
|
||||
+ drm_crtc_send_vblank_event(crtc, flip_state->event);
|
||||
+ spin_unlock_irqrestore(&dev->event_lock, flags);
|
||||
+ }
|
||||
+
|
||||
+ drm_framebuffer_unreference(flip_state->fb);
|
||||
+ kfree(flip_state);
|
||||
+
|
||||
+ up(&vc4->async_modeset);
|
||||
+}
|
||||
+
|
||||
+/* Implements async (non-vblank-synced) page flips.
|
||||
+ *
|
||||
+ * The page flip ioctl needs to return immediately, so we grab the
|
||||
+ * modeset semaphore on the pipe, and queue the address update for
|
||||
+ * when V3D is done with the BO being flipped to.
|
||||
+ */
|
||||
+static int vc4_async_page_flip(struct drm_crtc *crtc,
|
||||
+ struct drm_framebuffer *fb,
|
||||
+ struct drm_pending_vblank_event *event,
|
||||
+ uint32_t flags)
|
||||
+{
|
||||
+ struct drm_device *dev = crtc->dev;
|
||||
+ struct vc4_dev *vc4 = to_vc4_dev(dev);
|
||||
+ struct drm_plane *plane = crtc->primary;
|
||||
+ int ret = 0;
|
||||
+ struct vc4_async_flip_state *flip_state;
|
||||
+ struct drm_gem_cma_object *cma_bo = drm_fb_cma_get_gem_obj(fb, 0);
|
||||
+ struct vc4_bo *bo = to_vc4_bo(&cma_bo->base);
|
||||
+
|
||||
+ flip_state = kzalloc(sizeof(*flip_state), GFP_KERNEL);
|
||||
+ if (!flip_state)
|
||||
+ return -ENOMEM;
|
||||
+
|
||||
+ drm_framebuffer_reference(fb);
|
||||
+ flip_state->fb = fb;
|
||||
+ flip_state->crtc = crtc;
|
||||
+ flip_state->event = event;
|
||||
+
|
||||
+ /* Make sure all other async modesetes have landed. */
|
||||
+ ret = down_interruptible(&vc4->async_modeset);
|
||||
+ if (ret) {
|
||||
+ kfree(flip_state);
|
||||
+ return ret;
|
||||
+ }
|
||||
+
|
||||
+ /* Immediately update the plane's legacy fb pointer, so that later
|
||||
+ * modeset prep sees the state that will be present when the semaphore
|
||||
+ * is released.
|
||||
+ */
|
||||
+ drm_atomic_set_fb_for_plane(plane->state, fb);
|
||||
+ plane->fb = fb;
|
||||
+
|
||||
+ vc4_queue_seqno_cb(dev, &flip_state->cb, bo->seqno,
|
||||
+ vc4_async_page_flip_complete);
|
||||
+
|
||||
+ /* Driver takes ownership of state on successful async commit. */
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+static int vc4_page_flip(struct drm_crtc *crtc,
|
||||
+ struct drm_framebuffer *fb,
|
||||
+ struct drm_pending_vblank_event *event,
|
||||
+ uint32_t flags)
|
||||
+{
|
||||
+ if (flags & DRM_MODE_PAGE_FLIP_ASYNC)
|
||||
+ return vc4_async_page_flip(crtc, fb, event, flags);
|
||||
+ else
|
||||
+ return drm_atomic_helper_page_flip(crtc, fb, event, flags);
|
||||
+}
|
||||
+
|
||||
static const struct drm_crtc_funcs vc4_crtc_funcs = {
|
||||
.set_config = drm_atomic_helper_set_config,
|
||||
.destroy = vc4_crtc_destroy,
|
||||
- .page_flip = drm_atomic_helper_page_flip,
|
||||
+ .page_flip = vc4_page_flip,
|
||||
.set_property = NULL,
|
||||
.cursor_set = NULL, /* handled by drm_mode_cursor_universal */
|
||||
.cursor_move = NULL, /* handled by drm_mode_cursor_universal */
|
||||
diff --git a/drivers/gpu/drm/vc4/vc4_drv.h b/drivers/gpu/drm/vc4/vc4_drv.h
|
||||
index 0bc8c57..f9927d8 100644
|
||||
--- a/drivers/gpu/drm/vc4/vc4_drv.h
|
||||
+++ b/drivers/gpu/drm/vc4/vc4_drv.h
|
||||
@@ -76,6 +76,11 @@ struct vc4_dev {
|
||||
wait_queue_head_t job_wait_queue;
|
||||
struct work_struct job_done_work;
|
||||
|
||||
+ /* List of struct vc4_seqno_cb for callbacks to be made from a
|
||||
+ * workqueue when the given seqno is passed.
|
||||
+ */
|
||||
+ struct list_head seqno_cb_list;
|
||||
+
|
||||
/* The binner overflow memory that's currently set up in
|
||||
* BPOA/BPOS registers. When overflow occurs and a new one is
|
||||
* allocated, the previous one will be moved to
|
||||
@@ -128,6 +133,12 @@ to_vc4_bo(struct drm_gem_object *bo)
|
||||
return (struct vc4_bo *)bo;
|
||||
}
|
||||
|
||||
+struct vc4_seqno_cb {
|
||||
+ struct work_struct work;
|
||||
+ uint64_t seqno;
|
||||
+ void (*func)(struct vc4_seqno_cb *cb);
|
||||
+};
|
||||
+
|
||||
struct vc4_v3d {
|
||||
struct platform_device *pdev;
|
||||
void __iomem *regs;
|
||||
@@ -384,6 +395,9 @@ void vc4_submit_next_job(struct drm_device *dev);
|
||||
int vc4_wait_for_seqno(struct drm_device *dev, uint64_t seqno,
|
||||
uint64_t timeout_ns, bool interruptible);
|
||||
void vc4_job_handle_completed(struct vc4_dev *vc4);
|
||||
+int vc4_queue_seqno_cb(struct drm_device *dev,
|
||||
+ struct vc4_seqno_cb *cb, uint64_t seqno,
|
||||
+ void (*func)(struct vc4_seqno_cb *cb));
|
||||
|
||||
/* vc4_hdmi.c */
|
||||
extern struct platform_driver vc4_hdmi_driver;
|
||||
@@ -409,6 +423,8 @@ struct drm_plane *vc4_plane_init(struct drm_device *dev,
|
||||
enum drm_plane_type type);
|
||||
u32 vc4_plane_write_dlist(struct drm_plane *plane, u32 __iomem *dlist);
|
||||
u32 vc4_plane_dlist_size(struct drm_plane_state *state);
|
||||
+void vc4_plane_async_set_fb(struct drm_plane *plane,
|
||||
+ struct drm_framebuffer *fb);
|
||||
|
||||
/* vc4_v3d.c */
|
||||
extern struct platform_driver vc4_v3d_driver;
|
||||
diff --git a/drivers/gpu/drm/vc4/vc4_gem.c b/drivers/gpu/drm/vc4/vc4_gem.c
|
||||
index 936dddf..5fb0556 100644
|
||||
--- a/drivers/gpu/drm/vc4/vc4_gem.c
|
||||
+++ b/drivers/gpu/drm/vc4/vc4_gem.c
|
||||
@@ -461,6 +461,7 @@ void
|
||||
vc4_job_handle_completed(struct vc4_dev *vc4)
|
||||
{
|
||||
unsigned long irqflags;
|
||||
+ struct vc4_seqno_cb *cb, *cb_temp;
|
||||
|
||||
spin_lock_irqsave(&vc4->job_lock, irqflags);
|
||||
while (!list_empty(&vc4->job_done_list)) {
|
||||
@@ -473,7 +474,45 @@ vc4_job_handle_completed(struct vc4_dev *vc4)
|
||||
vc4_complete_exec(vc4->dev, exec);
|
||||
spin_lock_irqsave(&vc4->job_lock, irqflags);
|
||||
}
|
||||
+
|
||||
+ list_for_each_entry_safe(cb, cb_temp, &vc4->seqno_cb_list, work.entry) {
|
||||
+ if (cb->seqno <= vc4->finished_seqno) {
|
||||
+ list_del_init(&cb->work.entry);
|
||||
+ schedule_work(&cb->work);
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ spin_unlock_irqrestore(&vc4->job_lock, irqflags);
|
||||
+}
|
||||
+
|
||||
+static void vc4_seqno_cb_work(struct work_struct *work)
|
||||
+{
|
||||
+ struct vc4_seqno_cb *cb = container_of(work, struct vc4_seqno_cb, work);
|
||||
+
|
||||
+ cb->func(cb);
|
||||
+}
|
||||
+
|
||||
+int vc4_queue_seqno_cb(struct drm_device *dev,
|
||||
+ struct vc4_seqno_cb *cb, uint64_t seqno,
|
||||
+ void (*func)(struct vc4_seqno_cb *cb))
|
||||
+{
|
||||
+ struct vc4_dev *vc4 = to_vc4_dev(dev);
|
||||
+ int ret = 0;
|
||||
+ unsigned long irqflags;
|
||||
+
|
||||
+ cb->func = func;
|
||||
+ INIT_WORK(&cb->work, vc4_seqno_cb_work);
|
||||
+
|
||||
+ spin_lock_irqsave(&vc4->job_lock, irqflags);
|
||||
+ if (seqno > vc4->finished_seqno) {
|
||||
+ cb->seqno = seqno;
|
||||
+ list_add_tail(&cb->work.entry, &vc4->seqno_cb_list);
|
||||
+ } else {
|
||||
+ schedule_work(&cb->work);
|
||||
+ }
|
||||
spin_unlock_irqrestore(&vc4->job_lock, irqflags);
|
||||
+
|
||||
+ return ret;
|
||||
}
|
||||
|
||||
/* Scheduled when any job has been completed, this walks the list of
|
||||
@@ -610,6 +649,7 @@ vc4_gem_init(struct drm_device *dev)
|
||||
|
||||
INIT_LIST_HEAD(&vc4->job_list);
|
||||
INIT_LIST_HEAD(&vc4->job_done_list);
|
||||
+ INIT_LIST_HEAD(&vc4->seqno_cb_list);
|
||||
spin_lock_init(&vc4->job_lock);
|
||||
|
||||
INIT_WORK(&vc4->hangcheck.reset_work, vc4_reset_work);
|
||||
diff --git a/drivers/gpu/drm/vc4/vc4_kms.c b/drivers/gpu/drm/vc4/vc4_kms.c
|
||||
index 2e5597d..f95f2df 100644
|
||||
--- a/drivers/gpu/drm/vc4/vc4_kms.c
|
||||
+++ b/drivers/gpu/drm/vc4/vc4_kms.c
|
||||
@@ -15,6 +15,7 @@
|
||||
*/
|
||||
|
||||
#include "drm_crtc.h"
|
||||
+#include "drm_atomic.h"
|
||||
#include "drm_atomic_helper.h"
|
||||
#include "drm_crtc_helper.h"
|
||||
#include "drm_plane_helper.h"
|
||||
@@ -29,10 +30,152 @@ static void vc4_output_poll_changed(struct drm_device *dev)
|
||||
drm_fbdev_cma_hotplug_event(vc4->fbdev);
|
||||
}
|
||||
|
||||
+struct vc4_commit {
|
||||
+ struct drm_device *dev;
|
||||
+ struct drm_atomic_state *state;
|
||||
+ struct vc4_seqno_cb cb;
|
||||
+};
|
||||
+
|
||||
+static void
|
||||
+vc4_atomic_complete_commit(struct vc4_commit *c)
|
||||
+{
|
||||
+ struct drm_atomic_state *state = c->state;
|
||||
+ struct drm_device *dev = state->dev;
|
||||
+ struct vc4_dev *vc4 = to_vc4_dev(dev);
|
||||
+
|
||||
+ drm_atomic_helper_commit_modeset_disables(dev, state);
|
||||
+
|
||||
+ drm_atomic_helper_commit_planes(dev, state, false);
|
||||
+
|
||||
+ drm_atomic_helper_commit_modeset_enables(dev, state);
|
||||
+
|
||||
+ drm_atomic_helper_wait_for_vblanks(dev, state);
|
||||
+
|
||||
+ drm_atomic_helper_cleanup_planes(dev, state);
|
||||
+
|
||||
+ drm_atomic_state_free(state);
|
||||
+
|
||||
+ up(&vc4->async_modeset);
|
||||
+
|
||||
+ kfree(c);
|
||||
+}
|
||||
+
|
||||
+static void
|
||||
+vc4_atomic_complete_commit_seqno_cb(struct vc4_seqno_cb *cb)
|
||||
+{
|
||||
+ struct vc4_commit *c = container_of(cb, struct vc4_commit, cb);
|
||||
+
|
||||
+ vc4_atomic_complete_commit(c);
|
||||
+}
|
||||
+
|
||||
+static struct vc4_commit *commit_init(struct drm_atomic_state *state)
|
||||
+{
|
||||
+ struct vc4_commit *c = kzalloc(sizeof(*c), GFP_KERNEL);
|
||||
+
|
||||
+ if (!c)
|
||||
+ return NULL;
|
||||
+ c->dev = state->dev;
|
||||
+ c->state = state;
|
||||
+
|
||||
+ return c;
|
||||
+}
|
||||
+
|
||||
+/**
|
||||
+ * vc4_atomic_commit - commit validated state object
|
||||
+ * @dev: DRM device
|
||||
+ * @state: the driver state object
|
||||
+ * @async: asynchronous commit
|
||||
+ *
|
||||
+ * This function commits a with drm_atomic_helper_check() pre-validated state
|
||||
+ * object. This can still fail when e.g. the framebuffer reservation fails. For
|
||||
+ * now this doesn't implement asynchronous commits.
|
||||
+ *
|
||||
+ * RETURNS
|
||||
+ * Zero for success or -errno.
|
||||
+ */
|
||||
+static int vc4_atomic_commit(struct drm_device *dev,
|
||||
+ struct drm_atomic_state *state,
|
||||
+ bool async)
|
||||
+{
|
||||
+ struct vc4_dev *vc4 = to_vc4_dev(dev);
|
||||
+ int ret;
|
||||
+ int i;
|
||||
+ uint64_t wait_seqno = 0;
|
||||
+ struct vc4_commit *c;
|
||||
+
|
||||
+ c = commit_init(state);
|
||||
+ if (!c)
|
||||
+ return -ENOMEM;
|
||||
+
|
||||
+ /* Make sure that any outstanding modesets have finished. */
|
||||
+ ret = down_interruptible(&vc4->async_modeset);
|
||||
+ if (ret) {
|
||||
+ kfree(c);
|
||||
+ return ret;
|
||||
+ }
|
||||
+
|
||||
+ ret = drm_atomic_helper_prepare_planes(dev, state);
|
||||
+ if (ret) {
|
||||
+ kfree(c);
|
||||
+ up(&vc4->async_modeset);
|
||||
+ return ret;
|
||||
+ }
|
||||
+
|
||||
+ for (i = 0; i < dev->mode_config.num_total_plane; i++) {
|
||||
+ struct drm_plane *plane = state->planes[i];
|
||||
+ struct drm_plane_state *new_state = state->plane_states[i];
|
||||
+
|
||||
+ if (!plane)
|
||||
+ continue;
|
||||
+
|
||||
+ if ((plane->state->fb != new_state->fb) && new_state->fb) {
|
||||
+ struct drm_gem_cma_object *cma_bo =
|
||||
+ drm_fb_cma_get_gem_obj(new_state->fb, 0);
|
||||
+ struct vc4_bo *bo = to_vc4_bo(&cma_bo->base);
|
||||
+
|
||||
+ wait_seqno = max(bo->seqno, wait_seqno);
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ /*
|
||||
+ * This is the point of no return - everything below never fails except
|
||||
+ * when the hw goes bonghits. Which means we can commit the new state on
|
||||
+ * the software side now.
|
||||
+ */
|
||||
+
|
||||
+ drm_atomic_helper_swap_state(dev, state);
|
||||
+
|
||||
+ /*
|
||||
+ * Everything below can be run asynchronously without the need to grab
|
||||
+ * any modeset locks at all under one condition: It must be guaranteed
|
||||
+ * that the asynchronous work has either been cancelled (if the driver
|
||||
+ * supports it, which at least requires that the framebuffers get
|
||||
+ * cleaned up with drm_atomic_helper_cleanup_planes()) or completed
|
||||
+ * before the new state gets committed on the software side with
|
||||
+ * drm_atomic_helper_swap_state().
|
||||
+ *
|
||||
+ * This scheme allows new atomic state updates to be prepared and
|
||||
+ * checked in parallel to the asynchronous completion of the previous
|
||||
+ * update. Which is important since compositors need to figure out the
|
||||
+ * composition of the next frame right after having submitted the
|
||||
+ * current layout.
|
||||
+ */
|
||||
+
|
||||
+ if (async) {
|
||||
+ vc4_queue_seqno_cb(dev, &c->cb, wait_seqno,
|
||||
+ vc4_atomic_complete_commit_seqno_cb);
|
||||
+ } else {
|
||||
+ vc4_wait_for_seqno(dev, wait_seqno, ~0ull, false);
|
||||
+ vc4_atomic_complete_commit(c);
|
||||
+ }
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
static const struct drm_mode_config_funcs vc4_mode_funcs = {
|
||||
.output_poll_changed = vc4_output_poll_changed,
|
||||
.atomic_check = drm_atomic_helper_check,
|
||||
- .atomic_commit = drm_atomic_helper_commit,
|
||||
+ .atomic_commit = vc4_atomic_commit,
|
||||
.fb_create = drm_fb_cma_create,
|
||||
};
|
||||
|
||||
@@ -41,6 +184,8 @@ int vc4_kms_load(struct drm_device *dev)
|
||||
struct vc4_dev *vc4 = to_vc4_dev(dev);
|
||||
int ret;
|
||||
|
||||
+ sema_init(&vc4->async_modeset, 1);
|
||||
+
|
||||
ret = drm_vblank_init(dev, dev->mode_config.num_crtc);
|
||||
if (ret < 0) {
|
||||
dev_err(dev->dev, "failed to initialize vblank\n");
|
||||
@@ -51,6 +196,8 @@ int vc4_kms_load(struct drm_device *dev)
|
||||
dev->mode_config.max_height = 2048;
|
||||
dev->mode_config.funcs = &vc4_mode_funcs;
|
||||
dev->mode_config.preferred_depth = 24;
|
||||
+ dev->mode_config.async_page_flip = true;
|
||||
+
|
||||
dev->vblank_disable_allowed = true;
|
||||
|
||||
drm_mode_config_reset(dev);
|
||||
diff --git a/drivers/gpu/drm/vc4/vc4_plane.c b/drivers/gpu/drm/vc4/vc4_plane.c
|
||||
index cdd8b10..db32c373 100644
|
||||
--- a/drivers/gpu/drm/vc4/vc4_plane.c
|
||||
+++ b/drivers/gpu/drm/vc4/vc4_plane.c
|
||||
@@ -29,6 +29,14 @@ struct vc4_plane_state {
|
||||
u32 *dlist;
|
||||
u32 dlist_size; /* Number of dwords in allocated for the display list */
|
||||
u32 dlist_count; /* Number of used dwords in the display list. */
|
||||
+
|
||||
+ /* Offset in the dlist to pointer word 0. */
|
||||
+ u32 pw0_offset;
|
||||
+
|
||||
+ /* Offset where the plane's dlist was last stored in the
|
||||
+ hardware at vc4_crtc_atomic_flush() time.
|
||||
+ */
|
||||
+ u32 *hw_dlist;
|
||||
};
|
||||
|
||||
static inline struct vc4_plane_state *
|
||||
@@ -197,6 +205,8 @@ static int vc4_plane_mode_set(struct drm_plane *plane,
|
||||
/* Position Word 3: Context. Written by the HVS. */
|
||||
vc4_dlist_write(vc4_state, 0xc0c0c0c0);
|
||||
|
||||
+ vc4_state->pw0_offset = vc4_state->dlist_count;
|
||||
+
|
||||
/* Pointer Word 0: RGB / Y Pointer */
|
||||
vc4_dlist_write(vc4_state, bo->paddr + offset);
|
||||
|
||||
@@ -248,6 +258,8 @@ u32 vc4_plane_write_dlist(struct drm_plane *plane, u32 __iomem *dlist)
|
||||
struct vc4_plane_state *vc4_state = to_vc4_plane_state(plane->state);
|
||||
int i;
|
||||
|
||||
+ vc4_state->hw_dlist = dlist;
|
||||
+
|
||||
/* Can't memcpy_toio() because it needs to be 32-bit writes. */
|
||||
for (i = 0; i < vc4_state->dlist_count; i++)
|
||||
writel(vc4_state->dlist[i], &dlist[i]);
|
||||
@@ -262,6 +274,34 @@ u32 vc4_plane_dlist_size(struct drm_plane_state *state)
|
||||
return vc4_state->dlist_count;
|
||||
}
|
||||
|
||||
+/* Updates the plane to immediately (well, once the FIFO needs
|
||||
+ * refilling) scan out from at a new framebuffer.
|
||||
+ */
|
||||
+void vc4_plane_async_set_fb(struct drm_plane *plane, struct drm_framebuffer *fb)
|
||||
+{
|
||||
+ struct vc4_plane_state *vc4_state = to_vc4_plane_state(plane->state);
|
||||
+ struct drm_gem_cma_object *bo = drm_fb_cma_get_gem_obj(fb, 0);
|
||||
+ uint32_t addr;
|
||||
+
|
||||
+ /* We're skipping the address adjustment for negative origin,
|
||||
+ * because this is only called on the primary plane.
|
||||
+ */
|
||||
+ WARN_ON_ONCE(plane->state->crtc_x < 0 || plane->state->crtc_y < 0);
|
||||
+ addr = bo->paddr + fb->offsets[0];
|
||||
+
|
||||
+ /* Write the new address into the hardware immediately. The
|
||||
+ * scanout will start from this address as soon as the FIFO
|
||||
+ * needs to refill with pixels.
|
||||
+ */
|
||||
+ writel(addr, &vc4_state->hw_dlist[vc4_state->pw0_offset]);
|
||||
+
|
||||
+ /* Also update the CPU-side dlist copy, so that any later
|
||||
+ * atomic updates that don't do a new modeset on our plane
|
||||
+ * also use our updated address.
|
||||
+ */
|
||||
+ vc4_state->dlist[vc4_state->pw0_offset] = addr;
|
||||
+}
|
||||
+
|
||||
static const struct drm_plane_helper_funcs vc4_plane_helper_funcs = {
|
||||
.prepare_fb = NULL,
|
||||
.cleanup_fb = NULL,
|
||||
--
|
||||
2.6.4
|
||||
|
||||
-333
@@ -1,333 +0,0 @@
|
||||
From 214613656b5179f0daab6e0a080814b5100d45f0 Mon Sep 17 00:00:00 2001
|
||||
From: Eric Anholt <eric@anholt.net>
|
||||
Date: Fri, 30 Oct 2015 10:09:02 -0700
|
||||
Subject: [PATCH 9/9] drm/vc4: Add an interface for capturing the GPU state
|
||||
after a hang.
|
||||
|
||||
This can be parsed with vc4-gpu-tools tools for trying to figure out
|
||||
what was going on.
|
||||
|
||||
v2: Use __u32-style types.
|
||||
|
||||
Signed-off-by: Eric Anholt <eric@anholt.net>
|
||||
---
|
||||
drivers/gpu/drm/vc4/vc4_drv.c | 2 +
|
||||
drivers/gpu/drm/vc4/vc4_drv.h | 4 +
|
||||
drivers/gpu/drm/vc4/vc4_gem.c | 185 ++++++++++++++++++++++++++++++++++++++++++
|
||||
include/uapi/drm/vc4_drm.h | 45 ++++++++++
|
||||
4 files changed, 236 insertions(+)
|
||||
|
||||
diff --git a/drivers/gpu/drm/vc4/vc4_drv.c b/drivers/gpu/drm/vc4/vc4_drv.c
|
||||
index 2cfee59..97226b6 100644
|
||||
--- a/drivers/gpu/drm/vc4/vc4_drv.c
|
||||
+++ b/drivers/gpu/drm/vc4/vc4_drv.c
|
||||
@@ -80,6 +80,8 @@ static const struct drm_ioctl_desc vc4_drm_ioctls[] = {
|
||||
DRM_IOCTL_DEF_DRV(VC4_CREATE_BO, vc4_create_bo_ioctl, 0),
|
||||
DRM_IOCTL_DEF_DRV(VC4_MMAP_BO, vc4_mmap_bo_ioctl, 0),
|
||||
DRM_IOCTL_DEF_DRV(VC4_CREATE_SHADER_BO, vc4_create_shader_bo_ioctl, 0),
|
||||
+ DRM_IOCTL_DEF_DRV(VC4_GET_HANG_STATE, vc4_get_hang_state_ioctl,
|
||||
+ DRM_ROOT_ONLY),
|
||||
};
|
||||
|
||||
static struct drm_driver vc4_drm_driver = {
|
||||
diff --git a/drivers/gpu/drm/vc4/vc4_drv.h b/drivers/gpu/drm/vc4/vc4_drv.h
|
||||
index f9927d8..080865e 100644
|
||||
--- a/drivers/gpu/drm/vc4/vc4_drv.h
|
||||
+++ b/drivers/gpu/drm/vc4/vc4_drv.h
|
||||
@@ -19,6 +19,8 @@ struct vc4_dev {
|
||||
|
||||
struct drm_fbdev_cma *fbdev;
|
||||
|
||||
+ struct vc4_hang_state *hang_state;
|
||||
+
|
||||
/* The kernel-space BO cache. Tracks buffers that have been
|
||||
* unreferenced by all other users (refcounts of 0!) but not
|
||||
* yet freed, so we can do cheap allocations.
|
||||
@@ -361,6 +363,8 @@ int vc4_create_shader_bo_ioctl(struct drm_device *dev, void *data,
|
||||
struct drm_file *file_priv);
|
||||
int vc4_mmap_bo_ioctl(struct drm_device *dev, void *data,
|
||||
struct drm_file *file_priv);
|
||||
+int vc4_get_hang_state_ioctl(struct drm_device *dev, void *data,
|
||||
+ struct drm_file *file_priv);
|
||||
int vc4_mmap(struct file *filp, struct vm_area_struct *vma);
|
||||
int vc4_prime_mmap(struct drm_gem_object *obj, struct vm_area_struct *vma);
|
||||
void *vc4_prime_vmap(struct drm_gem_object *obj);
|
||||
diff --git a/drivers/gpu/drm/vc4/vc4_gem.c b/drivers/gpu/drm/vc4/vc4_gem.c
|
||||
index 5fb0556..39f29e7 100644
|
||||
--- a/drivers/gpu/drm/vc4/vc4_gem.c
|
||||
+++ b/drivers/gpu/drm/vc4/vc4_gem.c
|
||||
@@ -40,6 +40,186 @@ vc4_queue_hangcheck(struct drm_device *dev)
|
||||
round_jiffies_up(jiffies + msecs_to_jiffies(100)));
|
||||
}
|
||||
|
||||
+struct vc4_hang_state {
|
||||
+ struct drm_vc4_get_hang_state user_state;
|
||||
+
|
||||
+ u32 bo_count;
|
||||
+ struct drm_gem_object **bo;
|
||||
+};
|
||||
+
|
||||
+static void
|
||||
+vc4_free_hang_state(struct drm_device *dev, struct vc4_hang_state *state)
|
||||
+{
|
||||
+ unsigned int i;
|
||||
+
|
||||
+ mutex_lock(&dev->struct_mutex);
|
||||
+ for (i = 0; i < state->user_state.bo_count; i++)
|
||||
+ drm_gem_object_unreference(state->bo[i]);
|
||||
+ mutex_unlock(&dev->struct_mutex);
|
||||
+
|
||||
+ kfree(state);
|
||||
+}
|
||||
+
|
||||
+int
|
||||
+vc4_get_hang_state_ioctl(struct drm_device *dev, void *data,
|
||||
+ struct drm_file *file_priv)
|
||||
+{
|
||||
+ struct drm_vc4_get_hang_state *get_state = data;
|
||||
+ struct drm_vc4_get_hang_state_bo *bo_state;
|
||||
+ struct vc4_hang_state *kernel_state;
|
||||
+ struct drm_vc4_get_hang_state *state;
|
||||
+ struct vc4_dev *vc4 = to_vc4_dev(dev);
|
||||
+ unsigned long irqflags;
|
||||
+ u32 i;
|
||||
+ int ret;
|
||||
+
|
||||
+ spin_lock_irqsave(&vc4->job_lock, irqflags);
|
||||
+ kernel_state = vc4->hang_state;
|
||||
+ if (!kernel_state) {
|
||||
+ spin_unlock_irqrestore(&vc4->job_lock, irqflags);
|
||||
+ return -ENOENT;
|
||||
+ }
|
||||
+ state = &kernel_state->user_state;
|
||||
+
|
||||
+ /* If the user's array isn't big enough, just return the
|
||||
+ * required array size.
|
||||
+ */
|
||||
+ if (get_state->bo_count < state->bo_count) {
|
||||
+ get_state->bo_count = state->bo_count;
|
||||
+ spin_unlock_irqrestore(&vc4->job_lock, irqflags);
|
||||
+ return 0;
|
||||
+ }
|
||||
+
|
||||
+ vc4->hang_state = NULL;
|
||||
+ spin_unlock_irqrestore(&vc4->job_lock, irqflags);
|
||||
+
|
||||
+ /* Save the user's BO pointer, so we don't stomp it with the memcpy. */
|
||||
+ state->bo = get_state->bo;
|
||||
+ memcpy(get_state, state, sizeof(*state));
|
||||
+
|
||||
+ bo_state = kcalloc(state->bo_count, sizeof(*bo_state), GFP_KERNEL);
|
||||
+ if (!bo_state) {
|
||||
+ ret = -ENOMEM;
|
||||
+ goto err_free;
|
||||
+ }
|
||||
+
|
||||
+ for (i = 0; i < state->bo_count; i++) {
|
||||
+ struct vc4_bo *vc4_bo = to_vc4_bo(kernel_state->bo[i]);
|
||||
+ u32 handle;
|
||||
+
|
||||
+ ret = drm_gem_handle_create(file_priv, kernel_state->bo[i],
|
||||
+ &handle);
|
||||
+
|
||||
+ if (ret) {
|
||||
+ state->bo_count = i - 1;
|
||||
+ goto err;
|
||||
+ }
|
||||
+ bo_state[i].handle = handle;
|
||||
+ bo_state[i].paddr = vc4_bo->base.paddr;
|
||||
+ bo_state[i].size = vc4_bo->base.base.size;
|
||||
+ }
|
||||
+
|
||||
+ ret = copy_to_user((void __user *)(uintptr_t)get_state->bo,
|
||||
+ bo_state,
|
||||
+ state->bo_count * sizeof(*bo_state));
|
||||
+ kfree(bo_state);
|
||||
+
|
||||
+err_free:
|
||||
+
|
||||
+ vc4_free_hang_state(dev, kernel_state);
|
||||
+
|
||||
+err:
|
||||
+ return ret;
|
||||
+}
|
||||
+
|
||||
+static void
|
||||
+vc4_save_hang_state(struct drm_device *dev)
|
||||
+{
|
||||
+ struct vc4_dev *vc4 = to_vc4_dev(dev);
|
||||
+ struct drm_vc4_get_hang_state *state;
|
||||
+ struct vc4_hang_state *kernel_state;
|
||||
+ struct vc4_exec_info *exec;
|
||||
+ struct vc4_bo *bo;
|
||||
+ unsigned long irqflags;
|
||||
+ unsigned int i, unref_list_count;
|
||||
+
|
||||
+ kernel_state = kcalloc(1, sizeof(*state), GFP_KERNEL);
|
||||
+ if (!kernel_state)
|
||||
+ return;
|
||||
+
|
||||
+ state = &kernel_state->user_state;
|
||||
+
|
||||
+ spin_lock_irqsave(&vc4->job_lock, irqflags);
|
||||
+ exec = vc4_first_job(vc4);
|
||||
+ if (!exec) {
|
||||
+ spin_unlock_irqrestore(&vc4->job_lock, irqflags);
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
+ unref_list_count = 0;
|
||||
+ list_for_each_entry(bo, &exec->unref_list, unref_head)
|
||||
+ unref_list_count++;
|
||||
+
|
||||
+ state->bo_count = exec->bo_count + unref_list_count;
|
||||
+ kernel_state->bo = kcalloc(state->bo_count, sizeof(*kernel_state->bo),
|
||||
+ GFP_ATOMIC);
|
||||
+ if (!kernel_state->bo) {
|
||||
+ spin_unlock_irqrestore(&vc4->job_lock, irqflags);
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
+ for (i = 0; i < exec->bo_count; i++) {
|
||||
+ drm_gem_object_reference(&exec->bo[i]->base);
|
||||
+ kernel_state->bo[i] = &exec->bo[i]->base;
|
||||
+ }
|
||||
+
|
||||
+ list_for_each_entry(bo, &exec->unref_list, unref_head) {
|
||||
+ drm_gem_object_reference(&bo->base.base);
|
||||
+ kernel_state->bo[i] = &bo->base.base;
|
||||
+ i++;
|
||||
+ }
|
||||
+
|
||||
+ state->start_bin = exec->ct0ca;
|
||||
+ state->start_render = exec->ct1ca;
|
||||
+
|
||||
+ spin_unlock_irqrestore(&vc4->job_lock, irqflags);
|
||||
+
|
||||
+ state->ct0ca = V3D_READ(V3D_CTNCA(0));
|
||||
+ state->ct0ea = V3D_READ(V3D_CTNEA(0));
|
||||
+
|
||||
+ state->ct1ca = V3D_READ(V3D_CTNCA(1));
|
||||
+ state->ct1ea = V3D_READ(V3D_CTNEA(1));
|
||||
+
|
||||
+ state->ct0cs = V3D_READ(V3D_CTNCS(0));
|
||||
+ state->ct1cs = V3D_READ(V3D_CTNCS(1));
|
||||
+
|
||||
+ state->ct0ra0 = V3D_READ(V3D_CT00RA0);
|
||||
+ state->ct1ra0 = V3D_READ(V3D_CT01RA0);
|
||||
+
|
||||
+ state->bpca = V3D_READ(V3D_BPCA);
|
||||
+ state->bpcs = V3D_READ(V3D_BPCS);
|
||||
+ state->bpoa = V3D_READ(V3D_BPOA);
|
||||
+ state->bpos = V3D_READ(V3D_BPOS);
|
||||
+
|
||||
+ state->vpmbase = V3D_READ(V3D_VPMBASE);
|
||||
+
|
||||
+ state->dbge = V3D_READ(V3D_DBGE);
|
||||
+ state->fdbgo = V3D_READ(V3D_FDBGO);
|
||||
+ state->fdbgb = V3D_READ(V3D_FDBGB);
|
||||
+ state->fdbgr = V3D_READ(V3D_FDBGR);
|
||||
+ state->fdbgs = V3D_READ(V3D_FDBGS);
|
||||
+ state->errstat = V3D_READ(V3D_ERRSTAT);
|
||||
+
|
||||
+ spin_lock_irqsave(&vc4->job_lock, irqflags);
|
||||
+ if (vc4->hang_state) {
|
||||
+ spin_unlock_irqrestore(&vc4->job_lock, irqflags);
|
||||
+ vc4_free_hang_state(dev, kernel_state);
|
||||
+ } else {
|
||||
+ vc4->hang_state = kernel_state;
|
||||
+ spin_unlock_irqrestore(&vc4->job_lock, irqflags);
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
static void
|
||||
vc4_reset(struct drm_device *dev)
|
||||
{
|
||||
@@ -64,6 +244,8 @@ vc4_reset_work(struct work_struct *work)
|
||||
struct vc4_dev *vc4 =
|
||||
container_of(work, struct vc4_dev, hangcheck.reset_work);
|
||||
|
||||
+ vc4_save_hang_state(vc4->dev);
|
||||
+
|
||||
vc4_reset(vc4->dev);
|
||||
}
|
||||
|
||||
@@ -679,4 +861,7 @@ vc4_gem_destroy(struct drm_device *dev)
|
||||
}
|
||||
|
||||
vc4_bo_cache_destroy(dev);
|
||||
+
|
||||
+ if (vc4->hang_state)
|
||||
+ vc4_free_hang_state(dev, vc4->hang_state);
|
||||
}
|
||||
diff --git a/include/uapi/drm/vc4_drm.h b/include/uapi/drm/vc4_drm.h
|
||||
index fe4161b..eeb37e3 100644
|
||||
--- a/include/uapi/drm/vc4_drm.h
|
||||
+++ b/include/uapi/drm/vc4_drm.h
|
||||
@@ -32,6 +32,7 @@
|
||||
#define DRM_VC4_CREATE_BO 0x03
|
||||
#define DRM_VC4_MMAP_BO 0x04
|
||||
#define DRM_VC4_CREATE_SHADER_BO 0x05
|
||||
+#define DRM_VC4_GET_HANG_STATE 0x06
|
||||
|
||||
#define DRM_IOCTL_VC4_SUBMIT_CL DRM_IOWR(DRM_COMMAND_BASE + DRM_VC4_SUBMIT_CL, struct drm_vc4_submit_cl)
|
||||
#define DRM_IOCTL_VC4_WAIT_SEQNO DRM_IOWR(DRM_COMMAND_BASE + DRM_VC4_WAIT_SEQNO, struct drm_vc4_wait_seqno)
|
||||
@@ -39,6 +40,7 @@
|
||||
#define DRM_IOCTL_VC4_CREATE_BO DRM_IOWR(DRM_COMMAND_BASE + DRM_VC4_CREATE_BO, struct drm_vc4_create_bo)
|
||||
#define DRM_IOCTL_VC4_MMAP_BO DRM_IOWR(DRM_COMMAND_BASE + DRM_VC4_MMAP_BO, struct drm_vc4_mmap_bo)
|
||||
#define DRM_IOCTL_VC4_CREATE_SHADER_BO DRM_IOWR(DRM_COMMAND_BASE + DRM_VC4_CREATE_SHADER_BO, struct drm_vc4_create_shader_bo)
|
||||
+#define DRM_IOCTL_VC4_GET_HANG_STATE DRM_IOWR(DRM_COMMAND_BASE + DRM_VC4_GET_HANG_STATE, struct drm_vc4_get_hang_state)
|
||||
|
||||
struct drm_vc4_submit_rcl_surface {
|
||||
__u32 hindex; /* Handle index, or ~0 if not present. */
|
||||
@@ -231,4 +233,47 @@ struct drm_vc4_create_shader_bo {
|
||||
__u32 pad;
|
||||
};
|
||||
|
||||
+struct drm_vc4_get_hang_state_bo {
|
||||
+ __u32 handle;
|
||||
+ __u32 paddr;
|
||||
+ __u32 size;
|
||||
+ __u32 pad;
|
||||
+};
|
||||
+
|
||||
+/**
|
||||
+ * struct drm_vc4_hang_state - ioctl argument for collecting state
|
||||
+ * from a GPU hang for analysis.
|
||||
+*/
|
||||
+struct drm_vc4_get_hang_state {
|
||||
+ /** Pointer to array of struct drm_vc4_get_hang_state_bo. */
|
||||
+ __u64 bo;
|
||||
+ /**
|
||||
+ * On input, the size of the bo array. Output is the number
|
||||
+ * of bos to be returned.
|
||||
+ */
|
||||
+ __u32 bo_count;
|
||||
+
|
||||
+ __u32 start_bin, start_render;
|
||||
+
|
||||
+ __u32 ct0ca, ct0ea;
|
||||
+ __u32 ct1ca, ct1ea;
|
||||
+ __u32 ct0cs, ct1cs;
|
||||
+ __u32 ct0ra0, ct1ra0;
|
||||
+
|
||||
+ __u32 bpca, bpcs;
|
||||
+ __u32 bpoa, bpos;
|
||||
+
|
||||
+ __u32 vpmbase;
|
||||
+
|
||||
+ __u32 dbge;
|
||||
+ __u32 fdbgo;
|
||||
+ __u32 fdbgb;
|
||||
+ __u32 fdbgr;
|
||||
+ __u32 fdbgs;
|
||||
+ __u32 errstat;
|
||||
+
|
||||
+ /* Pad that we may save more registers into in the future. */
|
||||
+ __u32 pad[16];
|
||||
+};
|
||||
+
|
||||
#endif /* _UAPI_VC4_DRM_H_ */
|
||||
--
|
||||
2.6.4
|
||||
|
||||
-35
@@ -1,35 +0,0 @@
|
||||
From: Chris Wilson <chris@chris-wilson.co.uk>
|
||||
Subject: [PATCH] drm/i915: Fix RPS pointer passed from wait_ioctl to i915_wait_request
|
||||
Date: Wed, 2 Dec 2015 09:13:46 +0000
|
||||
|
||||
In commit 2e1b873072dfe3bbcc158a9c21acde1ab0d36c55 [v4.2]
|
||||
Author: Chris Wilson <chris@chris-wilson.co.uk>
|
||||
Date: Mon Apr 27 13:41:22 2015 +0100
|
||||
|
||||
drm/i915: Convert RPS tracking to a intel_rps_client struct
|
||||
|
||||
we converted the __i915_wait_request() to take a new intel_rps_client
|
||||
struct (rather than having to pass fake drm_i915_file_private structs).
|
||||
However, due to use of passing a void pointer, I didn't spot one
|
||||
callsite in wait-ioctl was passing the wrong pointer.
|
||||
|
||||
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
||||
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
|
||||
Cc: stable@vger.kernel.org
|
||||
---
|
||||
drivers/gpu/drm/i915/i915_gem.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
|
||||
index f5aef48b93db..cd8c4024af92 100644
|
||||
--- a/drivers/gpu/drm/i915/i915_gem.c
|
||||
+++ b/drivers/gpu/drm/i915/i915_gem.c
|
||||
@@ -3045,7 +3045,7 @@ i915_gem_wait_ioctl(struct drm_device *d
|
||||
if (ret == 0)
|
||||
ret = __i915_wait_request(req[i], reset_counter, true,
|
||||
args->timeout_ns > 0 ? &args->timeout_ns : NULL,
|
||||
- file->driver_priv);
|
||||
+ to_rps_client(file));
|
||||
i915_gem_request_unreference__unlocked(req[i]);
|
||||
}
|
||||
return ret;
|
||||
+63
@@ -0,0 +1,63 @@
|
||||
From 1e3fa0acfec677e915d7de5ac6e1f18cfa4f805b Mon Sep 17 00:00:00 2001
|
||||
From: Lyude <cpaul@redhat.com>
|
||||
Date: Thu, 9 Jun 2016 11:58:15 -0400
|
||||
Subject: [PATCH] drm/i915/fbc: Disable on HSW by default for now
|
||||
|
||||
>From https://bugs.freedesktop.org/show_bug.cgi?id=96461 :
|
||||
|
||||
This was kind of a difficult bug to track down. If you're using a
|
||||
Haswell system running GNOME and you have fbc completely enabled and
|
||||
working, playing videos can result in video artifacts. Steps to
|
||||
reproduce:
|
||||
|
||||
- Run GNOME
|
||||
- Ensure FBC is enabled and active
|
||||
- Download a movie, I used the ogg version of Big Buck Bunny for this
|
||||
- Run `gst-launch-1.0 filesrc location='some_movie.ogg' ! decodebin !
|
||||
glimagesink` in a terminal
|
||||
- Watch for about over a minute, you'll see small horizontal lines go
|
||||
down the screen.
|
||||
|
||||
For the time being, disable FBC for Haswell by default.
|
||||
|
||||
Stefan Richter reported kernel freezes (no video artifacts) when fbc
|
||||
is on. (E3-1245 v3 with HD P4600; openbox and some KDE and LXDE
|
||||
applications, thread begins at https://lkml.org/lkml/2016/4/26/813).
|
||||
We also got reports from Steven Honeyman on openbox+roxterm.
|
||||
|
||||
v2 (From Paulo):
|
||||
- Add extra information to the commit message
|
||||
- Add Fixes tag
|
||||
- Rebase
|
||||
|
||||
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=96461
|
||||
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=96464
|
||||
Fixes: a98ee79317b4 ("drm/i915/fbc: enable FBC by default on HSW and BDW")
|
||||
Cc: stable@vger.kernel.org
|
||||
Reviewed-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
|
||||
Signed-off-by: Lyude <cpaul@redhat.com>
|
||||
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
|
||||
Link: http://patchwork.freedesktop.org/patch/msgid/1465487895-7401-1-git-send-email-cpaul@redhat.com
|
||||
(cherry picked from commit c7f7e2feffb0294302041507dfd5fc15f01afccc)
|
||||
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
|
||||
---
|
||||
drivers/gpu/drm/i915/intel_fbc.c | 3 +--
|
||||
1 file changed, 1 insertion(+), 2 deletions(-)
|
||||
|
||||
diff --git a/drivers/gpu/drm/i915/intel_fbc.c b/drivers/gpu/drm/i915/intel_fbc.c
|
||||
index d5a7cfe..647127f 100644
|
||||
--- a/drivers/gpu/drm/i915/intel_fbc.c
|
||||
+++ b/drivers/gpu/drm/i915/intel_fbc.c
|
||||
@@ -824,8 +824,7 @@ static bool intel_fbc_can_choose(struct intel_crtc *crtc)
|
||||
{
|
||||
struct drm_i915_private *dev_priv = crtc->base.dev->dev_private;
|
||||
struct intel_fbc *fbc = &dev_priv->fbc;
|
||||
- bool enable_by_default = IS_HASWELL(dev_priv) ||
|
||||
- IS_BROADWELL(dev_priv);
|
||||
+ bool enable_by_default = IS_BROADWELL(dev_priv);
|
||||
|
||||
if (intel_vgpu_active(dev_priv->dev)) {
|
||||
fbc->no_fbc_reason = "VGPU is active";
|
||||
--
|
||||
2.9.0
|
||||
|
||||
-34
@@ -1,34 +0,0 @@
|
||||
From 85a21eafbc2218ffba59b1dda2ce9d7148bf43d2 Mon Sep 17 00:00:00 2001
|
||||
From: Thierry Reding <treding@nvidia.com>
|
||||
Date: Mon, 4 Jan 2016 18:19:12 +0100
|
||||
Subject: [PATCH] drm/radeon: Drop unnecessary unsigned int < 0 check
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Unsigned integers can never be negative, so drop this check.
|
||||
|
||||
Cc: Christian König <christian.koenig@amd.com>
|
||||
Cc: Alex Deucher <alexander.deucher@amd.com>
|
||||
Signed-off-by: Thierry Reding <treding@nvidia.com>
|
||||
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
|
||||
---
|
||||
drivers/gpu/drm/radeon/radeon_kms.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/drivers/gpu/drm/radeon/radeon_kms.c b/drivers/gpu/drm/radeon/radeon_kms.c
|
||||
index 4fab44e..414953c 100644
|
||||
--- a/drivers/gpu/drm/radeon/radeon_kms.c
|
||||
+++ b/drivers/gpu/drm/radeon/radeon_kms.c
|
||||
@@ -759,7 +759,7 @@ u32 radeon_get_vblank_counter_kms(struct drm_device *dev, unsigned int pipe)
|
||||
u32 count;
|
||||
struct radeon_device *rdev = dev->dev_private;
|
||||
|
||||
- if (pipe < 0 || pipe >= rdev->num_crtc) {
|
||||
+ if (pipe >= rdev->num_crtc) {
|
||||
DRM_ERROR("Invalid crtc %u\n", pipe);
|
||||
return -EINVAL;
|
||||
}
|
||||
--
|
||||
2.3.10
|
||||
|
||||
-106
@@ -1,106 +0,0 @@
|
||||
From 4e926d2db58244fca9845c78a5d6f873ac73795b Mon Sep 17 00:00:00 2001
|
||||
From: Thierry Reding <treding@nvidia.com>
|
||||
Date: Wed, 16 Dec 2015 15:31:47 +0100
|
||||
Subject: [PATCH] drm/radeon: Update radeon_get_vblank_counter_kms()
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Commit 88e72717c2de ("drm/irq: Use unsigned int pipe in public API")
|
||||
updated the prototype of this function but not the implementation. This
|
||||
wasn't noticed even through compile tests because the prototype is part
|
||||
of the source file that uses it and hence the compiler won't know the
|
||||
prototype when it compiles the implementation.
|
||||
|
||||
The right thing would've been to move the prototype to a header that's
|
||||
included in radeon_kms.c so that the implementation signature could be
|
||||
checked against it, but the closest thing would've been radeon_drv.h
|
||||
and including that results in a lot of build errors, so we'll leave it
|
||||
as is for now.
|
||||
|
||||
Cc: Christian König <christian.koenig@amd.com>
|
||||
Cc: Alex Deucher <alexander.deucher@amd.com>
|
||||
Reviewed-by: Christian König <christian.koenig@amd.com>
|
||||
Signed-off-by: Thierry Reding <treding@nvidia.com>
|
||||
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
|
||||
---
|
||||
drivers/gpu/drm/radeon/radeon_kms.c | 24 ++++++++++++------------
|
||||
1 file changed, 12 insertions(+), 12 deletions(-)
|
||||
|
||||
diff --git a/drivers/gpu/drm/radeon/radeon_kms.c b/drivers/gpu/drm/radeon/radeon_kms.c
|
||||
index d290a8a..4fab44e 100644
|
||||
--- a/drivers/gpu/drm/radeon/radeon_kms.c
|
||||
+++ b/drivers/gpu/drm/radeon/radeon_kms.c
|
||||
@@ -748,19 +748,19 @@ void radeon_driver_preclose_kms(struct drm_device *dev,
|
||||
* radeon_get_vblank_counter_kms - get frame count
|
||||
*
|
||||
* @dev: drm dev pointer
|
||||
- * @crtc: crtc to get the frame count from
|
||||
+ * @pipe: crtc to get the frame count from
|
||||
*
|
||||
* Gets the frame count on the requested crtc (all asics).
|
||||
* Returns frame count on success, -EINVAL on failure.
|
||||
*/
|
||||
-u32 radeon_get_vblank_counter_kms(struct drm_device *dev, int crtc)
|
||||
+u32 radeon_get_vblank_counter_kms(struct drm_device *dev, unsigned int pipe)
|
||||
{
|
||||
int vpos, hpos, stat;
|
||||
u32 count;
|
||||
struct radeon_device *rdev = dev->dev_private;
|
||||
|
||||
- if (crtc < 0 || crtc >= rdev->num_crtc) {
|
||||
- DRM_ERROR("Invalid crtc %d\n", crtc);
|
||||
+ if (pipe < 0 || pipe >= rdev->num_crtc) {
|
||||
+ DRM_ERROR("Invalid crtc %u\n", pipe);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
@@ -772,29 +772,29 @@ u32 radeon_get_vblank_counter_kms(struct drm_device *dev, int crtc)
|
||||
* and start of vsync, so vpos >= 0 means to bump the hw frame counter
|
||||
* result by 1 to give the proper appearance to caller.
|
||||
*/
|
||||
- if (rdev->mode_info.crtcs[crtc]) {
|
||||
+ if (rdev->mode_info.crtcs[pipe]) {
|
||||
/* Repeat readout if needed to provide stable result if
|
||||
* we cross start of vsync during the queries.
|
||||
*/
|
||||
do {
|
||||
- count = radeon_get_vblank_counter(rdev, crtc);
|
||||
+ count = radeon_get_vblank_counter(rdev, pipe);
|
||||
/* Ask radeon_get_crtc_scanoutpos to return vpos as
|
||||
* distance to start of vblank, instead of regular
|
||||
* vertical scanout pos.
|
||||
*/
|
||||
stat = radeon_get_crtc_scanoutpos(
|
||||
- dev, crtc, GET_DISTANCE_TO_VBLANKSTART,
|
||||
+ dev, pipe, GET_DISTANCE_TO_VBLANKSTART,
|
||||
&vpos, &hpos, NULL, NULL,
|
||||
- &rdev->mode_info.crtcs[crtc]->base.hwmode);
|
||||
- } while (count != radeon_get_vblank_counter(rdev, crtc));
|
||||
+ &rdev->mode_info.crtcs[pipe]->base.hwmode);
|
||||
+ } while (count != radeon_get_vblank_counter(rdev, pipe));
|
||||
|
||||
if (((stat & (DRM_SCANOUTPOS_VALID | DRM_SCANOUTPOS_ACCURATE)) !=
|
||||
(DRM_SCANOUTPOS_VALID | DRM_SCANOUTPOS_ACCURATE))) {
|
||||
DRM_DEBUG_VBL("Query failed! stat %d\n", stat);
|
||||
}
|
||||
else {
|
||||
- DRM_DEBUG_VBL("crtc %d: dist from vblank start %d\n",
|
||||
- crtc, vpos);
|
||||
+ DRM_DEBUG_VBL("crtc %u: dist from vblank start %d\n",
|
||||
+ pipe, vpos);
|
||||
|
||||
/* Bump counter if we are at >= leading edge of vblank,
|
||||
* but before vsync where vpos would turn negative and
|
||||
@@ -806,7 +806,7 @@ u32 radeon_get_vblank_counter_kms(struct drm_device *dev, int crtc)
|
||||
}
|
||||
else {
|
||||
/* Fallback to use value as is. */
|
||||
- count = radeon_get_vblank_counter(rdev, crtc);
|
||||
+ count = radeon_get_vblank_counter(rdev, pipe);
|
||||
DRM_DEBUG_VBL("NULL mode info! Returned count may be wrong.\n");
|
||||
}
|
||||
|
||||
--
|
||||
2.3.10
|
||||
|
||||
+49
@@ -0,0 +1,49 @@
|
||||
From e838a45f9392a5bd2be1cd3ab0b16ae85857461c Mon Sep 17 00:00:00 2001
|
||||
From: Mel Gorman <mgorman@techsingularity.net>
|
||||
Date: Fri, 24 Jun 2016 14:49:37 -0700
|
||||
Subject: [PATCH] mm, sl[au]b: add __GFP_ATOMIC to the GFP reclaim mask
|
||||
|
||||
Commit d0164adc89f6 ("mm, page_alloc: distinguish between being unable
|
||||
to sleep, unwilling to sleep and avoiding waking kswapd") modified
|
||||
__GFP_WAIT to explicitly identify the difference between atomic callers
|
||||
and those that were unwilling to sleep. Later the definition was
|
||||
removed entirely.
|
||||
|
||||
The GFP_RECLAIM_MASK is the set of flags that affect watermark checking
|
||||
and reclaim behaviour but __GFP_ATOMIC was never added. Without it,
|
||||
atomic users of the slab allocator strip the __GFP_ATOMIC flag and
|
||||
cannot access the page allocator atomic reserves. This patch addresses
|
||||
the problem.
|
||||
|
||||
The user-visible impact depends on the workload but potentially atomic
|
||||
allocations unnecessarily fail without this path.
|
||||
|
||||
Link: http://lkml.kernel.org/r/20160610093832.GK2527@techsingularity.net
|
||||
Signed-off-by: Mel Gorman <mgorman@techsingularity.net>
|
||||
Reported-by: Marcin Wojtas <mw@semihalf.com>
|
||||
Acked-by: Vlastimil Babka <vbabka@suse.cz>
|
||||
Acked-by: Michal Hocko <mhocko@suse.com>
|
||||
Cc: <stable@vger.kernel.org> [4.4+]
|
||||
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
|
||||
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
|
||||
---
|
||||
mm/internal.h | 3 ++-
|
||||
1 file changed, 2 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/mm/internal.h b/mm/internal.h
|
||||
index a37e5b6..2524ec8 100644
|
||||
--- a/mm/internal.h
|
||||
+++ b/mm/internal.h
|
||||
@@ -24,7 +24,8 @@
|
||||
*/
|
||||
#define GFP_RECLAIM_MASK (__GFP_RECLAIM|__GFP_HIGH|__GFP_IO|__GFP_FS|\
|
||||
__GFP_NOWARN|__GFP_REPEAT|__GFP_NOFAIL|\
|
||||
- __GFP_NORETRY|__GFP_MEMALLOC|__GFP_NOMEMALLOC)
|
||||
+ __GFP_NORETRY|__GFP_MEMALLOC|__GFP_NOMEMALLOC|\
|
||||
+ __GFP_ATOMIC)
|
||||
|
||||
/* The GFP flags allowed during early boot */
|
||||
#define GFP_BOOT_MASK (__GFP_BITS_MASK & ~(__GFP_RECLAIM|__GFP_IO|__GFP_FS))
|
||||
--
|
||||
2.9.0
|
||||
|
||||
+39
@@ -0,0 +1,39 @@
|
||||
From b9b4bb26af017dbe930cd4df7f9b2fc3a0497bfe Mon Sep 17 00:00:00 2001
|
||||
From: Anthony Romano <anthony.romano@coreos.com>
|
||||
Date: Fri, 24 Jun 2016 14:48:43 -0700
|
||||
Subject: [PATCH] tmpfs: don't undo fallocate past its last page
|
||||
|
||||
When fallocate is interrupted it will undo a range that extends one byte
|
||||
past its range of allocated pages. This can corrupt an in-use page by
|
||||
zeroing out its first byte. Instead, undo using the inclusive byte
|
||||
range.
|
||||
|
||||
Fixes: 1635f6a74152f1d ("tmpfs: undo fallocation on failure")
|
||||
Link: http://lkml.kernel.org/r/1462713387-16724-1-git-send-email-anthony.romano@coreos.com
|
||||
Signed-off-by: Anthony Romano <anthony.romano@coreos.com>
|
||||
Cc: Vlastimil Babka <vbabka@suse.cz>
|
||||
Cc: Hugh Dickins <hughd@google.com>
|
||||
Cc: Brandon Philips <brandon@ifup.co>
|
||||
Cc: <stable@vger.kernel.org>
|
||||
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
|
||||
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
|
||||
---
|
||||
mm/shmem.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/mm/shmem.c b/mm/shmem.c
|
||||
index a361449..24463b6 100644
|
||||
--- a/mm/shmem.c
|
||||
+++ b/mm/shmem.c
|
||||
@@ -2227,7 +2227,7 @@ static long shmem_fallocate(struct file *file, int mode, loff_t offset,
|
||||
/* Remove the !PageUptodate pages we added */
|
||||
shmem_undo_range(inode,
|
||||
(loff_t)start << PAGE_SHIFT,
|
||||
- (loff_t)index << PAGE_SHIFT, true);
|
||||
+ ((loff_t)index << PAGE_SHIFT) - 1, true);
|
||||
goto undone;
|
||||
}
|
||||
|
||||
--
|
||||
2.9.0
|
||||
|
||||
-32
@@ -1,32 +0,0 @@
|
||||
List: netfilter-devel
|
||||
Subject: [PATCH nf] netfilter: x_tables: check for size overflow
|
||||
From: Florian Westphal <fw () strlen ! de>
|
||||
Date: 2016-03-10 0:56:23
|
||||
Message-ID: 1457571383-25520-1-git-send-email-fw () strlen ! de
|
||||
Ben Hawkes says:
|
||||
integer overflow in xt_alloc_table_info, which on 32-bit systems can
|
||||
lead to small structure allocation and a copy_from_user based heap
|
||||
corruption.
|
||||
|
||||
Reported-by: Ben Hawkes <hawkes@google.com>
|
||||
Signed-off-by: Florian Westphal <fw@strlen.de>
|
||||
---
|
||||
net/netfilter/x_tables.c | 3 +++
|
||||
1 file changed, 3 insertions(+)
|
||||
|
||||
diff --git a/net/netfilter/x_tables.c b/net/netfilter/x_tables.c
|
||||
index c8a0b7d..17a9a9f 100644
|
||||
--- a/net/netfilter/x_tables.c
|
||||
+++ b/net/netfilter/x_tables.c
|
||||
@@ -659,6 +659,9 @@ struct xt_table_info *xt_alloc_table_info(unsigned int size)
|
||||
struct xt_table_info *info = NULL;
|
||||
size_t sz = sizeof(*info) + size;
|
||||
|
||||
+ if (sz < size || sz < sizeof(*info))
|
||||
+ return NULL;
|
||||
+
|
||||
/* Pedantry: prevent them from hitting BUG() in vmalloc.c --RR */
|
||||
if ((SMP_ALIGN(size) >> PAGE_SHIFT) + 2 > totalram_pages)
|
||||
return NULL;
|
||||
--
|
||||
2.4.10
|
||||
-152
@@ -1,152 +0,0 @@
|
||||
List: netfilter-devel
|
||||
Subject: [PATCH nf] netfilter: x_tables: deal with bogus nextoffset values
|
||||
From: Florian Westphal <fw () strlen ! de>
|
||||
Date: 2016-03-10 0:56:02
|
||||
Message-ID: 1457571362-25441-1-git-send-email-fw () strlen ! de
|
||||
|
||||
Ben Hawkes says:
|
||||
|
||||
In the mark_source_chains function (net/ipv4/netfilter/ip_tables.c) it
|
||||
is possible for a user-supplied ipt_entry structure to have a large
|
||||
next_offset field. This field is not bounds checked prior to writing a
|
||||
counter value at the supplied offset.
|
||||
|
||||
Problem is that xt_entry_foreach() macro stops iterating once e->next_offset
|
||||
is out of bounds, assuming this is the last entry.
|
||||
|
||||
With malformed data thats not necessarily the case so we can
|
||||
write outside of allocated area later as we might not have walked the
|
||||
entire blob.
|
||||
|
||||
Fix this by simplifying mark_source_chains -- it already has to check
|
||||
if nextoff is in range to catch invalid jumps, so just do the check
|
||||
when we move to a next entry as well.
|
||||
|
||||
Signed-off-by: Florian Westphal <fw@strlen.de>
|
||||
---
|
||||
net/ipv4/netfilter/arp_tables.c | 16 ++++++++--------
|
||||
net/ipv4/netfilter/ip_tables.c | 15 ++++++++-------
|
||||
net/ipv6/netfilter/ip6_tables.c | 13 ++++++-------
|
||||
3 files changed, 22 insertions(+), 22 deletions(-)
|
||||
|
||||
diff --git a/net/ipv4/netfilter/arp_tables.c b/net/ipv4/netfilter/arp_tables.c
|
||||
index b488cac..5a0b591 100644
|
||||
--- a/net/ipv4/netfilter/arp_tables.c
|
||||
+++ b/net/ipv4/netfilter/arp_tables.c
|
||||
@@ -437,6 +437,10 @@ static int mark_source_chains(const struct xt_table_info *newinfo,
|
||||
|
||||
/* Move along one */
|
||||
size = e->next_offset;
|
||||
+
|
||||
+ if (pos + size > newinfo->size - sizeof(*e))
|
||||
+ return 0;
|
||||
+
|
||||
e = (struct arpt_entry *)
|
||||
(entry0 + pos + size);
|
||||
e->counters.pcnt = pos;
|
||||
@@ -447,14 +451,6 @@ static int mark_source_chains(const struct xt_table_info *newinfo,
|
||||
if (strcmp(t->target.u.user.name,
|
||||
XT_STANDARD_TARGET) == 0 &&
|
||||
newpos >= 0) {
|
||||
- if (newpos > newinfo->size -
|
||||
- sizeof(struct arpt_entry)) {
|
||||
- duprintf("mark_source_chains: "
|
||||
- "bad verdict (%i)\n",
|
||||
- newpos);
|
||||
- return 0;
|
||||
- }
|
||||
-
|
||||
/* This a jump; chase it. */
|
||||
duprintf("Jump rule %u -> %u\n",
|
||||
pos, newpos);
|
||||
@@ -462,6 +458,10 @@ static int mark_source_chains(const struct xt_table_info *newinfo,
|
||||
/* ... this is a fallthru */
|
||||
newpos = pos + e->next_offset;
|
||||
}
|
||||
+
|
||||
+ if (newpos > newinfo->size - sizeof(*e))
|
||||
+ return 0;
|
||||
+
|
||||
e = (struct arpt_entry *)
|
||||
(entry0 + newpos);
|
||||
e->counters.pcnt = pos;
|
||||
diff --git a/net/ipv4/netfilter/ip_tables.c b/net/ipv4/netfilter/ip_tables.c
|
||||
index b99affa..ceb995f 100644
|
||||
--- a/net/ipv4/netfilter/ip_tables.c
|
||||
+++ b/net/ipv4/netfilter/ip_tables.c
|
||||
@@ -519,6 +519,10 @@ mark_source_chains(const struct xt_table_info *newinfo,
|
||||
|
||||
/* Move along one */
|
||||
size = e->next_offset;
|
||||
+
|
||||
+ if (pos + size > newinfo->size - sizeof(*e))
|
||||
+ return 0;
|
||||
+
|
||||
e = (struct ipt_entry *)
|
||||
(entry0 + pos + size);
|
||||
e->counters.pcnt = pos;
|
||||
@@ -529,13 +533,6 @@ mark_source_chains(const struct xt_table_info *newinfo,
|
||||
if (strcmp(t->target.u.user.name,
|
||||
XT_STANDARD_TARGET) == 0 &&
|
||||
newpos >= 0) {
|
||||
- if (newpos > newinfo->size -
|
||||
- sizeof(struct ipt_entry)) {
|
||||
- duprintf("mark_source_chains: "
|
||||
- "bad verdict (%i)\n",
|
||||
- newpos);
|
||||
- return 0;
|
||||
- }
|
||||
/* This a jump; chase it. */
|
||||
duprintf("Jump rule %u -> %u\n",
|
||||
pos, newpos);
|
||||
@@ -543,6 +540,10 @@ mark_source_chains(const struct xt_table_info *newinfo,
|
||||
/* ... this is a fallthru */
|
||||
newpos = pos + e->next_offset;
|
||||
}
|
||||
+
|
||||
+ if (newpos > newinfo->size - sizeof(*e))
|
||||
+ return 0;
|
||||
+
|
||||
e = (struct ipt_entry *)
|
||||
(entry0 + newpos);
|
||||
e->counters.pcnt = pos;
|
||||
diff --git a/net/ipv6/netfilter/ip6_tables.c b/net/ipv6/netfilter/ip6_tables.c
|
||||
index 99425cf..d88a794 100644
|
||||
--- a/net/ipv6/netfilter/ip6_tables.c
|
||||
+++ b/net/ipv6/netfilter/ip6_tables.c
|
||||
@@ -531,6 +531,8 @@ mark_source_chains(const struct xt_table_info *newinfo,
|
||||
|
||||
/* Move along one */
|
||||
size = e->next_offset;
|
||||
+ if (pos + size > newinfo->size - sizeof(*e))
|
||||
+ return 0;
|
||||
e = (struct ip6t_entry *)
|
||||
(entry0 + pos + size);
|
||||
e->counters.pcnt = pos;
|
||||
@@ -541,13 +543,6 @@ mark_source_chains(const struct xt_table_info *newinfo,
|
||||
if (strcmp(t->target.u.user.name,
|
||||
XT_STANDARD_TARGET) == 0 &&
|
||||
newpos >= 0) {
|
||||
- if (newpos > newinfo->size -
|
||||
- sizeof(struct ip6t_entry)) {
|
||||
- duprintf("mark_source_chains: "
|
||||
- "bad verdict (%i)\n",
|
||||
- newpos);
|
||||
- return 0;
|
||||
- }
|
||||
/* This a jump; chase it. */
|
||||
duprintf("Jump rule %u -> %u\n",
|
||||
pos, newpos);
|
||||
@@ -555,6 +550,10 @@ mark_source_chains(const struct xt_table_info *newinfo,
|
||||
/* ... this is a fallthru */
|
||||
newpos = pos + e->next_offset;
|
||||
}
|
||||
+
|
||||
+ if (newpos > newinfo->size - sizeof(*e))
|
||||
+ return 0;
|
||||
+
|
||||
e = (struct ip6t_entry *)
|
||||
(entry0 + newpos);
|
||||
e->counters.pcnt = pos;
|
||||
--
|
||||
2.4.10
|
||||
-250
@@ -1,250 +0,0 @@
|
||||
From 759c01142a5d0f364a462346168a56de28a80f52 Mon Sep 17 00:00:00 2001
|
||||
From: Willy Tarreau <w@1wt.eu>
|
||||
Date: Mon, 18 Jan 2016 16:36:09 +0100
|
||||
Subject: [PATCH] pipe: limit the per-user amount of pages allocated in pipes
|
||||
|
||||
On no-so-small systems, it is possible for a single process to cause an
|
||||
OOM condition by filling large pipes with data that are never read. A
|
||||
typical process filling 4000 pipes with 1 MB of data will use 4 GB of
|
||||
memory. On small systems it may be tricky to set the pipe max size to
|
||||
prevent this from happening.
|
||||
|
||||
This patch makes it possible to enforce a per-user soft limit above
|
||||
which new pipes will be limited to a single page, effectively limiting
|
||||
them to 4 kB each, as well as a hard limit above which no new pipes may
|
||||
be created for this user. This has the effect of protecting the system
|
||||
against memory abuse without hurting other users, and still allowing
|
||||
pipes to work correctly though with less data at once.
|
||||
|
||||
The limit are controlled by two new sysctls : pipe-user-pages-soft, and
|
||||
pipe-user-pages-hard. Both may be disabled by setting them to zero. The
|
||||
default soft limit allows the default number of FDs per process (1024)
|
||||
to create pipes of the default size (64kB), thus reaching a limit of 64MB
|
||||
before starting to create only smaller pipes. With 256 processes limited
|
||||
to 1024 FDs each, this results in 1024*64kB + (256*1024 - 1024) * 4kB =
|
||||
1084 MB of memory allocated for a user. The hard limit is disabled by
|
||||
default to avoid breaking existing applications that make intensive use
|
||||
of pipes (eg: for splicing).
|
||||
|
||||
Reported-by: socketpair@gmail.com
|
||||
Reported-by: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
|
||||
Mitigates: CVE-2013-4312 (Linux 2.0+)
|
||||
Suggested-by: Linus Torvalds <torvalds@linux-foundation.org>
|
||||
Signed-off-by: Willy Tarreau <w@1wt.eu>
|
||||
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
|
||||
---
|
||||
Documentation/sysctl/fs.txt | 23 ++++++++++++++++++++++
|
||||
fs/pipe.c | 47 +++++++++++++++++++++++++++++++++++++++++++--
|
||||
include/linux/pipe_fs_i.h | 4 ++++
|
||||
include/linux/sched.h | 1 +
|
||||
kernel/sysctl.c | 14 ++++++++++++++
|
||||
5 files changed, 87 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/Documentation/sysctl/fs.txt b/Documentation/sysctl/fs.txt
|
||||
index 88152f2..302b5ed 100644
|
||||
--- a/Documentation/sysctl/fs.txt
|
||||
+++ b/Documentation/sysctl/fs.txt
|
||||
@@ -32,6 +32,8 @@ Currently, these files are in /proc/sys/fs:
|
||||
- nr_open
|
||||
- overflowuid
|
||||
- overflowgid
|
||||
+- pipe-user-pages-hard
|
||||
+- pipe-user-pages-soft
|
||||
- protected_hardlinks
|
||||
- protected_symlinks
|
||||
- suid_dumpable
|
||||
@@ -159,6 +161,27 @@ The default is 65534.
|
||||
|
||||
==============================================================
|
||||
|
||||
+pipe-user-pages-hard:
|
||||
+
|
||||
+Maximum total number of pages a non-privileged user may allocate for pipes.
|
||||
+Once this limit is reached, no new pipes may be allocated until usage goes
|
||||
+below the limit again. When set to 0, no limit is applied, which is the default
|
||||
+setting.
|
||||
+
|
||||
+==============================================================
|
||||
+
|
||||
+pipe-user-pages-soft:
|
||||
+
|
||||
+Maximum total number of pages a non-privileged user may allocate for pipes
|
||||
+before the pipe size gets limited to a single page. Once this limit is reached,
|
||||
+new pipes will be limited to a single page in size for this user in order to
|
||||
+limit total memory usage, and trying to increase them using fcntl() will be
|
||||
+denied until usage goes below the limit again. The default value allows to
|
||||
+allocate up to 1024 pipes at their default size. When set to 0, no limit is
|
||||
+applied.
|
||||
+
|
||||
+==============================================================
|
||||
+
|
||||
protected_hardlinks:
|
||||
|
||||
A long-standing class of security issues is the hardlink-based
|
||||
diff --git a/fs/pipe.c b/fs/pipe.c
|
||||
index 42cf8dd..ab8dad3 100644
|
||||
--- a/fs/pipe.c
|
||||
+++ b/fs/pipe.c
|
||||
@@ -38,6 +38,12 @@ unsigned int pipe_max_size = 1048576;
|
||||
*/
|
||||
unsigned int pipe_min_size = PAGE_SIZE;
|
||||
|
||||
+/* Maximum allocatable pages per user. Hard limit is unset by default, soft
|
||||
+ * matches default values.
|
||||
+ */
|
||||
+unsigned long pipe_user_pages_hard;
|
||||
+unsigned long pipe_user_pages_soft = PIPE_DEF_BUFFERS * INR_OPEN_CUR;
|
||||
+
|
||||
/*
|
||||
* We use a start+len construction, which provides full use of the
|
||||
* allocated memory.
|
||||
@@ -583,20 +589,49 @@ pipe_fasync(int fd, struct file *filp, int on)
|
||||
return retval;
|
||||
}
|
||||
|
||||
+static void account_pipe_buffers(struct pipe_inode_info *pipe,
|
||||
+ unsigned long old, unsigned long new)
|
||||
+{
|
||||
+ atomic_long_add(new - old, &pipe->user->pipe_bufs);
|
||||
+}
|
||||
+
|
||||
+static bool too_many_pipe_buffers_soft(struct user_struct *user)
|
||||
+{
|
||||
+ return pipe_user_pages_soft &&
|
||||
+ atomic_long_read(&user->pipe_bufs) >= pipe_user_pages_soft;
|
||||
+}
|
||||
+
|
||||
+static bool too_many_pipe_buffers_hard(struct user_struct *user)
|
||||
+{
|
||||
+ return pipe_user_pages_hard &&
|
||||
+ atomic_long_read(&user->pipe_bufs) >= pipe_user_pages_hard;
|
||||
+}
|
||||
+
|
||||
struct pipe_inode_info *alloc_pipe_info(void)
|
||||
{
|
||||
struct pipe_inode_info *pipe;
|
||||
|
||||
pipe = kzalloc(sizeof(struct pipe_inode_info), GFP_KERNEL);
|
||||
if (pipe) {
|
||||
- pipe->bufs = kzalloc(sizeof(struct pipe_buffer) * PIPE_DEF_BUFFERS, GFP_KERNEL);
|
||||
+ unsigned long pipe_bufs = PIPE_DEF_BUFFERS;
|
||||
+ struct user_struct *user = get_current_user();
|
||||
+
|
||||
+ if (!too_many_pipe_buffers_hard(user)) {
|
||||
+ if (too_many_pipe_buffers_soft(user))
|
||||
+ pipe_bufs = 1;
|
||||
+ pipe->bufs = kzalloc(sizeof(struct pipe_buffer) * pipe_bufs, GFP_KERNEL);
|
||||
+ }
|
||||
+
|
||||
if (pipe->bufs) {
|
||||
init_waitqueue_head(&pipe->wait);
|
||||
pipe->r_counter = pipe->w_counter = 1;
|
||||
- pipe->buffers = PIPE_DEF_BUFFERS;
|
||||
+ pipe->buffers = pipe_bufs;
|
||||
+ pipe->user = user;
|
||||
+ account_pipe_buffers(pipe, 0, pipe_bufs);
|
||||
mutex_init(&pipe->mutex);
|
||||
return pipe;
|
||||
}
|
||||
+ free_uid(user);
|
||||
kfree(pipe);
|
||||
}
|
||||
|
||||
@@ -607,6 +642,8 @@ void free_pipe_info(struct pipe_inode_info *pipe)
|
||||
{
|
||||
int i;
|
||||
|
||||
+ account_pipe_buffers(pipe, pipe->buffers, 0);
|
||||
+ free_uid(pipe->user);
|
||||
for (i = 0; i < pipe->buffers; i++) {
|
||||
struct pipe_buffer *buf = pipe->bufs + i;
|
||||
if (buf->ops)
|
||||
@@ -998,6 +1035,7 @@ static long pipe_set_size(struct pipe_inode_info *pipe, unsigned long nr_pages)
|
||||
memcpy(bufs + head, pipe->bufs, tail * sizeof(struct pipe_buffer));
|
||||
}
|
||||
|
||||
+ account_pipe_buffers(pipe, pipe->buffers, nr_pages);
|
||||
pipe->curbuf = 0;
|
||||
kfree(pipe->bufs);
|
||||
pipe->bufs = bufs;
|
||||
@@ -1069,6 +1107,11 @@ long pipe_fcntl(struct file *file, unsigned int cmd, unsigned long arg)
|
||||
if (!capable(CAP_SYS_RESOURCE) && size > pipe_max_size) {
|
||||
ret = -EPERM;
|
||||
goto out;
|
||||
+ } else if ((too_many_pipe_buffers_hard(pipe->user) ||
|
||||
+ too_many_pipe_buffers_soft(pipe->user)) &&
|
||||
+ !capable(CAP_SYS_RESOURCE) && !capable(CAP_SYS_ADMIN)) {
|
||||
+ ret = -EPERM;
|
||||
+ goto out;
|
||||
}
|
||||
ret = pipe_set_size(pipe, nr_pages);
|
||||
break;
|
||||
diff --git a/include/linux/pipe_fs_i.h b/include/linux/pipe_fs_i.h
|
||||
index eb8b8ac..24f5470 100644
|
||||
--- a/include/linux/pipe_fs_i.h
|
||||
+++ b/include/linux/pipe_fs_i.h
|
||||
@@ -42,6 +42,7 @@ struct pipe_buffer {
|
||||
* @fasync_readers: reader side fasync
|
||||
* @fasync_writers: writer side fasync
|
||||
* @bufs: the circular array of pipe buffers
|
||||
+ * @user: the user who created this pipe
|
||||
**/
|
||||
struct pipe_inode_info {
|
||||
struct mutex mutex;
|
||||
@@ -57,6 +58,7 @@ struct pipe_inode_info {
|
||||
struct fasync_struct *fasync_readers;
|
||||
struct fasync_struct *fasync_writers;
|
||||
struct pipe_buffer *bufs;
|
||||
+ struct user_struct *user;
|
||||
};
|
||||
|
||||
/*
|
||||
@@ -123,6 +125,8 @@ void pipe_unlock(struct pipe_inode_info *);
|
||||
void pipe_double_lock(struct pipe_inode_info *, struct pipe_inode_info *);
|
||||
|
||||
extern unsigned int pipe_max_size, pipe_min_size;
|
||||
+extern unsigned long pipe_user_pages_hard;
|
||||
+extern unsigned long pipe_user_pages_soft;
|
||||
int pipe_proc_fn(struct ctl_table *, int, void __user *, size_t *, loff_t *);
|
||||
|
||||
|
||||
diff --git a/include/linux/sched.h b/include/linux/sched.h
|
||||
index 61aa9bb..1589ddc8 100644
|
||||
--- a/include/linux/sched.h
|
||||
+++ b/include/linux/sched.h
|
||||
@@ -835,6 +835,7 @@ struct user_struct {
|
||||
#endif
|
||||
unsigned long locked_shm; /* How many pages of mlocked shm ? */
|
||||
unsigned long unix_inflight; /* How many files in flight in unix sockets */
|
||||
+ atomic_long_t pipe_bufs; /* how many pages are allocated in pipe buffers */
|
||||
|
||||
#ifdef CONFIG_KEYS
|
||||
struct key *uid_keyring; /* UID specific keyring */
|
||||
diff --git a/kernel/sysctl.c b/kernel/sysctl.c
|
||||
index c810f8a..f6fd236 100644
|
||||
--- a/kernel/sysctl.c
|
||||
+++ b/kernel/sysctl.c
|
||||
@@ -1757,6 +1757,20 @@ static struct ctl_table fs_table[] = {
|
||||
.proc_handler = &pipe_proc_fn,
|
||||
.extra1 = &pipe_min_size,
|
||||
},
|
||||
+ {
|
||||
+ .procname = "pipe-user-pages-hard",
|
||||
+ .data = &pipe_user_pages_hard,
|
||||
+ .maxlen = sizeof(pipe_user_pages_hard),
|
||||
+ .mode = 0644,
|
||||
+ .proc_handler = proc_doulongvec_minmax,
|
||||
+ },
|
||||
+ {
|
||||
+ .procname = "pipe-user-pages-soft",
|
||||
+ .data = &pipe_user_pages_soft,
|
||||
+ .maxlen = sizeof(pipe_user_pages_soft),
|
||||
+ .mode = 0644,
|
||||
+ .proc_handler = proc_doulongvec_minmax,
|
||||
+ },
|
||||
{ }
|
||||
};
|
||||
|
||||
--
|
||||
2.7.2
|
||||
|
||||
@@ -1419,12 +1419,12 @@ diff -Nurp linux-3.14.2/drivers/platform/x86/shuttle-wmi.c linux-3.14.2-shuttle/
|
||||
+
|
||||
+module_init(shuttle_wmi_init);
|
||||
+module_exit(shuttle_wmi_exit);
|
||||
diff -Nurp linux-3.14.2/MAINTAINERS linux-3.14.2-shuttle/MAINTAINERS
|
||||
--- linux-3.14.2/MAINTAINERS 2014-03-31 06:40:15.000000000 +0300
|
||||
+++ linux-3.14.2-shuttle/MAINTAINERS 2014-04-26 18:33:26.869761100 +0300
|
||||
@@ -7880,6 +7880,12 @@ S: Odd Fixes
|
||||
diff -Nurp linux-4.6/MAINTAINERS linux-4.6-shuttle/MAINTAINERS
|
||||
--- linux-4.6/MAINTAINERS
|
||||
+++ linux-4.6-shuttle/MAINTAINERS
|
||||
@@ -10130,6 +10130,12 @@ S: Orphan
|
||||
F: drivers/media/platform/sh_vou.c
|
||||
F: include/media/sh_vou.h
|
||||
F: include/media/drv-intf/sh_vou.h
|
||||
|
||||
+SHUTTLE WMI EXTRAS DRIVER
|
||||
+M: Herton Ronaldo Krzesinski <herton@mandriva.com.br>
|
||||
|
||||
@@ -77,6 +77,9 @@ acpi-processor-M720SR-limit-to-C2.patch
|
||||
# backlight fixes
|
||||
ACPI-video-Add-a-quirk-to-force-acpi-video-backlight.patch
|
||||
|
||||
#
|
||||
acpi-ACPICA-Namespace-Fix-deadlock-triggered-by-MLC-suppo.patch
|
||||
|
||||
###
|
||||
### Block
|
||||
###
|
||||
@@ -122,6 +125,9 @@ block-Make-CFQ-default-to-IOPS-mode-on-SSDs.patch
|
||||
# ahci ids
|
||||
ahci-add-new-Intel-device-IDs.patch
|
||||
|
||||
#
|
||||
block-sd-Fix-rw_max-for-devices-that-report-an-optimal-xfe.patch
|
||||
|
||||
###
|
||||
### Char
|
||||
###
|
||||
@@ -134,14 +140,8 @@ Revert-ipmi-Start-the-timer-and-thread-on-internal-m.patch
|
||||
###
|
||||
|
||||
# aufs from: http://aufs.sourceforge.net/ (mga#8314)
|
||||
fs-aufs-4.4.patch
|
||||
fs-aufs-4.4-modular.patch
|
||||
|
||||
# ovl fixes
|
||||
fs-ovl-move-super-block-magic-number-to-magic.h.patch
|
||||
|
||||
# CVE-2016-2847
|
||||
pipe-limit-the-per-user-amount-of-pages-allocated-in-pipes_CVE-2016-2847.patch
|
||||
fs-aufs-4.6.patch
|
||||
fs-aufs-4.6-modular.patch
|
||||
|
||||
###
|
||||
### FireWire
|
||||
@@ -176,31 +176,8 @@ gpu-drm-mach64-linux-3.14-buildfix.patch
|
||||
gpu-drm-mach64-3.17-buildfix.patch
|
||||
gpu-drm-mach64-3.18-buildfix.patch
|
||||
|
||||
# drm fixes
|
||||
gpu-drm-i915-Fix-RPS-pointer-passed-from-wait_ioctl-to-i915_wait_request.patch
|
||||
|
||||
# etnaviv / vivante gpu
|
||||
gpu-drm-0001-devicetree-add-vendor-prefix-for-Vivante-Corporation.patch
|
||||
gpu-drm-0002-drm-etnaviv-add-devicetree-bindings.patch
|
||||
gpu-drm-0003-drm-etnaviv-add-initial-etnaviv-DRM-driver.patch
|
||||
gpu-drm-0004-MAINTAINERS-add-maintainer-and-reviewers-for-the-etn.patch
|
||||
gpu-drm-0005-drm-etnaviv-unlock-on-error-in-etnaviv_gem_get_iova.patch
|
||||
gpu-drm-0006-drm-etnaviv-fix-workaround-for-GC500.patch
|
||||
|
||||
# vc4 3d accel support
|
||||
gpu-drm-0101-drm-Create-a-driver-hook-for-allocating-GEM-object-s.patch
|
||||
gpu-drm-0102-drm-vc4-Add-a-BO-cache.patch
|
||||
gpu-drm-0103-drm-vc4-Add-create-and-map-BO-ioctls.patch
|
||||
gpu-drm-0104-drm-vc4-Add-an-API-for-creating-GPU-shaders-in-GEM-B.patch
|
||||
gpu-drm-0105-drm-vc4-Fix-a-typo-in-a-V3D-debug-register.patch
|
||||
gpu-drm-0106-drm-vc4-Bind-and-initialize-the-V3D-engine.patch
|
||||
gpu-drm-0107-drm-vc4-Add-support-for-drawing-3D-frames.patch
|
||||
gpu-drm-0108-drm-vc4-Add-support-for-async-pageflips.patch
|
||||
gpu-drm-0109-drm-vc4-Add-an-interface-for-capturing-the-GPU-state.patch
|
||||
|
||||
# radeon breakage fixes
|
||||
gpu-drm-radeon-Update-radeon_get_vblank_counter_kms.patch
|
||||
gpu-drm-radeon-Drop-unnecessary-unsigned-int-0-check.patch
|
||||
# hsw screen glitches
|
||||
gpu-drm-i915-fbc-Disable-on-HSW-by-default-for-now.patch
|
||||
|
||||
###
|
||||
### Hardware Monitoring
|
||||
@@ -232,6 +209,12 @@ input-i8042-quirks-for-Fujitsu-Lifebook-A544-and-Lif.patch
|
||||
### MM
|
||||
###
|
||||
|
||||
# fixes some failing atomic allocations
|
||||
mm-sl-au-b-add-__GFP_ATOMIC-to-the-GFP-reclaim-mask.patch
|
||||
|
||||
# tmpfs fix
|
||||
mm-tmpfs-don-t-undo-fallocate-past-its-last-page.patch
|
||||
|
||||
###
|
||||
### Network
|
||||
###
|
||||
@@ -253,10 +236,6 @@ net-netfilter-psd.patch
|
||||
net-netfilter-psd-mdv.patch
|
||||
net-netfilter-psd-2.6.35-buildfix.patch
|
||||
|
||||
# CVE pending
|
||||
net-netfilter-x_tables-check-for-size-overflow.patch
|
||||
net-netfilter-x_tables-deal-with-bogus-nextoffset-values.patch
|
||||
|
||||
###
|
||||
### Platform drivers
|
||||
###
|
||||
@@ -342,12 +321,9 @@ video-mageia-logo.patch
|
||||
3rd-aes2501-rmmod-oops-fix.patch
|
||||
|
||||
# ndiswrapper
|
||||
3rd-ndiswrapper-1.59.patch
|
||||
3rd-ndiswrapper-1.60.patch
|
||||
3rd-ndiswrapper-Kconfig.patch
|
||||
3rd-ndiswrapper-Makefile-build-fix.patch
|
||||
3rd-ndiswrapper-linux-3.14-buildfix.patch
|
||||
3rd-ndiswrapper-4.0-buildfix.patch
|
||||
3rd-ndiswrapper-4.2-buildfix.patch
|
||||
|
||||
# rfswitch
|
||||
3rd-rfswitch-1.3.patch
|
||||
@@ -381,18 +357,8 @@ video-mageia-logo.patch
|
||||
###
|
||||
|
||||
# RPi2 support
|
||||
arm-0001-dt-bindings-Add-root-properties-for-Raspberry-Pi-2.patch
|
||||
arm-0002-ARM-bcm2835-Add-a-compat-string-for-bcm2836-machine-.patch
|
||||
arm-0003-ARM-bcm2835-Add-Kconfig-support-for-bcm2836.patch
|
||||
arm-0011-ARM-bcm2835-Define-two-new-packets-from-the-latest-f.patch
|
||||
arm-0012-dt-bindings-add-rpi-power-domain-driver-bindings.patch
|
||||
arm-0013-ARM-bcm2835-add-rpi-power-domain-driver.patch
|
||||
arm-0021-ARM-bcm2835-Split-the-DT-for-peripherals-from-the-DT.patch
|
||||
arm-0022-ARM-bcm2835-Move-the-CPU-peripheral-include-out-of-c.patch
|
||||
arm-0023-ARM-bcm2835-Add-devicetree-for-bcm2836-and-Raspberry.patch
|
||||
arm-0024-ARM-bcm2835-Add-the-auxiliary-clocks-to-the-device-t.patch
|
||||
arm-0031-ARM-bcm2835-enable-all-bcm2835-relevant-in-defconfig.patch
|
||||
arm-0032-ARM-bcm2835-enable-auxiliary-spi-driver-in-defconfig.patch
|
||||
# Read MAC address from DT
|
||||
arm-0001-ARM-bcm2835-dt-Add-the-ethernet-to-the-device-trees.patch
|
||||
|
||||
###
|
||||
### IA64
|
||||
|
||||
+26
-45
@@ -12,7 +12,7 @@
|
||||
<IsA>kernel</IsA>
|
||||
<Summary>The Linux kernel (the core of the Linux operating system) for Pisi Linux</Summary>
|
||||
<Description>kernel contains the Linux kernel, the core of any Linux operating system. The kernel handles the basic functions of the operating system: memory allocation, process allocation, device input and output, etc.</Description>
|
||||
<Archive sha1sum="180ab617036593212274177eff3a67f437c1b5ea" type="targz">https://www.kernel.org/pub/linux/kernel/v4.x/linux-4.4.tar.gz</Archive>
|
||||
<Archive sha1sum="57cd77757651a05a2e63b2faac010fc17ce399e7" type="targz">https://www.kernel.org/pub/linux/kernel/v4.x/linux-4.6.tar.gz</Archive>
|
||||
<AdditionalFiles>
|
||||
<AdditionalFile target="configs/kernel-i686-config">configs/kernel-i686-config</AdditionalFile>
|
||||
<AdditionalFile target="configs/kernel-x86_64-config">configs/kernel-x86_64-config</AdditionalFile>
|
||||
@@ -28,8 +28,8 @@
|
||||
</BuildDependencies>
|
||||
<Patches>
|
||||
<!-- Linux patches -->
|
||||
<Patch level="1" compressionType="xz">patches/linux/patch-4.4.8.xz</Patch>
|
||||
<!-- Mageia Linux patches // compatible with http://svnweb.mageia.org/packages/cauldron/kernel/releases/4.4.6/1.mga6/PATCHES/patches/series-->
|
||||
<Patch level="1" compressionType="xz">patches/linux/patch-4.6.3.xz</Patch>
|
||||
<!-- Mageia Linux patches // compatible with http://svnweb.mageia.org/packages/cauldron/kernel/releases/4.6.3/1.mga6/PATCHES/patches/series-->
|
||||
<!--stable patches-->
|
||||
<!--other patches-->
|
||||
<Patch level="1">patches/mageia/Revert-ipmi-Start-the-timer-and-thread-on-internal-m.patch</Patch>
|
||||
@@ -45,6 +45,7 @@
|
||||
<Patch level="1">patches/mageia/acpi-CLEVO-M360S-disable_acpi_irq.patch</Patch>
|
||||
<Patch level="1">patches/mageia/acpi-processor-M720SR-limit-to-C2.patch</Patch>
|
||||
<Patch level="1">patches/mageia/ACPI-video-Add-a-quirk-to-force-acpi-video-backlight.patch</Patch>
|
||||
<Patch level="1">patches/mageia/acpi-ACPICA-Namespace-Fix-deadlock-triggered-by-MLC-suppo.patch</Patch>
|
||||
<!--Patch level="1">patches/mageia/scsi-ppscsi-2.6.2.patch</Patch>
|
||||
<Patch level="1">patches/mageia/scsi-ppscsi_fixes.patch</Patch>
|
||||
<Patch level="1">patches/mageia/scsi-ppscsi-sg-helper-update.patch</Patch>
|
||||
@@ -58,13 +59,12 @@
|
||||
<Patch level="1">patches/mageia/block-floppy-disable-pnp-modalias.patch</Patch>
|
||||
<Patch level="1">patches/mageia/ata-prefer-ata-drivers-over-ide-drivers-when-both-are-built.patch</Patch>
|
||||
<Patch level="1">patches/mageia/block-Make-CFQ-default-to-IOPS-mode-on-SSDs.patch</Patch>
|
||||
<Patch level="1">patches/mageia/fs-aufs-4.4.patch</Patch>
|
||||
<Patch level="1">patches/mageia/fs-aufs-4.4-modular.patch</Patch>
|
||||
<Patch level="1">patches/mageia/fs-ovl-move-super-block-magic-number-to-magic.h.patch</Patch>
|
||||
<Patch level="1">patches/mageia/pipe-limit-the-per-user-amount-of-pages-allocated-in-pipes_CVE-2016-2847.patch</Patch>
|
||||
<Patch level="1">patches/mageia/fs-aufs-4.6.patch</Patch>
|
||||
<Patch level="1">patches/mageia/fs-aufs-4.6-modular.patch</Patch>
|
||||
<Patch level="1">patches/mageia/firewire-ieee1394-module-aliases.patch</Patch>
|
||||
<Patch level="1">patches/mageia/char-agp-intel-new-Q57-id.patch</Patch>
|
||||
<Patch level="1">patches/mageia/gpu-drm-mach64.patch</Patch>
|
||||
<!--remove external mach64 support for buildfix-->
|
||||
<!--Patch level="1">patches/mageia/gpu-drm-mach64.patch</Patch>
|
||||
<Patch level="1">patches/mageia/gpu-drm-mach64-fixes.patch</Patch>
|
||||
<Patch level="1">patches/mageia/gpu-drm-mach64-2.6.31.patch</Patch>
|
||||
<Patch level="1">patches/mageia/gpu-drm-mach64-fix-for-changed-drm_pci_alloc.patch</Patch>
|
||||
@@ -80,26 +80,11 @@
|
||||
<Patch level="1">patches/mageia/gpu-drm-mach64-restore-mach64_PCI_IDS.patch</Patch>
|
||||
<Patch level="1">patches/mageia/gpu-drm-mach64-linux-3.14-buildfix.patch</Patch>
|
||||
<Patch level="1">patches/mageia/gpu-drm-mach64-3.17-buildfix.patch</Patch>
|
||||
<Patch level="1">patches/mageia/gpu-drm-mach64-3.18-buildfix.patch</Patch>
|
||||
<Patch level="1">patches/mageia/gpu-drm-i915-Fix-RPS-pointer-passed-from-wait_ioctl-to-i915_wait_request.patch</Patch>
|
||||
<Patch level="1">patches/mageia/gpu-drm-0001-devicetree-add-vendor-prefix-for-Vivante-Corporation.patch</Patch>
|
||||
<Patch level="1">patches/mageia/gpu-drm-0002-drm-etnaviv-add-devicetree-bindings.patch</Patch>
|
||||
<Patch level="1">patches/mageia/gpu-drm-0003-drm-etnaviv-add-initial-etnaviv-DRM-driver.patch</Patch>
|
||||
<Patch level="1">patches/mageia/gpu-drm-0004-MAINTAINERS-add-maintainer-and-reviewers-for-the-etn.patch</Patch>
|
||||
<Patch level="1">patches/mageia/gpu-drm-0005-drm-etnaviv-unlock-on-error-in-etnaviv_gem_get_iova.patch</Patch>
|
||||
<Patch level="1">patches/mageia/gpu-drm-0006-drm-etnaviv-fix-workaround-for-GC500.patch</Patch>
|
||||
<Patch level="1">patches/mageia/gpu-drm-0101-drm-Create-a-driver-hook-for-allocating-GEM-object-s.patch</Patch>
|
||||
<Patch level="1">patches/mageia/gpu-drm-0102-drm-vc4-Add-a-BO-cache.patch</Patch>
|
||||
<Patch level="1">patches/mageia/gpu-drm-0103-drm-vc4-Add-create-and-map-BO-ioctls.patch</Patch>
|
||||
<Patch level="1">patches/mageia/gpu-drm-0104-drm-vc4-Add-an-API-for-creating-GPU-shaders-in-GEM-B.patch</Patch>
|
||||
<Patch level="1">patches/mageia/gpu-drm-0105-drm-vc4-Fix-a-typo-in-a-V3D-debug-register.patch</Patch>
|
||||
<Patch level="1">patches/mageia/gpu-drm-0106-drm-vc4-Bind-and-initialize-the-V3D-engine.patch</Patch>
|
||||
<Patch level="1">patches/mageia/gpu-drm-0107-drm-vc4-Add-support-for-drawing-3D-frames.patch</Patch>
|
||||
<Patch level="1">patches/mageia/gpu-drm-0108-drm-vc4-Add-support-for-async-pageflips.patch</Patch>
|
||||
<Patch level="1">patches/mageia/gpu-drm-0109-drm-vc4-Add-an-interface-for-capturing-the-GPU-state.patch</Patch>
|
||||
<Patch level="1">patches/mageia/gpu-drm-radeon-Update-radeon_get_vblank_counter_kms.patch</Patch>
|
||||
<Patch level="1">patches/mageia/gpu-drm-radeon-Drop-unnecessary-unsigned-int-0-check.patch</Patch>
|
||||
<Patch level="1">patches/mageia/gpu-drm-mach64-3.18-buildfix.patch</Patch-->
|
||||
<Patch level="1">patches/mageia/gpu-drm-i915-fbc-Disable-on-HSW-by-default-for-now.patch</Patch>
|
||||
<Patch level="1">patches/mageia/input-i8042-quirks-for-Fujitsu-Lifebook-A544-and-Lif.patch</Patch>
|
||||
<Patch level="1">patches/mageia/mm-sl-au-b-add-__GFP_ATOMIC-to-the-GFP-reclaim-mask.patch</Patch>
|
||||
<Patch level="1">patches/mageia/mm-tmpfs-don-t-undo-fallocate-past-its-last-page.patch</Patch>
|
||||
<Patch level="1">patches/mageia/net-sis190-fix-list-usage.patch</Patch>
|
||||
<Patch level="1">patches/mageia/net-netfilter-IFWLOG.patch</Patch>
|
||||
<Patch level="1">patches/mageia/net-netfilter-IFWLOG-mdv.patch</Patch>
|
||||
@@ -111,8 +96,6 @@
|
||||
<Patch level="1">patches/mageia/net-netfilter-psd.patch</Patch>
|
||||
<Patch level="1">patches/mageia/net-netfilter-psd-mdv.patch</Patch>
|
||||
<Patch level="1">patches/mageia/net-netfilter-psd-2.6.35-buildfix.patch</Patch>
|
||||
<Patch level="1">patches/mageia/net-netfilter-x_tables-check-for-size-overflow.patch</Patch>
|
||||
<Patch level="1">patches/mageia/net-netfilter-x_tables-deal-with-bogus-nextoffset-values.patch</Patch>
|
||||
<Patch level="1">patches/mageia/platform-x86-add-shuttle-wmi-driver.patch</Patch>
|
||||
<Patch level="1">patches/mageia/platform-x86-shuttle-wmi-drop-devinit-exit.patch</Patch>
|
||||
<Patch level="1">patches/mageia/platform-x86-shuttle-wmi-4.2-buildfix.patch</Patch>
|
||||
@@ -133,12 +116,9 @@
|
||||
<!--<Patch level="1">patches/mageia/3rd-aes2501-r19.patch</Patch>
|
||||
<Patch level="1">patches/mageia/3rd-aes2501-kbuild.patch</Patch>
|
||||
<Patch level="1">patches/mageia/3rd-aes2501-rmmod-oops-fix.patch</Patch -2-->
|
||||
<Patch level="1">patches/mageia/3rd-ndiswrapper-1.59.patch</Patch>
|
||||
<Patch level="1">patches/mageia/3rd-ndiswrapper-1.60.patch</Patch>
|
||||
<Patch level="1">patches/mageia/3rd-ndiswrapper-Kconfig.patch</Patch>
|
||||
<Patch level="1">patches/mageia/3rd-ndiswrapper-Makefile-build-fix.patch</Patch>
|
||||
<Patch level="1">patches/mageia/3rd-ndiswrapper-linux-3.14-buildfix.patch</Patch>
|
||||
<Patch level="1">patches/mageia/3rd-ndiswrapper-4.0-buildfix.patch</Patch>
|
||||
<Patch level="1">patches/mageia/3rd-ndiswrapper-4.2-buildfix.patch</Patch>
|
||||
<Patch level="1">patches/mageia/3rd-rfswitch-1.3.patch</Patch>
|
||||
<Patch level="1">patches/mageia/3rd-rfswitch-build-fix.patch</Patch>
|
||||
<Patch level="1">patches/mageia/3rd-rfswitch-3.0-buildfix.patch</Patch>
|
||||
@@ -149,18 +129,8 @@
|
||||
<Patch level="1">patches/mageia/3rd-viahss-3.0-buildfix.patch</Patch>
|
||||
<Patch level="1">patches/mageia/3rd-rtl8723bs.patch</Patch>
|
||||
<Patch level="1">patches/mageia/ahci-add-new-Intel-device-IDs.patch</Patch>
|
||||
<Patch level="1">patches/mageia/arm-0001-dt-bindings-Add-root-properties-for-Raspberry-Pi-2.patch</Patch>
|
||||
<Patch level="1">patches/mageia/arm-0002-ARM-bcm2835-Add-a-compat-string-for-bcm2836-machine-.patch</Patch>
|
||||
<Patch level="1">patches/mageia/arm-0003-ARM-bcm2835-Add-Kconfig-support-for-bcm2836.patch</Patch>
|
||||
<Patch level="1">patches/mageia/arm-0011-ARM-bcm2835-Define-two-new-packets-from-the-latest-f.patch</Patch>
|
||||
<Patch level="1">patches/mageia/arm-0012-dt-bindings-add-rpi-power-domain-driver-bindings.patch</Patch>
|
||||
<Patch level="1">patches/mageia/arm-0013-ARM-bcm2835-add-rpi-power-domain-driver.patch</Patch>
|
||||
<Patch level="1">patches/mageia/arm-0021-ARM-bcm2835-Split-the-DT-for-peripherals-from-the-DT.patch</Patch>
|
||||
<Patch level="1">patches/mageia/arm-0022-ARM-bcm2835-Move-the-CPU-peripheral-include-out-of-c.patch</Patch>
|
||||
<Patch level="1">patches/mageia/arm-0023-ARM-bcm2835-Add-devicetree-for-bcm2836-and-Raspberry.patch</Patch>
|
||||
<Patch level="1">patches/mageia/arm-0024-ARM-bcm2835-Add-the-auxiliary-clocks-to-the-device-t.patch</Patch>
|
||||
<Patch level="1">patches/mageia/arm-0031-ARM-bcm2835-enable-all-bcm2835-relevant-in-defconfig.patch</Patch>
|
||||
<Patch level="1">patches/mageia/arm-0032-ARM-bcm2835-enable-auxiliary-spi-driver-in-defconfig.patch</Patch>
|
||||
<Patch level="1">patches/mageia/block-sd-Fix-rw_max-for-devices-that-report-an-optimal-xfe.patch</Patch>
|
||||
<Patch level="1">patches/mageia/arm-0001-ARM-bcm2835-dt-Add-the-ethernet-to-the-device-trees.patch</Patch>
|
||||
</Patches>
|
||||
</Source>
|
||||
|
||||
@@ -216,6 +186,17 @@
|
||||
</Package>
|
||||
|
||||
<History>
|
||||
<Update release="3">
|
||||
<Date>2016-06-26</Date>
|
||||
<Version>4.6.3</Version>
|
||||
<Comment>Version Bump.</Comment>
|
||||
<Type package="kernel">security</Type>
|
||||
<Requires>
|
||||
<Action package="kernel">systemRestart</Action>
|
||||
</Requires>
|
||||
<Name>Ertuğrul Erata</Name>
|
||||
<Email>ertugrulerata@gmail.com</Email>
|
||||
</Update>
|
||||
<Update release="2">
|
||||
<Date>2016-04-30</Date>
|
||||
<Version>4.4.8</Version>
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -12,13 +12,13 @@
|
||||
<IsA>app:console</IsA>
|
||||
<Summary>CPU power management tools</Summary>
|
||||
<Description>cpupowertools contains utilities to manage power management and frequency scaling policies of modern CPUs.</Description>
|
||||
<Archive sha1sum="180ab617036593212274177eff3a67f437c1b5ea" type="targz">https://www.kernel.org/pub/linux/kernel/v4.x/linux-4.4.tar.gz</Archive>
|
||||
<Archive sha1sum="57cd77757651a05a2e63b2faac010fc17ce399e7" type="targz">https://www.kernel.org/pub/linux/kernel/v4.x/linux-4.6.tar.gz</Archive>
|
||||
<BuildDependencies>
|
||||
<Dependency>pciutils-devel</Dependency>
|
||||
</BuildDependencies>
|
||||
<Patches>
|
||||
<!-- Linux patches -->
|
||||
<Patch level="1" compressionType="xz">patches/linux/patch-4.4.4.xz</Patch>
|
||||
<Patch level="1" compressionType="xz">patches/linux/patch-4.6.3.xz</Patch>
|
||||
</Patches>
|
||||
</Source>
|
||||
|
||||
@@ -44,6 +44,13 @@
|
||||
</Provides>-->
|
||||
</Package>
|
||||
<History>
|
||||
<Update release="3">
|
||||
<Date>2016-06-28</Date>
|
||||
<Version>4.6.3</Version>
|
||||
<Comment>Release Bump</Comment>
|
||||
<Name>PisiLinux Community</Name>
|
||||
<Email>admin@pisilinux.org</Email>
|
||||
</Update>
|
||||
<Update release="2">
|
||||
<Date>2016-04-27</Date>
|
||||
<Version>4.4.4</Version>
|
||||
|
||||
Reference in New Issue
Block a user