Compare commits

..

259 commits

Author SHA1 Message Date
Justin M. Forbes
ed111735e3 Fix a number of CVEs 2019-11-25 10:13:30 -06:00
Laura Abbott
4af253e6d7 Linux v5.3.13 2019-11-25 09:07:35 -05:00
Justin M. Forbes
3f3e2cef37 Fix CVE-2019-19077 rhbz 1775724 1775725 2019-11-22 12:59:44 -06:00
Justin M. Forbes
21028f464f Fix a bunch of CVEs 2019-11-21 14:15:37 -06:00
Laura Abbott
b09d66891d Linux v5.3.12 2019-11-21 09:31:12 -05:00
Justin M. Forbes
222eee7305 Linux v5.3.11 2019-11-12 12:49:38 -06:00
Laura Abbott
66f48dbe0f Linux v5.3.10 2019-11-11 11:59:45 -05:00
Laura Abbott
3199f87e97 Linux v5.3.9 2019-11-06 10:52:47 -05:00
David Ward
316d2083c3 Disable Sound Open Firmware support on Intel platforms (rhbz 1750194) 2019-11-04 10:13:27 -05:00
Laura Abbott
c2e6631ae7 Linux v5.3.8 2019-10-29 10:16:27 -04:00
Laura Abbott
a275cd7583 Linux v5.3.7 2019-10-18 15:38:33 -04:00
Laura Abbott
418aee33e0 Linux v5.3 rebase 2019-10-14 17:23:23 -04:00
Justin M. Forbes
9387a8738d Linux v5.2.20 2019-10-08 08:23:27 -05:00
Justin M. Forbes
56890f1977 Fix CVE-2019-17052 CVE-2019-17053 CVE-2019-17054 CVE-2019-17055 CVE-2019-17056 2019-10-03 12:34:45 -05:00
Jeremy Cline
c20aea8759 Fix up the lockdown sysrq patch
Signed-off-by: Jeremy Cline <jcline@redhat.com>
2019-10-02 16:38:01 -04:00
Justin M. Forbes
9da38b16ed Linux v5.2.18 2019-10-01 07:59:23 -05:00
Peter Robinson
d926724bae Upstream patch for iwlwifi 8000 series FW issues (rhbz: 1749949) 2019-09-24 17:11:03 +01:00
Justin M. Forbes
7dc6403432 Linux v5.2.17 2019-09-23 08:12:08 -05:00
Laura Abbott
fa959404f3 Fix for dwc3 (rhbz 1753099) 2019-09-19 17:42:29 -04:00
Justin M. Forbes
56f4e17f8d Linux v5.2.16 2019-09-19 10:36:00 -05:00
Justin M. Forbes
136816442e Linux v5.2.15 2019-09-16 09:25:21 -05:00
Justin M. Forbes
f5cf207b5a Linux v5.2.14 2019-09-10 07:52:35 -05:00
Justin M. Forbes
ef94e6e48f Linux v5.2.13 2019-09-06 09:07:59 -05:00
Justin M. Forbes
d412aec0e0 Linux v5.2.11 2019-08-29 07:12:36 -05:00
Justin M. Forbes
a359a1bed1 Fix mwifiex CVE-2019-14814 CVE-2019-14815 CVE-2019-14816 2019-08-28 15:48:02 -05:00
Justin M. Forbes
144aefafc2 Linux v5.2.10 2019-08-26 08:46:03 -05:00
Justin M. Forbes
b8abfc8da1 Fixes for nouveau 2019-08-19 09:21:15 -05:00
Justin M. Forbes
6712f44316 Fix packaging change 2019-08-16 15:57:59 -05:00
Peter Robinson
131d406e4e possible fix for iwlwifi (rhbz 1733369) 2019-08-16 12:15:50 -05:00
Justin M. Forbes
b88cf4ad1c Linux v5.2.9 2019-08-16 07:42:50 -05:00
Justin M. Forbes
69ecc739a5 Linux v5.2.8 2019-08-10 08:37:50 -05:00
Justin M. Forbes
ae17795317 Linux v5.2.7 2019-08-07 23:56:09 -05:00
Justin M. Forbes
61ea70464f Linux v5.2.6 rebase 2019-08-05 10:41:23 -05:00
Jeremy Cline
7751601cc0 Linux v5.1.21 2019-07-29 15:03:17 +00:00
Jeremy Cline
5265baccfc Linux v5.1.20 2019-07-26 14:37:53 +00:00
Laura Abbott
fee7cf37f2 Bring in DMA fix (rhbz 1732045) 2019-07-22 12:39:54 -04:00
Jeremy Cline
c496ff3cc5 Linux v5.1.19 2019-07-22 16:04:34 +00:00
Jeremy Cline
a8a6833aef Fix CVE-2019-13631 (rhbz 1731000 1731001) 2019-07-18 10:01:55 -04:00
Jeremy Cline
834c4d4fdc Linux v5.1.18 2019-07-15 15:27:11 +00:00
Jeremy Cline
f79d789ee1 Linux v5.1.17 2019-07-10 15:01:41 +00:00
Jeremy Cline
ec8654da38 Pick up the iwlwifi firmware crash fix (rhbz 1716334) 2019-07-08 19:57:31 +00:00
Peter Robinson
26e0db402f Fixes for load avg and display on Raspberry Pi 2019-07-04 17:44:01 +01:00
Jeremy Cline
623d64c6af Linux v5.1.16 2019-07-03 14:35:44 +00:00
Peter Robinson
cd57c4f398 arm64: the tsadc patch is already upstream so drop it 2019-06-29 13:08:37 +01:00
Jeremy Cline
df54192521 Linux v5.1.15 2019-06-25 13:46:55 +00:00
Hans de Goede
d0a3c95674 Extend GPD MicroPC LCD panel quirk to also apply to newer BIOS versions 2019-06-24 17:49:32 +02:00
Jeremy Cline
8b86310fda Linux v5.1.14 2019-06-24 13:58:21 +00:00
Peter Robinson
cb24ef5a29 a tcp fix for steam 2019-06-22 17:51:50 +01:00
Jeremy Cline
9ff59e035d Linux v5.1.12 2019-06-19 15:01:11 +00:00
Justin M. Forbes
abcc03fba5 Annotate SACK CVEs in changelog 2019-06-17 14:23:31 -05:00
Jeremy Cline
ab83bc7c89 Linux v5.1.11 2019-06-17 18:52:16 +00:00
Jeremy Cline
2232c7e432 Linux v5.1.10 2019-06-17 14:04:20 +00:00
Hans de Goede
702e94cf68 Fix the LCD panel an Asus EeePC 1025C not lighting up (rhbz#1697069)
Fix the LCD panel on the GPD MicroPC not working
2019-06-14 12:08:19 +02:00
Justin M. Forbes
7ce1974389 Fix CVE-2019-10126 (rhbz 1716992 1720122) 2019-06-13 09:12:12 -05:00
Jeremy Cline
46bcefec41 Linux v5.1.9 2019-06-11 17:15:26 +00:00
Peter Robinson
1da0b69092 usb dwc2 fix 2019-06-10 13:43:10 +01:00
Jeremy Cline
3b315ba366 Linux v5.1.8 2019-06-09 16:42:53 +00:00
Justin M. Forbes
5e9fa8a24c Fix CVE-2019-12614 (rhbz 1718176 1718185) 2019-06-07 08:13:08 -05:00
Jeremy Cline
961db52934 Fix an issue with the IPv6 neighbor table (rhbz 1708717) 2019-06-06 19:29:11 +00:00
Jeremy Cline
ca537c1d2e Fix rbhz 1658675 again
This patch got dropped with the latest rebase to upstream's version of
the lockdown patches.
2019-06-06 19:17:04 +00:00
Justin M. Forbes
8cd2e444d1 Fix CVE-2019-12456 (rhbz 1717182 1717183) 2019-06-05 07:34:39 -05:00
Jeremy Cline
d78ad9741e Linux v5.1.7 2019-06-04 14:25:14 +00:00
Jeremy Cline
36b34bfcbf Linux v5.1.6
Fix CVE-2019-12378 CVE-2019-3846 CVE-2019-12380 CVE-2019-12381 CVE-2019-12382 CVE-2019-12379
2019-06-03 16:40:33 +00:00
Laura Abbott
3074ed2654 Linux v5.0.20 2019-05-31 13:20:20 -04:00
Laura Abbott
287899ca98 Linux v5.0.19 2019-05-28 09:31:00 -04:00
Justin M. Forbes
99a6dab644 Fix s390 build 2019-05-23 08:40:00 -05:00
Justin M. Forbes
ff9b686186 Linux v5.0.18 2019-05-22 12:22:26 -05:00
Laura Abbott
0ad606427d Linux v5.0.17 2019-05-20 08:06:32 -07:00
Justin M. Forbes
c69adb9d7f Linux v5.0.16 (Fixes MDS CVEs) 2019-05-14 12:48:22 -05:00
Justin M. Forbes
ad83b6b9ad Add changelog for CVE-2019-11884 2019-05-14 07:37:28 -05:00
Laura Abbott
65427f2740 Linux v5.0.15 2019-05-13 09:00:32 -04:00
Laura Abbott
77ae4012b5 Linux v5.0.14 2019-05-09 06:06:58 -04:00
Laura Abbott
f04dc53025 Linux v5.0.13 2019-05-05 20:16:52 -04:00
Laura Abbott
7909caa3f2 Linux v5.0.12 2019-05-04 11:54:46 -07:00
Laura Abbott
116c215759 Linux v5.0.11 2019-05-02 06:50:20 -07:00
Hans de Goede
91273a68d0 Fix wifi on various ideapad models not working (rhbz#1703338) 2019-04-30 12:00:23 +02:00
Laura Abbott
d6d35c9799 Add some dependent patches for the module signing fixup 2019-04-29 07:13:47 -07:00
Laura Abbott
cec20d0a29 Linux v5.0.10 2019-04-28 18:26:26 -07:00
Justin M. Forbes
30d7934dfe Fix CVE-2019-3900 (rhbz 1698757 1702940) 2019-04-25 07:18:22 -05:00
Jeremy Cline
e06126af46 Check module signatures with the platform keyring (if enabled)
Upstream has made a keyring to the platform keys. The "KEYS: Allow
unrestricted boot-time addition of keys to secondary keyring" is
available upstream for the platform keyring.

The only issue is that module signatures aren't checked with the
platform keyring, so this introduces a patch to add that which has been
sent upstream. At least our carried-patch count hasn't gone up.
2019-04-23 15:50:26 +00:00
Justin M. Forbes
81d4b36c60 Fix CVE-2019-9503 rhbz 1701842 1701843 2019-04-23 10:45:07 -05:00
Justin M. Forbes
6b1be12204 Fix bug number typo 2019-04-23 06:58:40 -05:00
Laura Abbott
9890bc621a Linux v5.0.9
Fix NFS server crash (rhbz 1701077)
2019-04-21 17:18:02 -07:00
Justin M. Forbes
647c3c0e88 Fix CVE-2019-9500 (rhbz 1701224 1701226) 2019-04-18 11:06:46 -05:00
Laura Abbott
cfff2dee54 Actually add the config file 2019-04-17 13:59:16 -07:00
Laura Abbott
c66ca1b31f Linux v5.0.8 2019-04-17 09:18:51 -07:00
Jeremy Cline
24416b4679 Enforce module signatures in lockdown (rhbz #1696671) 2019-04-12 19:56:25 +00:00
Laura Abbott
0029a386e2 Add DRM fix 2019-04-08 08:06:04 -07:00
Justin M. Forbes
e333597512 Fix CVE-2019 (rhbz 1695044 1697187) 2019-04-08 07:59:44 -05:00
Laura Abbott
85c1ac0d1f Linux v5.0.7 2019-04-07 18:29:43 -07:00
Laura Abbott
4d1fe2fc00 Linux v5.0.6 2019-04-03 07:27:38 -07:00
Justin M. Forbes
d6c48c0f67 Fix CVE-2019-3882 (rhbz 1689426 1695571) 2019-04-03 08:27:39 -05:00
Justin M. Forbes
4e4c210314 Fix CVE-2019-9857 (rhbz 1694758 1694759) 2019-04-01 16:00:19 -05:00
Laura Abbott
39b9b96f0a Ensure ioschedulers are built in (rhbz 1690604) 2019-04-01 10:57:19 -07:00
Laura Abbott
5014efb083 Linux v5.0.5 2019-03-27 13:27:18 -07:00
Laura Abbott
9c960b158e bring back NFS fix
When doing the 5.0 rebase, I mistakenly thought a conflict meant
a patch had been merged. Turns out, it was an actual (minor) conflict.
Bring back the rebased patch which can actually be dropped with 5.1.
2019-03-27 12:51:26 -07:00
Jeremy Cline
0dc18f640a Enable W1_MASTER_GPIO on aarch64 (rbhz #1671934) 2019-03-25 16:07:24 +00:00
Laura Abbott
55a652872e Linux v5.0.4 2019-03-24 18:57:35 -07:00
Laura Abbott
77a28a5e6c TPM fix (rhbz 1688283) 2019-03-22 09:32:39 -07:00
Hans de Goede
9df3982d52 Make the mainline vboxguest drv feature set match VirtualBox 6.0.x (#1689750) 2019-03-20 14:27:19 +01:00
Peter Robinson
4a22c129ef arm: build in some drivers needed by tegra jetson platforms 2019-03-19 18:24:04 +00:00
Peter Robinson
bd17fe2b2f enable stmmac dwc-qos for tegra 2019-03-19 18:23:51 +00:00
Laura Abbott
a8bfbf6db3 Forgot to update the header tarball script 2019-03-19 07:49:32 -07:00
Laura Abbott
1ec9f8fe13 Linux v5.0 rebase 2019-03-19 07:47:14 -07:00
Justin M. Forbes
f1deb73151 Linux v4.20.16 2019-03-14 09:44:33 -05:00
Peter Robinson
35493b2f90 Arm config updates and fixes, fixes for Jetson TX series 2019-03-12 12:05:21 +00:00
Justin M. Forbes
b4bf18bc44 Linux v4.20.15 2019-03-11 10:38:50 -05:00
Peter Robinson
cf3b09c495 efi fix for arm32 that's been in f30 for a while 2019-03-11 01:19:29 +00:00
Laura Abbott
8b97e31724 Disable stackleak plugin
Packaging this is a bit more complicated than expected and
lets to errors when building external modules. Turn this off
for now until we find a better solution.
2019-03-05 11:27:33 -08:00
Justin M. Forbes
61d31d3313 Linux v4.20.14 2019-03-05 13:02:36 -06:00
Justin M. Forbes
33d460bef6 Linux v4.20.13 2019-02-27 13:04:10 -06:00
Justin M. Forbes
6516cc3a70 Linux v4.20.12 2019-02-25 09:37:59 -06:00
Justin M. Forbes
6b699fc046 Fix CVE-2019-8980 (rhbz 1679972 1679974) 2019-02-22 08:15:55 -06:00
Justin M. Forbes
60014f9d0b Linux v4.20.11 2019-02-20 09:19:28 -06:00
Justin M. Forbes
bb99dec73f Fix CVE-2019-8912 (rhbz 1678685 1678686) 2019-02-19 08:42:17 -06:00
Peter Robinson
e603107af6 arm: omap4: fix some cpuidle/display issues 2019-02-17 14:11:06 +00:00
Justin M. Forbes
473f80087b Linux v4.20.10 2019-02-15 10:08:25 -06:00
Justin M. Forbes
040b62651f Fix crash driver to use linux/uaccess.h 2019-02-13 06:38:38 -06:00
Justin M. Forbes
866d1567e2 Linux v4.20.8 2019-02-12 17:16:34 -06:00
Peter Robinson
9a04caa115 Minor Arm fixes and enhancements 2019-02-12 14:27:48 +00:00
Peter Robinson
c8afd126f1 enable COMPAT on aarch64 to enable some legacy usecases on aarch64 with containers 2019-02-12 08:12:08 +00:00
Justin M. Forbes
65cc2ff37a removed dropped patch 2019-02-06 12:04:52 -06:00
Justin M. Forbes
2735cb7f59 Linux v4.20.7 2019-02-06 12:04:08 -06:00
Justin M. Forbes
c28a1e954f Linux v4.20.6 2019-01-31 08:57:35 -06:00
Justin M. Forbes
e826a30dd1 Fix CVE-2018-16880 (rhbz 1656472 1669545) 2019-01-28 12:46:20 -06:00
Justin M. Forbes
6003d5ee9d Linux v4.20.5 2019-01-28 07:42:57 -06:00
Peter Robinson
672c24819e Enable STM 6-axis IMU MEMS sensors 2019-01-27 04:29:15 +00:00
Hans de Goede
3b435f1f24 Add upstream patch fixing backlight control not working on some laptops
with a Nvidia GPU (rhbz#1663613, rhbz#1665505)
2019-01-23 20:38:10 +01:00
Justin M. Forbes
a6a1b2b1b4 Linux v4.20.4 2019-01-23 09:41:39 -06:00
Peter Robinson
2b81acb937 Update missed CONFIG_88EU_AP_MODE for R8188EU arm change 2019-01-23 13:02:18 +00:00
Peter Robinson
7d1cfcf98a enable R8188EU on all Arm arches 2019-01-23 03:56:16 +00:00
Justin M. Forbes
4e727c9e05 Forgotten patches 2019-01-17 08:58:13 -06:00
Dan Horák
490f38dbb5 enable NX engine on ppc 2019-01-17 08:26:09 -06:00
Justin M. Forbes
78c9ba62ca Linux v4.20.3 rebase 2019-01-17 08:17:48 -06:00
Jeremy Cline
0f8450abed
Linux v4.19.15 2019-01-14 11:07:47 -05:00
Jeremy Cline
c10dff9f72
Drop the fix for CVE-2018-16884 for now
There's a one or more patches missing. The fix came as part of a 10
patch series, with the first two marked for stable. However, at least
one later patch in series appears to be required.
2019-01-09 15:55:35 -05:00
Jeremy Cline
ff37b9e98d
Linux v4.19.14 2019-01-09 12:49:43 -05:00
Jeremy Cline
f4d96195f7
Fix CVE-2018-16884 (rhbz 1660375 1660825) 2019-01-09 12:49:15 -05:00
Justin M. Forbes
f2af597e82 Fix Changelog date 2019-01-09 09:44:47 -06:00
Justin M. Forbes
5efd1a1a5a Fix CVE-2019-3701 (rhbz 1663729 1663730) 2019-01-09 08:25:07 -06:00
Hans de Goede
23f974ff7c Add patch to fix bluetooth on RPI 3B+ registering twice (rhbz#1661961) 2019-01-07 17:19:49 +01:00
Jeremy Cline
378c99f102
Linux v4.19.13 2018-12-29 17:30:01 -05:00
Hans de Goede
b2ff26baaa Set CONFIG_REALTEK_PHY=y to workaround realtek ethernet issues (rhbz 1650984) 2018-12-27 16:50:57 +01:00
Peter Robinson
c2a32ddd12 Another fix for issue affecting Raspberry Pi 3-series WiFi (rhbz 1652093) 2018-12-24 01:34:10 +00:00
Peter Robinson
fff7d88c32 v4.19.12 2018-12-22 05:30:00 +00:00
Jeremy Cline
8739b84cc7
Linux v4.19.11 2018-12-20 15:03:24 -05:00
Justin M. Forbes
5c8a05e8d1 Update CONFIG_DVB_MAX_ADAPTERS to upstream defaults (changed in 3.7) 2018-12-19 12:21:46 -06:00
Jeremy Cline
e72e0b77df
Linux v4.19.10 2018-12-17 10:11:40 -05:00
Peter Robinson
f598488a79 Fix Raspberry Pi issues affecting WiFi (rhbz 1652093). Here's hoping it's fixed!! :-/ 2018-12-14 01:39:21 +00:00
Jeremy Cline
ec70897be4
Linux v4.19.9 2018-12-13 11:57:21 -05:00
Peter Robinson
5f4c811487 Minor Arm updates for NXP i.MX 6/7 series devices 2018-12-12 09:04:29 +00:00
Peter Robinson
b931afff8d minor AXP PMU cleanup (NFC) 2018-12-12 08:19:55 +00:00
Peter Robinson
7878f4b6bc few more minor AllWinner sunxi cleanups, NFC 2018-12-12 07:33:43 +00:00
Peter Robinson
0636ff1f77 Minor cleanups and consolidation of AllWinner configs 2018-12-12 06:40:27 +00:00
Hans de Goede
964443b370 Really fix non functional hotkeys on Asus FX503VD (#1645070) 2018-12-11 12:28:22 +01:00
Jeremy Cline
316334b35f
Drop the blk-mq patch which has been adjusted in v4.19.8 2018-12-10 09:59:05 -05:00
Jeremy Cline
8da51b6838
Linux v4.19.8 2018-12-10 09:48:37 -05:00
Peter Robinson
22615fdb3e Fix for ethernet LEDs on Raspberry Pi 3B+ 2018-12-06 04:51:16 +00:00
Jeremy Cline
cf820f7d92
Linux v4.19.7 2018-12-05 16:42:59 -05:00
Jeremy Cline
e556318046
Fix corruption bug in direct dispatch for blk-mq 2018-12-05 09:48:42 -05:00
Justin M. Forbes
785b96f8ba Fix CVE-2018-19824 (rhbz 1655816 1655817) 2018-12-04 10:02:50 -06:00
Jeremy Cline
d001f183c4
Fix very quiet speakers on the Thinkpad T570 (rhbz 1554304) 2018-12-03 12:00:16 -05:00
Hans de Goede
279143d272 Fix non functional hotkeys on Asus FX503VD (#1645070) 2018-12-03 17:37:01 +01:00
Jeremy Cline
95d4a9908a
Linux v4.19.6 2018-12-02 12:09:13 -05:00
Paul Bolle
82728cc6ce
configs: correct cpu accounting configuration
The shipped .config files all have CONFIG_TICK_CPU_ACCOUNTING and
CONFIG_VIRT_CPU_ACCOUNTING_NATIVE set. The x86_64 .config files
additionaly have CONFIG_VIRT_CPU_ACCOUNTING_GEN set.

This is wrong because each .config should have just one of these three
set. As a result the build generates
    [...]⚠️ override: VIRT_CPU_ACCOUNTING_NATIVE changes choice state

24 times and
    [...]⚠️ override: VIRT_CPU_ACCOUNTING_GEN changes choice state

4 times. So let's make sure the shipped .config files only have one of
these three Kconfig macros set (ie, the one that's relevant for that
.config target).

Signed-off-by: Paul Bolle <pebolle@tiscali.nl>
2018-11-30 10:28:14 -05:00
Paul Bolle
409190f659
configs: correct memory configuration
The shipped .config files all have CONFIG_FLATMEM_MANUAL and
CONFIG_SPARSEMEM_MANUAL set.

This is wrong because each .config should have just one of these two set
set. (There's also CONFIG_DISCONTIGMEM_MANUAL but Fedora doesn't use
that.) As a result the build generates
    [...]⚠️ override: SPARSEMEM_MANUAL changes choice state

24 times.

If the configuration generation system drops CONFIG_FLATMEM_MANUAL the
warnings go away. And that doesn't change the final .config files that
the kernel's build system actually uses.

(Two details that very few people will care about:
1. x86/i686 still needs to unset CONFIG_FLATMEM_MANUAL to keep
process_configs.sh from killing the build;
2. the kernel build of armv7hl will silently drop
CONFIG_SPARSEMEM_MANUAL. Because of that I didn't bother with an
explicit override for arm/armv7.)

Signed-off-by: Paul Bolle <pebolle@tiscali.nl>
2018-11-30 10:28:12 -05:00
Paul Bolle
324d2dc0fc
configs: use CONFIG_UNWINDER_ORC only in x86/x86_64
The shipped .config files for i686 have both CONFIG_UNWINDER_ORC and
CONFIG_UNWINDER_FRAME_POINTER set. This is wrong because those .config
files should only have CONFIG_UNWINDER_FRAME_POINTER set. As a result
the build generates
    [...]⚠️ override: UNWINDER_ORC changes choice state

4 times.

Move CONFIG_UNWINDER_ORC to x86/x86_64 to correct this. Note that this
doesn't change the final .config files that the kernel's build system
actually uses.

Signed-off-by: Paul Bolle <pebolle@tiscali.nl>
2018-11-30 10:28:07 -05:00
Jeremy Cline
e2b69afd46
Fix slowdowns and crashes for AMD GPUs in pre-PCIe-v3 slots 2018-11-30 10:22:38 -05:00
Jeremy Cline
3fa56323c0
Fix a problem with some rtl8168 chips (rhbz 1650984) 2018-11-29 17:05:58 -05:00
Jeremy Cline
f72ee2395b
Linux v4.19.5
Fix CVE-2018-16862 (rhbz 1649017 1653122)
Fix CVE-2018-19407 (rhbz 1652656 1652658)
2018-11-27 14:03:01 -05:00
Peter Robinson
6a3302a0e1 enable Amlogic Meson GX series pinctrl drivers for arm64 2018-11-27 10:43:08 +00:00
Peter Robinson
b53329b05a cleanup ENA config a little 2018-11-27 08:28:24 +00:00
Jeremy Cline
3601750996
Fix null pointer dereference with Nvidia and vmwgfx drivers (rhbz 1650224) 2018-11-26 14:41:24 -05:00
Peter Robinson
f79ca8903e v4.19.4 2018-11-23 12:40:20 +00:00
Peter Robinson
f8a875d85a Fixes for Rockchips 3399 devices 2018-11-22 15:15:30 +00:00
Peter Robinson
80749df206 disable rockcip PCIE again for f29 2018-11-21 16:30:34 +00:00
Jeremy Cline
14096920f5
Linux v4.19.3 2018-11-21 10:03:02 -05:00
Hans de Goede
eecf80b4af Add a patch fixing KIOX010A accelerometers (rhbz#1526312) 2018-11-20 11:55:31 +01:00
Hans de Goede
29f933973e Add a patch fixing touchscreens on HP AMD based laptops (rhbz#1644013) 2018-11-20 11:06:58 +01:00
Hans de Goede
b149168900 Turn on CONFIG_PINCTRL_GEMINILAKE on x86_64 (rhbz#1639155) 2018-11-20 11:04:19 +01:00
Peter Robinson
ded83b5934 Fix WiFi on Raspberry Pi 3 on aarch64 (rhbz 1649344), Fixes for Raspberry Pi hwmon driver and firmware interface 2018-11-17 17:36:03 +00:00
Hans de Goede
00055623d2 Add patches from 4.20 fixing black screen on CHT devices with i915.fastboot=1 2018-11-16 12:33:12 +01:00
Hans de Goede
864e7b6491 Add patch fixing touchpads on some Apollo Lake devices not working (#1526312) 2018-11-15 11:50:05 +01:00
Jeremy Cline
8892f848b2
Fix CVE-2018-18710 (rhbz 1645140 1648485) 2018-11-14 13:43:09 -05:00
Jeremy Cline
ee73ea2d18
Linux v4.19.2 2018-11-14 13:11:19 -05:00
Laura Abbott
87f9453dd6 Linux v4.18.18 2018-11-11 18:39:26 -08:00
Laura Abbott
428df114ee Linux v4.18.17 2018-11-05 09:23:54 -08:00
Laura Abbott
1a21af89c4 Add i915 eDP fixes 2018-10-23 03:25:11 -07:00
Peter Robinson
e970f20b46 Linux v4.18.16 2018-10-21 00:03:35 +01:00
Peter Robinson
81719d66fe Fix network on some i.MX6 devices (rhbz 1628209) 2018-10-20 23:58:28 +01:00
Justin M. Forbes
b4d25f7cc5 Linux v4.18.15 2018-10-18 11:11:20 -05:00
Peter Robinson
21c1d10106 Add patch to fix mSD on 96boards Hikey 2018-10-18 14:35:07 +01:00
Peter Robinson
447a6b3111 Raspberry Pi graphics fix 2018-10-17 08:58:33 +01:00
Peter Robinson
eebac04dfd Fixes to Rock960 series of devices, improves stability considerably 2018-10-17 00:35:22 +01:00
Justin M. Forbes
58458beceb Linux 4.18.14 2018-10-15 07:15:04 -05:00
Peter Robinson
09bf7b1b2d one more use -delete on find commands 2018-10-14 17:52:55 +01:00
Peter Robinson
049b0f66f6 use -delete on find commands where possible rather than forking out to xargs/rm 2018-10-14 10:22:03 +01:00
Peter Robinson
b80a79ec07 Rebase device specific NVRAM files on brcm WiFi devices to latest 2018-10-12 20:27:41 +01:00
Jeremy Cline
85775ab887
Fix the microphone on Lenovo G50-30s (rhbz 1249364) 2018-10-12 09:53:18 -04:00
Laura Abbott
c9ba412f7c Linux v4.18.13 2018-10-10 09:58:31 -07:00
Justin M. Forbes
faa9accf2b Revert drm/amd/pp: Send khz clock values to DC for smu7/8 (rhbz 1636249) 2018-10-08 16:57:44 -05:00
Peter Robinson
faec95ed33 emable SCSI_MPT3SAS on ARM 2018-10-05 13:27:14 +01:00
Laura Abbott
97e2dc2c53 Linux v4.18.12 2018-10-04 07:29:58 -07:00
Peter Robinson
a3b5129661 Fixes for Ampere platforms 2018-10-03 19:20:42 +01:00
Justin M. Forbes
d115630b52 Fix arm64 kvm priv escalation (rhbz 1635475 1635476) 2018-10-03 07:55:07 -05:00
Peter Robinson
772dbde034 fix regression in Jetson TK1 2018-10-02 20:07:03 +01:00
Peter Robinson
bcfaa77399 enable mpu6500 iio driver on arm 2018-10-02 17:54:26 +01:00
Laura Abbott
b199b1f022 Disable CONFIG_CRYPTO_DEV_SP_PSP (rhbz 1608242) 2018-10-01 12:46:07 -07:00
Laura Abbott
a3104ae190 Fix for Intel Sensor Hub (rhbz 1634250) 2018-10-01 10:47:51 -07:00
Peter Robinson
fce4b4e598 Build for broken AW a64 SoC NICs 2018-10-01 14:26:49 +01:00
Peter Robinson
d1232524b0 Support loading device specific NVRAM files on brcm WiFi devices 2018-10-01 09:27:47 +01:00
Peter Robinson
85a5f1d7e8 Further AllWinner A64 fixes 2018-10-01 00:23:01 +01:00
Laura Abbott
3779aa986b Linux v4.18.11 2018-09-30 07:53:11 -07:00
Jeremy Cline
66a1b58665
Change CONFIG_SSB back to a module (rhbz #1572349) 2018-09-28 13:29:13 -04:00
Peter Robinson
f3a0ca21b0 Add Pine64-LTS support and some other AllWinner-A64 fixes 2018-09-28 14:11:30 +01:00
Peter Robinson
83a9307859 Add initial RockPro64 DT support 2018-09-27 11:32:10 +01:00
Peter Robinson
0748c43e32 Add thermal trip to bcm283x (Raspberry Pi) cpufreq 2018-09-26 21:08:21 +01:00
Laura Abbott
a1c6454f3e Linux v4.18.10 2018-09-26 02:12:31 -07:00
Laura Abbott
6fff97c3dd Fix powerpc IPv6 (rhbz 1628394) 2018-09-26 02:02:20 -07:00
Peter Robinson
ed39b008b0 rockchips: disable pcie while we work out what's going on 2018-09-26 00:14:01 +01:00
Peter Robinson
c847855fd7 fix boot on a number of Rockchips based devices 2018-09-25 00:38:45 +01:00
Justin M. Forbes
2f071bc17d Fix CVE-2018-14633 2018-09-24 07:09:48 -05:00
Peter Robinson
9b985dc8ad Fix and re-enable rk3399 bits 2018-09-23 21:02:30 +01:00
Justin M. Forbes
a9fd03b114 Note 4.18.9 fixes CVE-2018-17182 2018-09-20 07:44:13 -05:00
Laura Abbott
933f2fe9c7 Linux v4.18.9 2018-09-19 19:08:29 -07:00
Peter Robinson
31276ce0c9 comment out rk3399 bits for the moment 2018-09-17 16:34:15 +01:00
Laura Abbott
69ed74e31b Linux v4.18.8 2018-09-16 10:34:35 -07:00
Peter Robinson
6ebda19672 more minor ARM tweaks 2018-09-16 18:00:14 +01:00
Peter Robinson
5b467198f4 a few minor ARM config tweaks 2018-09-16 17:47:24 +01:00
Peter Robinson
543e5bdda5 Build TCG_TIS_I2C_INFINEON on all ARM 2018-09-16 17:35:41 +01:00
Peter Robinson
6f2e125c4d arm: gpio: fix a driver that blocks suspend for a number of devices 2018-09-15 14:39:22 +01:00
Peter Robinson
fdb00d2a5e Merge branch 'f29' of ssh://pkgs.fedoraproject.org/rpms/kernel into f29 2018-09-15 05:38:54 +01:00
Peter Robinson
515e0e79e2 add 4.19 fix for qcom msm driver 2018-09-15 00:18:44 +01:00
Justin M. Forbes
aa92897b03 Additional Fixes for CVE-2018-5391 (rhbz 1616059) 2018-09-14 14:01:34 -05:00
Laura Abbott
aa224e7033 Use the CPU RNG for entropy (rhbz 1572944) 2018-09-13 17:26:41 -07:00
Laura Abbott
4c68323339 HID fixes (rhbz 1627963 1628715) 2018-09-13 17:08:59 -07:00
Hans de Goede
c0fc8283f2 Add patch silencing "EFI stub: UEFI Secure Boot is enabled." at boot 2018-09-13 17:01:03 +02:00
Dan Horák
014d92c363
drop redundant spectre v2 mitigation (rhbz#1627915) 2018-09-13 09:54:45 -04:00
Peter Robinson
76d1380e69 remove deleted omap option 2018-09-13 10:03:07 +01:00
Peter Robinson
2f12b3e59e Add 96boards rk3399 Ficus and Rock960 support 2018-09-10 18:32:07 +01:00
Laura Abbott
2d9f342b83 Linux v4.18.7 2018-09-10 08:09:11 -07:00
Laura Abbott
bdaa844334 Linux v4.18.6 2018-09-05 12:51:12 -07:00
Peter Robinson
7fd5652a0d enable QCom IPC router bits 2018-08-29 12:16:09 +01:00
Peter Robinson
c176dd8025 build in the HW crc32 module, it's almost everywhere, even in the RPi, and now aarch664 requirement 2018-08-28 23:51:56 +01:00
Justin M. Forbes
8f77a5bad2 Remove bpf restriction for now, revisit (rhbz 1622986) 2018-08-28 15:40:43 -05:00
Justin M. Forbes
f1b44b9bcf Update headers script 2018-08-27 11:20:12 -05:00
Laura Abbott
8e3d06682d Linux v4.18.5 2018-08-24 09:46:18 -07:00
Laura Abbott
38be301069 Linux v4.18.4 2018-08-22 07:46:54 -07:00
Peter Robinson
b4f30451c1 Re-add mvebu a3700 ATF memory exclusion, Upstream fix for dwc2 on some ARM platforms 2018-08-22 14:05:18 +01:00
Laura Abbott
ec7eeb8d95 Linux v4.18.3 2018-08-20 12:30:10 -07:00
Justin M. Forbes
fc841cf8d3 Fix CVE-2018-15471 (rhbz 1610555 1618414) 2018-08-20 09:00:59 -05:00
Peter Robinson
1b0fe53452 enable a couple of iio sensors 2018-08-20 14:54:19 +01:00
Peter Robinson
c588833763 Add fix and re-enable BPF JIT on ARMv7 2018-08-17 22:17:13 +01:00
Peter Robinson
00a29628e2 Cleanup some old config options, remove DRM drivers hidden behind DRM_LEGACY, tweak module filters a little (fpga, iio, few other bits), minor find optimisation 2018-08-16 20:14:01 +01:00
Laura Abbott
31725dcc65 Linux v4.18.1 2018-08-16 09:34:44 -07:00
Laura Abbott
094049e9bf Disable GPG checking for now
kernel.org switched how they generate GPG signatures. This
doesn't work with the existing scripts so disable this for now.
2018-08-16 09:34:06 -07:00
Jeremy Cline
e617f01aa2
Bring back AEGIS and MORUS ciphers (rhbz 1610180) 2018-08-16 17:24:00 +01:00
Peter Robinson
4e31f1d088 Drop PPC64 (Big Endian) configs, this is a basic drop, the over all power64 could likely do with some other cleanup 2018-08-15 21:33:32 +01:00
Jeremy Cline
22baf87d10
Revert "Linux v4.18-1283-g10f3e23f07cb"
This reverts commit 6003595fcc.

4.19 should be rawhide-only.
2018-08-14 20:04:02 +01:00
10672 changed files with 45448 additions and 314086 deletions

9
.gitignore vendored
View file

@ -1,2 +1,11 @@
clog
*.xz
*.bz2
*.gz
*.rpm
*.orig
*.sign
kernel-[45].*/
perf-man-*.tar.gz
kernel-headers/
kernel-tools/

View file

@ -0,0 +1,25 @@
From 12cec6680e67d6b4fed9e30cd8c1f13871996cc1 Mon Sep 17 00:00:00 2001
From: Laura Abbott <labbott@redhat.com>
Date: Wed, 23 Jan 2019 14:36:37 +0100
Subject: [PATCH] Drop that for now
---
Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Makefile b/Makefile
index f5b1d0d168e0..5f31107b22d1 100644
--- a/Makefile
+++ b/Makefile
@@ -430,7 +430,7 @@ KBUILD_AFLAGS := -D__ASSEMBLY__ -fno-PIE
KBUILD_CFLAGS := -Wall -Wundef -Werror=strict-prototypes -Wno-trigraphs \
-fno-strict-aliasing -fno-common -fshort-wchar -fno-PIE \
-Werror=implicit-function-declaration -Werror=implicit-int \
- -Wno-format-security \
+ -Wno-format-security -Wno-address-of-packed-member \
-std=gnu89
KBUILD_CPPFLAGS := -D__KERNEL__
KBUILD_AFLAGS_KERNEL :=
--
2.20.1

View file

@ -0,0 +1,104 @@
From 3ce5852ec6add45a28fe1706e9163351940e905c Mon Sep 17 00:00:00 2001
From: Peter Jones <pjones@redhat.com>
Date: Mon, 2 Oct 2017 18:25:29 -0400
Subject: [PATCH 1/3] Make get_cert_list() not complain about cert lists that
aren't present.
Signed-off-by: Peter Jones <pjones@redhat.com>
---
security/integrity/platform_certs/load_uefi.c | 37 ++++++++++++++++++++++---------------
1 file changed, 22 insertions(+), 15 deletions(-)
diff --git a/security/integrity/platform_certs/load_uefi.c b/security/integrity/platform_certs/load_uefi.c
index 81b19c52832b..e188f3ecbce3 100644
--- a/security/integrity/platform_certs/load_uefi.c
+++ b/security/integrity/platform_certs/load_uefi.c
@@ -38,8 +38,8 @@ static __init bool uefi_check_ignore_db(void)
/*
* Get a certificate list blob from the named EFI variable.
*/
-static __init void *get_cert_list(efi_char16_t *name, efi_guid_t *guid,
- unsigned long *size)
+static __init int get_cert_list(efi_char16_t *name, efi_guid_t *guid,
+ unsigned long *size , void **cert_list)
{
efi_status_t status;
unsigned long lsize = 4;
@@ -47,24 +47,31 @@ static __init void *get_cert_list(efi_char16_t *name, efi_guid_t *guid,
void *db;
status = efi.get_variable(name, guid, NULL, &lsize, &tmpdb);
+ if (status == EFI_NOT_FOUND) {
+ *size = 0;
+ *cert_list = NULL;
+ return 0;
+ }
+
if (status != EFI_BUFFER_TOO_SMALL) {
pr_err("Couldn't get size: 0x%lx\n", status);
- return NULL;
+ return efi_status_to_err(status);
}
db = kmalloc(lsize, GFP_KERNEL);
if (!db)
- return NULL;
+ return -ENOMEM;
status = efi.get_variable(name, guid, NULL, &lsize, db);
if (status != EFI_SUCCESS) {
kfree(db);
pr_err("Error reading db var: 0x%lx\n", status);
- return NULL;
+ return efi_status_to_err(status);
}
*size = lsize;
- return db;
+ *cert_list = db;
+ return 0;
}
/*
@@ -153,10 +160,10 @@ static int __init load_uefi_certs(void)
* an error if we can't get them.
*/
if (!uefi_check_ignore_db()) {
- db = get_cert_list(L"db", &secure_var, &dbsize);
- if (!db) {
+ rc = get_cert_list(L"db", &secure_var, &dbsize, &db);
+ if (rc < 0) {
pr_err("MODSIGN: Couldn't get UEFI db list\n");
- } else {
+ } else if (dbsize != 0) {
rc = parse_efi_signature_list("UEFI:db",
db, dbsize, get_handler_for_db);
if (rc)
@@ -166,10 +173,10 @@ static int __init load_uefi_certs(void)
}
}
- mok = get_cert_list(L"MokListRT", &mok_var, &moksize);
- if (!mok) {
+ rc = get_cert_list(L"MokListRT", &mok_var, &moksize, &mok);
+ if (rc < 0) {
pr_info("Couldn't get UEFI MokListRT\n");
- } else {
+ } else if (moksize != 0) {
rc = parse_efi_signature_list("UEFI:MokListRT",
mok, moksize, get_handler_for_db);
if (rc)
@@ -177,10 +184,10 @@ static int __init load_uefi_certs(void)
kfree(mok);
}
- dbx = get_cert_list(L"dbx", &secure_var, &dbxsize);
- if (!dbx) {
+ rc = get_cert_list(L"dbx", &secure_var, &dbxsize, &dbx);
+ if (rc < 0) {
pr_info("Couldn't get UEFI dbx list\n");
- } else {
+ } else if (dbxsize != 0) {
rc = parse_efi_signature_list("UEFI:dbx",
dbx, dbxsize,
get_handler_for_dbx);

View file

@ -0,0 +1,33 @@
From 4a9d46a9fe14401f21df69cea97c62396d5fb053 Mon Sep 17 00:00:00 2001
From: Navid Emamdoost <navid.emamdoost@gmail.com>
Date: Tue, 10 Sep 2019 17:21:19 -0500
Subject: [PATCH] RDMA: Fix goto target to release the allocated memory
In bnxt_re_create_srq(), when ib_copy_to_udata() fails allocated memory
should be released by goto fail.
Fixes: 37cb11acf1f7 ("RDMA/bnxt_re: Add SRQ support for Broadcom adapters")
Link: https://lore.kernel.org/r/20190910222120.16517-1-navid.emamdoost@gmail.com
Signed-off-by: Navid Emamdoost <navid.emamdoost@gmail.com>
Reviewed-by: Jason Gunthorpe <jgg@mellanox.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
---
drivers/infiniband/hw/bnxt_re/ib_verbs.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/infiniband/hw/bnxt_re/ib_verbs.c b/drivers/infiniband/hw/bnxt_re/ib_verbs.c
index f9e97d0cc459..b4149dc9e824 100644
--- a/drivers/infiniband/hw/bnxt_re/ib_verbs.c
+++ b/drivers/infiniband/hw/bnxt_re/ib_verbs.c
@@ -1398,7 +1398,7 @@ int bnxt_re_create_srq(struct ib_srq *ib_srq,
dev_err(rdev_to_dev(rdev), "SRQ copy to udata failed!");
bnxt_qplib_destroy_srq(&rdev->qplib_res,
&srq->qplib_srq);
- goto exit;
+ goto fail;
}
}
if (nq)
--
2.23.0

View file

@ -0,0 +1,29 @@
From 728c1e2a05e4b5fc52fab3421dce772a806612a2 Mon Sep 17 00:00:00 2001
From: Navid Emamdoost <navid.emamdoost@gmail.com>
Date: Fri, 6 Sep 2019 13:59:30 -0500
Subject: [PATCH] ath9k: release allocated buffer if timed out
In ath9k_wmi_cmd, the allocated network buffer needs to be released
if timeout happens. Otherwise memory will be leaked.
Signed-off-by: Navid Emamdoost <navid.emamdoost@gmail.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
---
drivers/net/wireless/ath/ath9k/wmi.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/net/wireless/ath/ath9k/wmi.c b/drivers/net/wireless/ath/ath9k/wmi.c
index d1f6710ca63b..cdc146091194 100644
--- a/drivers/net/wireless/ath/ath9k/wmi.c
+++ b/drivers/net/wireless/ath/ath9k/wmi.c
@@ -336,6 +336,7 @@ int ath9k_wmi_cmd(struct wmi *wmi, enum wmi_cmd_id cmd_id,
ath_dbg(common, WMI, "Timeout waiting for WMI command: %s\n",
wmi_cmd_to_name(cmd_id));
mutex_unlock(&wmi->op_mutex);
+ kfree_skb(skb);
return -ETIMEDOUT;
}
--
2.23.0

View file

@ -0,0 +1,46 @@
From 853acf7caf10b828102d92d05b5c101666a6142b Mon Sep 17 00:00:00 2001
From: Navid Emamdoost <navid.emamdoost@gmail.com>
Date: Fri, 6 Sep 2019 13:26:03 -0500
Subject: [PATCH] ath9k_htc: release allocated buffer if timed out
In htc_config_pipe_credits, htc_setup_complete, and htc_connect_service
if time out happens, the allocated buffer needs to be released.
Otherwise there will be memory leak.
Signed-off-by: Navid Emamdoost <navid.emamdoost@gmail.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
---
drivers/net/wireless/ath/ath9k/htc_hst.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/net/wireless/ath/ath9k/htc_hst.c b/drivers/net/wireless/ath/ath9k/htc_hst.c
index 1bf63a4efb4c..d091c8ebdcf0 100644
--- a/drivers/net/wireless/ath/ath9k/htc_hst.c
+++ b/drivers/net/wireless/ath/ath9k/htc_hst.c
@@ -170,6 +170,7 @@ static int htc_config_pipe_credits(struct htc_target *target)
time_left = wait_for_completion_timeout(&target->cmd_wait, HZ);
if (!time_left) {
dev_err(target->dev, "HTC credit config timeout\n");
+ kfree_skb(skb);
return -ETIMEDOUT;
}
@@ -205,6 +206,7 @@ static int htc_setup_complete(struct htc_target *target)
time_left = wait_for_completion_timeout(&target->cmd_wait, HZ);
if (!time_left) {
dev_err(target->dev, "HTC start timeout\n");
+ kfree_skb(skb);
return -ETIMEDOUT;
}
@@ -277,6 +279,7 @@ int htc_connect_service(struct htc_target *target,
if (!time_left) {
dev_err(target->dev, "Service connection timeout for: %d\n",
service_connreq->service_id);
+ kfree_skb(skb);
return -ETIMEDOUT;
}
--
2.23.0

View file

@ -0,0 +1,26 @@
From 15f77c4ade3364106a3a397f0a8d6fce9d6a6326 Mon Sep 17 00:00:00 2001
From: Ben Skeggs <bskeggs@redhat.com>
Date: Fri, 11 Jan 2019 16:08:20 +1000
Subject: [PATCH] drm/nouveau: register backlight on pascal and newer
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
---
drivers/gpu/drm/nouveau/nouveau_backlight.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/gpu/drm/nouveau/nouveau_backlight.c b/drivers/gpu/drm/nouveau/nouveau_backlight.c
index 5f5be6368aed..c7a94c94dbf3 100644
--- a/drivers/gpu/drm/nouveau/nouveau_backlight.c
+++ b/drivers/gpu/drm/nouveau/nouveau_backlight.c
@@ -253,6 +253,8 @@ nouveau_backlight_init(struct drm_connector *connector)
case NV_DEVICE_INFO_V0_FERMI:
case NV_DEVICE_INFO_V0_KEPLER:
case NV_DEVICE_INFO_V0_MAXWELL:
+ case NV_DEVICE_INFO_V0_PASCAL:
+ case NV_DEVICE_INFO_V0_VOLTA:
ret = nv50_backlight_init(nv_encoder, &props, &ops);
break;
default:
--
2.20.1

View file

@ -0,0 +1,29 @@
From b4b814fec1a5a849383f7b3886b654a13abbda7d Mon Sep 17 00:00:00 2001
From: Navid Emamdoost <navid.emamdoost@gmail.com>
Date: Thu, 12 Sep 2019 23:23:27 -0500
Subject: [PATCH] iwlwifi: dbg_ini: fix memory leak in alloc_sgtable
In alloc_sgtable if alloc_page fails, the alocated table should be
released.
Signed-off-by: Navid Emamdoost <navid.emamdoost@gmail.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
---
drivers/net/wireless/intel/iwlwifi/fw/dbg.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/net/wireless/intel/iwlwifi/fw/dbg.c b/drivers/net/wireless/intel/iwlwifi/fw/dbg.c
index 5c8602de9168..87421807e040 100644
--- a/drivers/net/wireless/intel/iwlwifi/fw/dbg.c
+++ b/drivers/net/wireless/intel/iwlwifi/fw/dbg.c
@@ -646,6 +646,7 @@ static struct scatterlist *alloc_sgtable(int size)
if (new_page)
__free_page(new_page);
}
+ kfree(table);
return NULL;
}
alloc_size = min_t(int, size, PAGE_SIZE);
--
2.23.0

View file

@ -0,0 +1,99 @@
From 0f4f199443faca715523b0659aa536251d8b978f Mon Sep 17 00:00:00 2001
From: Navid Emamdoost <navid.emamdoost@gmail.com>
Date: Fri, 27 Sep 2019 15:56:04 -0500
Subject: [PATCH] iwlwifi: pcie: fix memory leaks in
iwl_pcie_ctxt_info_gen3_init
In iwl_pcie_ctxt_info_gen3_init there are cases that the allocated dma
memory is leaked in case of error.
DMA memories prph_scratch, prph_info, and ctxt_info_gen3 are allocated
and initialized to be later assigned to trans_pcie. But in any error case
before such assignment the allocated memories should be released.
First of such error cases happens when iwl_pcie_init_fw_sec fails.
Current implementation correctly releases prph_scratch. But in two
sunsequent error cases where dma_alloc_coherent may fail, such
releases are missing.
This commit adds release for prph_scratch when allocation for
prph_info fails, and adds releases for prph_scratch and prph_info when
allocation for ctxt_info_gen3 fails.
Fixes: 2ee824026288 ("iwlwifi: pcie: support context information for 22560 devices")
Signed-off-by: Navid Emamdoost <navid.emamdoost@gmail.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
---
.../intel/iwlwifi/pcie/ctxt-info-gen3.c | 36 +++++++++++++------
1 file changed, 25 insertions(+), 11 deletions(-)
diff --git a/drivers/net/wireless/intel/iwlwifi/pcie/ctxt-info-gen3.c b/drivers/net/wireless/intel/iwlwifi/pcie/ctxt-info-gen3.c
index 75fa8a6aafee..74980382e64c 100644
--- a/drivers/net/wireless/intel/iwlwifi/pcie/ctxt-info-gen3.c
+++ b/drivers/net/wireless/intel/iwlwifi/pcie/ctxt-info-gen3.c
@@ -107,13 +107,9 @@ int iwl_pcie_ctxt_info_gen3_init(struct iwl_trans *trans,
/* allocate ucode sections in dram and set addresses */
ret = iwl_pcie_init_fw_sec(trans, fw, &prph_scratch->dram);
- if (ret) {
- dma_free_coherent(trans->dev,
- sizeof(*prph_scratch),
- prph_scratch,
- trans_pcie->prph_scratch_dma_addr);
- return ret;
- }
+ if (ret)
+ goto err_free_prph_scratch;
+
/* Allocate prph information
* currently we don't assign to the prph info anything, but it would get
@@ -121,16 +117,20 @@ int iwl_pcie_ctxt_info_gen3_init(struct iwl_trans *trans,
prph_info = dma_alloc_coherent(trans->dev, sizeof(*prph_info),
&trans_pcie->prph_info_dma_addr,
GFP_KERNEL);
- if (!prph_info)
- return -ENOMEM;
+ if (!prph_info) {
+ ret = -ENOMEM;
+ goto err_free_prph_scratch;
+ }
/* Allocate context info */
ctxt_info_gen3 = dma_alloc_coherent(trans->dev,
sizeof(*ctxt_info_gen3),
&trans_pcie->ctxt_info_dma_addr,
GFP_KERNEL);
- if (!ctxt_info_gen3)
- return -ENOMEM;
+ if (!ctxt_info_gen3) {
+ ret = -ENOMEM;
+ goto err_free_prph_info;
+ }
ctxt_info_gen3->prph_info_base_addr =
cpu_to_le64(trans_pcie->prph_info_dma_addr);
@@ -186,6 +186,20 @@ int iwl_pcie_ctxt_info_gen3_init(struct iwl_trans *trans,
iwl_set_bit(trans, CSR_GP_CNTRL, CSR_AUTO_FUNC_INIT);
return 0;
+
+err_free_prph_info:
+ dma_free_coherent(trans->dev,
+ sizeof(*prph_info),
+ prph_info,
+ trans_pcie->prph_info_dma_addr);
+
+err_free_prph_scratch:
+ dma_free_coherent(trans->dev,
+ sizeof(*prph_scratch),
+ prph_scratch,
+ trans_pcie->prph_scratch_dma_addr);
+ return ret;
+
}
void iwl_pcie_ctxt_info_gen3_free(struct iwl_trans *trans)
--
2.23.0

View file

@ -0,0 +1,33 @@
From 1399c59fa92984836db90538cf92397fe7caaa57 Mon Sep 17 00:00:00 2001
From: Navid Emamdoost <navid.emamdoost@gmail.com>
Date: Fri, 4 Oct 2019 14:42:19 -0500
Subject: [PATCH] nl80211: fix memory leak in nl80211_get_ftm_responder_stats
In nl80211_get_ftm_responder_stats, a new skb is created via nlmsg_new
named msg. If nl80211hdr_put() fails, then msg should be released. The
return statement should be replace by goto to error handling code.
Fixes: 81e54d08d9d8 ("cfg80211: support FTM responder configuration/statistics")
Signed-off-by: Navid Emamdoost <navid.emamdoost@gmail.com>
Link: https://lore.kernel.org/r/20191004194220.19412-1-navid.emamdoost@gmail.com
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
---
net/wireless/nl80211.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c
index 141cdb171665..4453dd375de9 100644
--- a/net/wireless/nl80211.c
+++ b/net/wireless/nl80211.c
@@ -13682,7 +13682,7 @@ static int nl80211_get_ftm_responder_stats(struct sk_buff *skb,
hdr = nl80211hdr_put(msg, info->snd_portid, info->snd_seq, 0,
NL80211_CMD_GET_FTM_RESPONDER_STATS);
if (!hdr)
- return -ENOBUFS;
+ goto nla_put_failure;
if (nla_put_u32(msg, NL80211_ATTR_IFINDEX, dev->ifindex))
goto nla_put_failure;
--
2.23.0

View file

@ -0,0 +1,37 @@
From 96c5c6e6a5b6db592acae039fed54b5c8844cd35 Mon Sep 17 00:00:00 2001
From: Navid Emamdoost <navid.emamdoost@gmail.com>
Date: Fri, 20 Sep 2019 17:57:59 -0500
Subject: [PATCH] tracing: Have error path in predicate_parse() free its
allocated memory
In predicate_parse, there is an error path that is not going to
out_free instead it returns directly which leads to a memory leak.
Link: http://lkml.kernel.org/r/20190920225800.3870-1-navid.emamdoost@gmail.com
Signed-off-by: Navid Emamdoost <navid.emamdoost@gmail.com>
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
---
kernel/trace/trace_events_filter.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/kernel/trace/trace_events_filter.c b/kernel/trace/trace_events_filter.c
index c773b8fb270c..c9a74f82b14a 100644
--- a/kernel/trace/trace_events_filter.c
+++ b/kernel/trace/trace_events_filter.c
@@ -452,8 +452,10 @@ predicate_parse(const char *str, int nr_parens, int nr_preds,
switch (*next) {
case '(': /* #2 */
- if (top - op_stack > nr_parens)
- return ERR_PTR(-EINVAL);
+ if (top - op_stack > nr_parens) {
+ ret = -EINVAL;
+ goto out_free;
+ }
*(++top) = invert;
continue;
case '!': /* #3 */
--
2.23.0

View file

@ -0,0 +1,183 @@
From c8218e9b3c38fcd36a2d06eec09952a0c6cee9e0 Mon Sep 17 00:00:00 2001
From: Peter Jones <pjones@redhat.com>
Date: Mon, 2 Oct 2017 18:22:13 -0400
Subject: [PATCH 2/3] Add efi_status_to_str() and rework efi_status_to_err().
This adds efi_status_to_str() for use when printing efi_status_t
messages, and reworks efi_status_to_err() so that the two use a common
list of errors.
Signed-off-by: Peter Jones <pjones@redhat.com>
---
include/linux/efi.h | 3 ++
drivers/firmware/efi/efi.c | 122 ++++++++++++++++++++++++++++++++++-----------
2 files changed, 95 insertions(+), 30 deletions(-)
diff --git a/include/linux/efi.h b/include/linux/efi.h
index 18b16bf5ce1..436b3c93c3d 100644
--- a/include/linux/efi.h
+++ b/include/linux/efi.h
@@ -42,6 +42,8 @@
#define EFI_ABORTED (21 | (1UL << (BITS_PER_LONG-1)))
#define EFI_SECURITY_VIOLATION (26 | (1UL << (BITS_PER_LONG-1)))
+#define EFI_IS_ERROR(x) ((x) & (1UL << (BITS_PER_LONG-1)))
+
typedef unsigned long efi_status_t;
typedef u8 efi_bool_t;
typedef u16 efi_char16_t; /* UNICODE character */
@@ -1183,6 +1185,7 @@ static inline void efi_set_secure_boot(enum efi_secureboot_mode mode) {}
#endif
extern int efi_status_to_err(efi_status_t status);
+extern const char *efi_status_to_str(efi_status_t status);
/*
* Variable Attributes
diff --git a/drivers/firmware/efi/efi.c b/drivers/firmware/efi/efi.c
index 557a47829d0..e8f9c7d84e9 100644
--- a/drivers/firmware/efi/efi.c
+++ b/drivers/firmware/efi/efi.c
@@ -31,6 +31,7 @@
#include <linux/acpi.h>
#include <linux/ucs2_string.h>
#include <linux/memblock.h>
+#include <linux/bsearch.h>
#include <asm/early_ioremap.h>
@@ -865,40 +866,101 @@ int efi_mem_type(unsigned long phys_addr)
}
#endif
+struct efi_error_code {
+ efi_status_t status;
+ int errno;
+ const char *description;
+};
+
+static const struct efi_error_code efi_error_codes[] = {
+ { EFI_SUCCESS, 0, "Success"},
+#if 0
+ { EFI_LOAD_ERROR, -EPICK_AN_ERRNO, "Load Error"},
+#endif
+ { EFI_INVALID_PARAMETER, -EINVAL, "Invalid Parameter"},
+ { EFI_UNSUPPORTED, -ENOSYS, "Unsupported"},
+ { EFI_BAD_BUFFER_SIZE, -ENOSPC, "Bad Buffer Size"},
+ { EFI_BUFFER_TOO_SMALL, -ENOSPC, "Buffer Too Small"},
+ { EFI_NOT_READY, -EAGAIN, "Not Ready"},
+ { EFI_DEVICE_ERROR, -EIO, "Device Error"},
+ { EFI_WRITE_PROTECTED, -EROFS, "Write Protected"},
+ { EFI_OUT_OF_RESOURCES, -ENOMEM, "Out of Resources"},
+#if 0
+ { EFI_VOLUME_CORRUPTED, -EPICK_AN_ERRNO, "Volume Corrupt"},
+ { EFI_VOLUME_FULL, -EPICK_AN_ERRNO, "Volume Full"},
+ { EFI_NO_MEDIA, -EPICK_AN_ERRNO, "No Media"},
+ { EFI_MEDIA_CHANGED, -EPICK_AN_ERRNO, "Media changed"},
+#endif
+ { EFI_NOT_FOUND, -ENOENT, "Not Found"},
+#if 0
+ { EFI_ACCESS_DENIED, -EPICK_AN_ERRNO, "Access Denied"},
+ { EFI_NO_RESPONSE, -EPICK_AN_ERRNO, "No Response"},
+ { EFI_NO_MAPPING, -EPICK_AN_ERRNO, "No mapping"},
+ { EFI_TIMEOUT, -EPICK_AN_ERRNO, "Time out"},
+ { EFI_NOT_STARTED, -EPICK_AN_ERRNO, "Not started"},
+ { EFI_ALREADY_STARTED, -EPICK_AN_ERRNO, "Already started"},
+#endif
+ { EFI_ABORTED, -EINTR, "Aborted"},
+#if 0
+ { EFI_ICMP_ERROR, -EPICK_AN_ERRNO, "ICMP Error"},
+ { EFI_TFTP_ERROR, -EPICK_AN_ERRNO, "TFTP Error"},
+ { EFI_PROTOCOL_ERROR, -EPICK_AN_ERRNO, "Protocol Error"},
+ { EFI_INCOMPATIBLE_VERSION, -EPICK_AN_ERRNO, "Incompatible Version"},
+#endif
+ { EFI_SECURITY_VIOLATION, -EACCES, "Security Policy Violation"},
+#if 0
+ { EFI_CRC_ERROR, -EPICK_AN_ERRNO, "CRC Error"},
+ { EFI_END_OF_MEDIA, -EPICK_AN_ERRNO, "End of Media"},
+ { EFI_END_OF_FILE, -EPICK_AN_ERRNO, "End of File"},
+ { EFI_INVALID_LANGUAGE, -EPICK_AN_ERRNO, "Invalid Languages"},
+ { EFI_COMPROMISED_DATA, -EPICK_AN_ERRNO, "Compromised Data"},
+
+ // warnings
+ { EFI_WARN_UNKOWN_GLYPH, -EPICK_AN_ERRNO, "Warning Unknown Glyph"},
+ { EFI_WARN_DELETE_FAILURE, -EPICK_AN_ERRNO, "Warning Delete Failure"},
+ { EFI_WARN_WRITE_FAILURE, -EPICK_AN_ERRNO, "Warning Write Failure"},
+ { EFI_WARN_BUFFER_TOO_SMALL, -EPICK_AN_ERRNO, "Warning Buffer Too Small"},
+#endif
+};
+
+static int
+efi_status_cmp_bsearch(const void *key, const void *item)
+{
+ u64 status = (u64)(uintptr_t)key;
+ struct efi_error_code *code = (struct efi_error_code *)item;
+
+ if (status < code->status)
+ return -1;
+ if (status > code->status)
+ return 1;
+ return 0;
+}
+
int efi_status_to_err(efi_status_t status)
{
- int err;
+ struct efi_error_code *found;
+ size_t num = sizeof(efi_error_codes) / sizeof(struct efi_error_code);
- switch (status) {
- case EFI_SUCCESS:
- err = 0;
- break;
- case EFI_INVALID_PARAMETER:
- err = -EINVAL;
- break;
- case EFI_OUT_OF_RESOURCES:
- err = -ENOSPC;
- break;
- case EFI_DEVICE_ERROR:
- err = -EIO;
- break;
- case EFI_WRITE_PROTECTED:
- err = -EROFS;
- break;
- case EFI_SECURITY_VIOLATION:
- err = -EACCES;
- break;
- case EFI_NOT_FOUND:
- err = -ENOENT;
- break;
- case EFI_ABORTED:
- err = -EINTR;
- break;
- default:
- err = -EINVAL;
- }
+ found = bsearch((void *)(uintptr_t)status, efi_error_codes,
+ sizeof(struct efi_error_code), num,
+ efi_status_cmp_bsearch);
+ if (!found)
+ return -EINVAL;
+ return found->errno;
+}
- return err;
+const char *
+efi_status_to_str(efi_status_t status)
+{
+ struct efi_error_code *found;
+ size_t num = sizeof(efi_error_codes) / sizeof(struct efi_error_code);
+
+ found = bsearch((void *)(uintptr_t)status, efi_error_codes,
+ sizeof(struct efi_error_code), num,
+ efi_status_cmp_bsearch);
+ if (!found)
+ return "Unknown error code";
+ return found->description;
}
bool efi_is_table_address(unsigned long phys_addr)
--
2.15.0

View file

@ -0,0 +1,38 @@
From 520e902d864930e2d4f329983d9ae9781a24231f Mon Sep 17 00:00:00 2001
From: Peter Jones <pjones@redhat.com>
Date: Mon, 2 Oct 2017 18:18:30 -0400
Subject: [PATCH 3/3] Make get_cert_list() use efi_status_to_str() to print
error messages.
Signed-off-by: Peter Jones <pjones@redhat.com>
---
security/integrity/platform_certs/load_uefi.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/security/integrity/platform_certs/load_uefi.c b/security/integrity/platform_certs/load_uefi.c
index 9ef34c44fd1..13a2826715d 100644
--- a/security/integrity/platform_certs/load_uefi.c
+++ b/security/integrity/platform_certs/load_uefi.c
@@ -51,7 +51,8 @@ static __init int get_cert_list(efi_char16_t *name, efi_guid_t *guid,
}
if (status != EFI_BUFFER_TOO_SMALL) {
- pr_err("Couldn't get size: 0x%lx\n", status);
+ pr_err("Couldn't get size: %s (0x%lx)\n",
+ efi_status_to_str(status), status);
return efi_status_to_err(status);
}
@@ -64,7 +65,8 @@ static __init int get_cert_list(efi_char16_t *name, efi_guid_t *guid,
status = efi.get_variable(name, guid, NULL, &lsize, db);
if (status != EFI_SUCCESS) {
kfree(db);
- pr_err("Error reading db var: 0x%lx\n", status);
+ pr_err("Error reading db var: %s (0x%lx)\n",
+ efi_status_to_str(status), status);
return efi_status_to_err(status);
}
--
2.15.0

View file

@ -0,0 +1,64 @@
From dbdda4277cf0422a9ccb7ea98d0263c3cdbecdf6 Mon Sep 17 00:00:00 2001
From: Mark Salter <msalter@redhat.com>
Date: Tue, 8 May 2018 21:54:39 -0400
Subject: [PATCH] ACPI / irq: Workaround firmware issue on X-Gene based
m400
The ACPI firmware on the xgene-based m400 platorms erroneously
describes its UART interrupt as ACPI_PRODUCER rather than
ACPI_CONSUMER. This leads to the UART driver being unable to
find its interrupt and the kernel unable find a console.
Work around this by avoiding the producer/consumer check
for X-Gene UARTs.
Signed-off-by: Mark Salter <msalter@redhat.com>
---
drivers/acpi/irq.c | 17 +++++++++++++++--
1 file changed, 15 insertions(+), 2 deletions(-)
diff --git a/drivers/acpi/irq.c b/drivers/acpi/irq.c
index 7c352cba0528..028c1a564cff 100644
--- a/drivers/acpi/irq.c
+++ b/drivers/acpi/irq.c
@@ -129,6 +129,7 @@ struct acpi_irq_parse_one_ctx {
unsigned int index;
unsigned long *res_flags;
struct irq_fwspec *fwspec;
+ bool skip_producer_check;
};
/**
@@ -200,7 +201,8 @@ static acpi_status acpi_irq_parse_one_cb(struct acpi_resource *ares,
return AE_CTRL_TERMINATE;
case ACPI_RESOURCE_TYPE_EXTENDED_IRQ:
eirq = &ares->data.extended_irq;
- if (eirq->producer_consumer == ACPI_PRODUCER)
+ if (!ctx->skip_producer_check &&
+ eirq->producer_consumer == ACPI_PRODUCER)
return AE_OK;
if (ctx->index >= eirq->interrupt_count) {
ctx->index -= eirq->interrupt_count;
@@ -235,8 +237,19 @@ static acpi_status acpi_irq_parse_one_cb(struct acpi_resource *ares,
static int acpi_irq_parse_one(acpi_handle handle, unsigned int index,
struct irq_fwspec *fwspec, unsigned long *flags)
{
- struct acpi_irq_parse_one_ctx ctx = { -EINVAL, index, flags, fwspec };
+ struct acpi_irq_parse_one_ctx ctx = { -EINVAL, index, flags, fwspec, false };
+ /*
+ * Firmware on arm64-based HPE m400 platform incorrectly marks
+ * its UART interrupt as ACPI_PRODUCER rather than ACPI_CONSUMER.
+ * Don't do the producer/consumer check for that device.
+ */
+ if (IS_ENABLED(CONFIG_ARM64)) {
+ struct acpi_device *adev = acpi_bus_get_acpi_device(handle);
+
+ if (adev && !strcmp(acpi_device_hid(adev), "APMC0D08"))
+ ctx.skip_producer_check = true;
+ }
acpi_walk_resources(handle, METHOD_NAME__CRS, acpi_irq_parse_one_cb, &ctx);
return ctx.rc;
}
--
2.17.0

View file

@ -0,0 +1,39 @@
From 1e494dc5f3140005ff1f17bc06c0c16d6d50d580 Mon Sep 17 00:00:00 2001
From: Mark Salter <msalter@redhat.com>
Date: Thu, 19 Apr 2018 23:29:47 -0400
Subject: [PATCH] ACPI / scan: Fix regression related to X-Gene UARTs
Commit e361d1f85855 ("ACPI / scan: Fix enumeration for special UART
devices") caused a regression with some X-Gene based platforms (Mustang
and M400) with invalid DSDT. The DSDT makes it appear that the UART
device is also a slave device attached to itself. With the above commit
the UART won't be enumerated by ACPI scan (slave serial devices shouldn't
be). So check for X-Gene UART device and skip slace device check on it.
Signed-off-by: Mark Salter <msalter@redhat.com>
---
drivers/acpi/scan.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/drivers/acpi/scan.c b/drivers/acpi/scan.c
index e1b6231cfa1c..542dafac4306 100644
--- a/drivers/acpi/scan.c
+++ b/drivers/acpi/scan.c
@@ -1567,6 +1567,14 @@ static bool acpi_device_enumeration_by_parent(struct acpi_device *device)
if (!acpi_match_device_ids(device, i2c_multi_instantiate_ids))
return false;
+ /*
+ * Firmware on some arm64 X-Gene platforms will make the UART
+ * device appear as both a UART and a slave of that UART. Just
+ * bail out here for X-Gene UARTs.
+ */
+ if (!strcmp(acpi_device_hid(device), "APMC0D08"))
+ return false;
+
INIT_LIST_HEAD(&resource_list);
acpi_dev_get_resources(device, &resource_list,
acpi_check_serial_bus_slave,
--
2.17.1

View file

@ -0,0 +1,28 @@
From: Peter Robinson <pbrobinson@gmail.com>
Date: Thu, 3 May 2012 20:27:11 +0100
Subject: [PATCH] ARM: tegra: usb no reset
Patch for disconnect issues with storage attached to a
tegra-ehci controller
---
drivers/usb/core/hub.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c
index 43cb2f2e3b43..7f838ec11c81 100644
--- a/drivers/usb/core/hub.c
+++ b/drivers/usb/core/hub.c
@@ -4996,6 +4996,13 @@ static void hub_event(struct work_struct *work)
(u16) hub->change_bits[0],
(u16) hub->event_bits[0]);
+ /* Don't disconnect USB-SATA on TrimSlice */
+ if (strcmp(dev_name(hdev->bus->controller), "tegra-ehci.0") == 0) {
+ if ((hdev->state == 7) && (hub->change_bits[0] == 0) &&
+ (hub->event_bits[0] == 0x2))
+ hub->event_bits[0] = 0;
+ }
+
/* Lock the device, then check to see if we were
* disconnected while waiting for the lock to succeed. */
usb_lock_device(hdev);

View file

@ -0,0 +1,60 @@
From 0451d4e795929a69a0fda6d960aa4b077c5bd179 Mon Sep 17 00:00:00 2001
From: Dave Howells <dhowells@redhat.com>
Date: Fri, 5 May 2017 08:21:58 +0100
Subject: [PATCH 1/4] efi: Add EFI signature data types
Add the data types that are used for containing hashes, keys and
certificates for cryptographic verification along with their corresponding
type GUIDs.
Signed-off-by: David Howells <dhowells@redhat.com>
---
include/linux/efi.h | 25 +++++++++++++++++++++++++
1 file changed, 25 insertions(+)
diff --git a/include/linux/efi.h b/include/linux/efi.h
index ec36f42..3259ad6 100644
--- a/include/linux/efi.h
+++ b/include/linux/efi.h
@@ -614,6 +614,10 @@ void efi_native_runtime_setup(void);
#define EFI_IMAGE_SECURITY_DATABASE_GUID EFI_GUID(0xd719b2cb, 0x3d3a, 0x4596, 0xa3, 0xbc, 0xda, 0xd0, 0x0e, 0x67, 0x65, 0x6f)
#define EFI_SHIM_LOCK_GUID EFI_GUID(0x605dab50, 0xe046, 0x4300, 0xab, 0xb6, 0x3d, 0xd8, 0x10, 0xdd, 0x8b, 0x23)
+#define EFI_CERT_SHA256_GUID EFI_GUID(0xc1c41626, 0x504c, 0x4092, 0xac, 0xa9, 0x41, 0xf9, 0x36, 0x93, 0x43, 0x28)
+#define EFI_CERT_X509_GUID EFI_GUID(0xa5c059a1, 0x94e4, 0x4aa7, 0x87, 0xb5, 0xab, 0x15, 0x5c, 0x2b, 0xf0, 0x72)
+#define EFI_CERT_X509_SHA256_GUID EFI_GUID(0x3bd2a492, 0x96c0, 0x4079, 0xb4, 0x20, 0xfc, 0xf9, 0x8e, 0xf1, 0x03, 0xed)
+
/*
* This GUID is used to pass to the kernel proper the struct screen_info
* structure that was populated by the stub based on the GOP protocol instance
@@ -873,6 +877,27 @@ typedef struct {
efi_memory_desc_t entry[0];
} efi_memory_attributes_table_t;
+typedef struct {
+ efi_guid_t signature_owner;
+ u8 signature_data[];
+} efi_signature_data_t;
+
+typedef struct {
+ efi_guid_t signature_type;
+ u32 signature_list_size;
+ u32 signature_header_size;
+ u32 signature_size;
+ u8 signature_header[];
+ /* efi_signature_data_t signatures[][] */
+} efi_signature_list_t;
+
+typedef u8 efi_sha256_hash_t[32];
+
+typedef struct {
+ efi_sha256_hash_t to_be_signed_hash;
+ efi_time_t time_of_revocation;
+} efi_cert_x509_sha256_t;
+
/*
* All runtime access to EFI goes through this structure:
*/
--
2.9.3

View file

@ -0,0 +1,197 @@
From e4c62c12635a371e43bd17e8d33a936668264491 Mon Sep 17 00:00:00 2001
From: Dave Howells <dhowells@redhat.com>
Date: Fri, 5 May 2017 08:21:58 +0100
Subject: [PATCH 2/4] efi: Add an EFI signature blob parser
Add a function to parse an EFI signature blob looking for elements of
interest. A list is made up of a series of sublists, where all the
elements in a sublist are of the same type, but sublists can be of
different types.
For each sublist encountered, the function pointed to by the
get_handler_for_guid argument is called with the type specifier GUID and
returns either a pointer to a function to handle elements of that type or
NULL if the type is not of interest.
If the sublist is of interest, each element is passed to the handler
function in turn.
Signed-off-by: David Howells <dhowells@redhat.com>
---
certs/Kconfig | 8 ++++
certs/Makefile | 1 +
certs/efi_parser.c | 112 ++++++++++++++++++++++++++++++++++++++++++++++++++++
include/linux/efi.h | 9 +++++
4 files changed, 130 insertions(+)
create mode 100644 certs/efi_parser.c
diff --git a/certs/Kconfig b/certs/Kconfig
index 6ce51ed..630ae09 100644
--- a/certs/Kconfig
+++ b/certs/Kconfig
@@ -82,4 +82,12 @@ config SYSTEM_BLACKLIST_HASH_LIST
wrapper to incorporate the list into the kernel. Each <hash> should
be a string of hex digits.
+config EFI_SIGNATURE_LIST_PARSER
+ bool "EFI signature list parser"
+ depends on EFI
+ select X509_CERTIFICATE_PARSER
+ help
+ This option provides support for parsing EFI signature lists for
+ X.509 certificates and turning them into keys.
+
endmenu
diff --git a/certs/Makefile b/certs/Makefile
index 4119bb3..738151a 100644
--- a/certs/Makefile
+++ b/certs/Makefile
@@ -9,6 +9,7 @@ obj-$(CONFIG_SYSTEM_BLACKLIST_KEYRING) += blacklist_hashes.o
else
obj-$(CONFIG_SYSTEM_BLACKLIST_KEYRING) += blacklist_nohashes.o
endif
+obj-$(CONFIG_EFI_SIGNATURE_LIST_PARSER) += efi_parser.o
ifeq ($(CONFIG_SYSTEM_TRUSTED_KEYRING),y)
diff --git a/certs/efi_parser.c b/certs/efi_parser.c
new file mode 100644
index 0000000..4e396f9
--- /dev/null
+++ b/certs/efi_parser.c
@@ -0,0 +1,112 @@
+/* EFI signature/key/certificate list parser
+ *
+ * Copyright (C) 2012, 2016 Red Hat, Inc. All Rights Reserved.
+ * Written by David Howells (dhowells@redhat.com)
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public Licence
+ * as published by the Free Software Foundation; either version
+ * 2 of the Licence, or (at your option) any later version.
+ */
+
+#define pr_fmt(fmt) "EFI: "fmt
+#include <linux/module.h>
+#include <linux/printk.h>
+#include <linux/err.h>
+#include <linux/efi.h>
+
+/**
+ * parse_efi_signature_list - Parse an EFI signature list for certificates
+ * @source: The source of the key
+ * @data: The data blob to parse
+ * @size: The size of the data blob
+ * @get_handler_for_guid: Get the handler func for the sig type (or NULL)
+ *
+ * Parse an EFI signature list looking for elements of interest. A list is
+ * made up of a series of sublists, where all the elements in a sublist are of
+ * the same type, but sublists can be of different types.
+ *
+ * For each sublist encountered, the @get_handler_for_guid function is called
+ * with the type specifier GUID and returns either a pointer to a function to
+ * handle elements of that type or NULL if the type is not of interest.
+ *
+ * If the sublist is of interest, each element is passed to the handler
+ * function in turn.
+ *
+ * Error EBADMSG is returned if the list doesn't parse correctly and 0 is
+ * returned if the list was parsed correctly. No error can be returned from
+ * the @get_handler_for_guid function or the element handler function it
+ * returns.
+ */
+int __init parse_efi_signature_list(
+ const char *source,
+ const void *data, size_t size,
+ efi_element_handler_t (*get_handler_for_guid)(const efi_guid_t *))
+{
+ efi_element_handler_t handler;
+ unsigned offs = 0;
+
+ pr_devel("-->%s(,%zu)\n", __func__, size);
+
+ while (size > 0) {
+ const efi_signature_data_t *elem;
+ efi_signature_list_t list;
+ size_t lsize, esize, hsize, elsize;
+
+ if (size < sizeof(list))
+ return -EBADMSG;
+
+ memcpy(&list, data, sizeof(list));
+ pr_devel("LIST[%04x] guid=%pUl ls=%x hs=%x ss=%x\n",
+ offs,
+ list.signature_type.b, list.signature_list_size,
+ list.signature_header_size, list.signature_size);
+
+ lsize = list.signature_list_size;
+ hsize = list.signature_header_size;
+ esize = list.signature_size;
+ elsize = lsize - sizeof(list) - hsize;
+
+ if (lsize > size) {
+ pr_devel("<--%s() = -EBADMSG [overrun @%x]\n",
+ __func__, offs);
+ return -EBADMSG;
+ }
+
+ if (lsize < sizeof(list) ||
+ lsize - sizeof(list) < hsize ||
+ esize < sizeof(*elem) ||
+ elsize < esize ||
+ elsize % esize != 0) {
+ pr_devel("- bad size combo @%x\n", offs);
+ return -EBADMSG;
+ }
+
+ handler = get_handler_for_guid(&list.signature_type);
+ if (!handler) {
+ data += lsize;
+ size -= lsize;
+ offs += lsize;
+ continue;
+ }
+
+ data += sizeof(list) + hsize;
+ size -= sizeof(list) + hsize;
+ offs += sizeof(list) + hsize;
+
+ for (; elsize > 0; elsize -= esize) {
+ elem = data;
+
+ pr_devel("ELEM[%04x]\n", offs);
+ handler(source,
+ &elem->signature_data,
+ esize - sizeof(*elem));
+
+ data += esize;
+ size -= esize;
+ offs += esize;
+ }
+ }
+
+ return 0;
+}
diff --git a/include/linux/efi.h b/include/linux/efi.h
index 3259ad6..08024c6 100644
--- a/include/linux/efi.h
+++ b/include/linux/efi.h
@@ -1055,6 +1055,15 @@ extern int efi_memattr_apply_permissions(struct mm_struct *mm,
char * __init efi_md_typeattr_format(char *buf, size_t size,
const efi_memory_desc_t *md);
+
+typedef void (*efi_element_handler_t)(const char *source,
+ const void *element_data,
+ size_t element_size);
+extern int __init parse_efi_signature_list(
+ const char *source,
+ const void *data, size_t size,
+ efi_element_handler_t (*get_handler_for_guid)(const efi_guid_t *));
+
/**
* efi_range_is_wc - check the WC bit on an address range
* @start: starting kvirt address
--
2.9.3

View file

@ -0,0 +1,167 @@
From 20614b74e481f0c9f94032ae99f110d4647b65a6 Mon Sep 17 00:00:00 2001
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Date: Thu, 10 Jan 2019 07:28:33 +0100
Subject: [PATCH 1/2] Bluetooth: check message types in l2cap_get_conf_opt
l2cap_get_conf_opt can handle a "default" message type, but it needs to
be verified that it really is the correct type (CONF_EFS or CONF_RFC)
before passing it back to the caller. To do this we need to check the
return value of this call now and handle the error correctly up the
stack.
Based on a patch from Ran Menscher.
Reported-by: Ran Menscher <ran.menscher@karambasecurity.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Jeremy Cline <jcline@redhat.com>
---
net/bluetooth/l2cap_core.c | 25 +++++++++++++++++++------
1 file changed, 19 insertions(+), 6 deletions(-)
diff --git a/net/bluetooth/l2cap_core.c b/net/bluetooth/l2cap_core.c
index d17a4736e47c..a0ce6e8e5ef7 100644
--- a/net/bluetooth/l2cap_core.c
+++ b/net/bluetooth/l2cap_core.c
@@ -2979,6 +2979,10 @@ static inline int l2cap_get_conf_opt(void **ptr, int *type, int *olen,
break;
default:
+ /* Only CONF_EFS and CONF_RFC are allowed here */
+ if ((opt->type != L2CAP_CONF_EFS) &&
+ (opt->type != L2CAP_CONF_RFC))
+ return -EPROTO;
*val = (unsigned long) opt->val;
break;
}
@@ -3323,7 +3327,7 @@ static int l2cap_parse_conf_req(struct l2cap_chan *chan, void *data, size_t data
void *endptr = data + data_size;
void *req = chan->conf_req;
int len = chan->conf_len;
- int type, hint, olen;
+ int type, hint, olen, err;
unsigned long val;
struct l2cap_conf_rfc rfc = { .mode = L2CAP_MODE_BASIC };
struct l2cap_conf_efs efs;
@@ -3335,7 +3339,10 @@ static int l2cap_parse_conf_req(struct l2cap_chan *chan, void *data, size_t data
BT_DBG("chan %p", chan);
while (len >= L2CAP_CONF_OPT_SIZE) {
- len -= l2cap_get_conf_opt(&req, &type, &olen, &val);
+ err = l2cap_get_conf_opt(&req, &type, &olen, &val);
+ if (err < 0)
+ return err;
+ len -= err;
hint = type & L2CAP_CONF_HINT;
type &= L2CAP_CONF_MASK;
@@ -3538,7 +3545,7 @@ static int l2cap_parse_conf_rsp(struct l2cap_chan *chan, void *rsp, int len,
struct l2cap_conf_req *req = data;
void *ptr = req->data;
void *endptr = data + size;
- int type, olen;
+ int type, olen, err;
unsigned long val;
struct l2cap_conf_rfc rfc = { .mode = L2CAP_MODE_BASIC };
struct l2cap_conf_efs efs;
@@ -3546,7 +3553,10 @@ static int l2cap_parse_conf_rsp(struct l2cap_chan *chan, void *rsp, int len,
BT_DBG("chan %p, rsp %p, len %d, req %p", chan, rsp, len, data);
while (len >= L2CAP_CONF_OPT_SIZE) {
- len -= l2cap_get_conf_opt(&rsp, &type, &olen, &val);
+ err = l2cap_get_conf_opt(&rsp, &type, &olen, &val);
+ if (err < 0)
+ return err;
+ len -= err;
switch (type) {
case L2CAP_CONF_MTU:
@@ -3706,7 +3716,7 @@ void __l2cap_connect_rsp_defer(struct l2cap_chan *chan)
static void l2cap_conf_rfc_get(struct l2cap_chan *chan, void *rsp, int len)
{
- int type, olen;
+ int type, olen, err;
unsigned long val;
/* Use sane default values in case a misbehaving remote device
* did not send an RFC or extended window size option.
@@ -3726,7 +3736,10 @@ static void l2cap_conf_rfc_get(struct l2cap_chan *chan, void *rsp, int len)
return;
while (len >= L2CAP_CONF_OPT_SIZE) {
- len -= l2cap_get_conf_opt(&rsp, &type, &olen, &val);
+ err = l2cap_get_conf_opt(&rsp, &type, &olen, &val);
+ if (err < 0)
+ return;
+ len -= err;
switch (type) {
case L2CAP_CONF_RFC:
--
2.20.1
From 50cd5314f5ffa264906f4986f414750d648c4ece Mon Sep 17 00:00:00 2001
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Date: Thu, 10 Jan 2019 07:29:17 +0100
Subject: [PATCH 2/2] Bluetooth: check the buffer size for some messages before
parsing
The L2CAP_CONF_EFS and L2CAP_CONF_RFC messages can be sent from
userspace so their structure sizes need to be checked before parsing
them.
Based on a patch from Ran Menscher.
Reported-by: Ran Menscher <ran.menscher@karambasecurity.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Jeremy Cline <jcline@redhat.com>
---
net/bluetooth/l2cap_core.c | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)
diff --git a/net/bluetooth/l2cap_core.c b/net/bluetooth/l2cap_core.c
index a0ce6e8e5ef7..d8d3cbdc0d29 100644
--- a/net/bluetooth/l2cap_core.c
+++ b/net/bluetooth/l2cap_core.c
@@ -3360,7 +3360,8 @@ static int l2cap_parse_conf_req(struct l2cap_chan *chan, void *data, size_t data
break;
case L2CAP_CONF_RFC:
- if (olen == sizeof(rfc))
+ if ((olen == sizeof(rfc)) &&
+ (endptr - ptr >= L2CAP_CONF_OPT_SIZE + sizeof(rfc)))
memcpy(&rfc, (void *) val, olen);
break;
@@ -3370,7 +3371,8 @@ static int l2cap_parse_conf_req(struct l2cap_chan *chan, void *data, size_t data
break;
case L2CAP_CONF_EFS:
- if (olen == sizeof(efs)) {
+ if ((olen == sizeof(efs)) &&
+ (endptr - ptr >= L2CAP_CONF_OPT_SIZE + sizeof(efs))) {
remote_efs = 1;
memcpy(&efs, (void *) val, olen);
}
@@ -3575,7 +3577,8 @@ static int l2cap_parse_conf_rsp(struct l2cap_chan *chan, void *rsp, int len,
break;
case L2CAP_CONF_RFC:
- if (olen == sizeof(rfc))
+ if ((olen == sizeof(rfc)) &&
+ (endptr - ptr >= L2CAP_CONF_OPT_SIZE + sizeof(rfc)))
memcpy(&rfc, (void *)val, olen);
if (test_bit(CONF_STATE2_DEVICE, &chan->conf_state) &&
@@ -3595,7 +3598,8 @@ static int l2cap_parse_conf_rsp(struct l2cap_chan *chan, void *rsp, int len,
break;
case L2CAP_CONF_EFS:
- if (olen == sizeof(efs)) {
+ if ((olen == sizeof(efs)) &&
+ (endptr - ptr >= L2CAP_CONF_OPT_SIZE + sizeof(efs))) {
memcpy(&efs, (void *)val, olen);
if (chan->local_stype != L2CAP_SERV_NOTRAFIC &&
--
2.20.1

View file

@ -0,0 +1,24 @@
From ea6e7d9d0fe3e448aef19b3943d4897ae0bef128 Mon Sep 17 00:00:00 2001
From: Fedora Kernel Team <kernel-team@fedoraproject.org>
Date: Thu, 3 Aug 2017 13:46:51 -0500
Subject: [PATCH] Fix for module sig verification
---
kernel/module_signing.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/kernel/module_signing.c b/kernel/module_signing.c
index 937c844..d3d6f95 100644
--- a/kernel/module_signing.c
+++ b/kernel/module_signing.c
@@ -81,6 +81,6 @@ int mod_verify_sig(const void *mod, unsigned long *_modlen)
}
return verify_pkcs7_signature(mod, modlen, mod + modlen, sig_len,
- NULL, VERIFYING_MODULE_SIGNATURE,
+ (void *)1UL, VERIFYING_MODULE_SIGNATURE,
NULL, NULL);
}
--
2.13.3

View file

@ -0,0 +1,47 @@
From: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Date: Thu, 16 Apr 2015 13:01:46 -0400
Subject: [PATCH] Input - synaptics: pin 3 touches when the firmware reports 3
fingers
Synaptics PS/2 touchpad can send only 2 touches in a report. They can
detect 4 or 5 and this information is valuable.
In commit 63c4fda (Input: synaptics - allocate 3 slots to keep stability
in image sensors), we allocate 3 slots, but we still continue to report
the 2 available fingers. That means that the client sees 2 used slots while
there is a total of 3 fingers advertised by BTN_TOOL_TRIPLETAP.
For old kernels this is not a problem because max_slots was 2 and libinput/
xorg-synaptics knew how to deal with that. Now that max_slot is 3, the
clients ignore BTN_TOOL_TRIPLETAP and count the actual used slots (so 2).
It then gets confused when receiving the BTN_TOOL_TRIPLETAP and DOUBLETAP
information, and goes wild.
We can pin the 3 slots until we get a total number of fingers below 2.
Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1212230
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
---
drivers/input/mouse/synaptics.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/drivers/input/mouse/synaptics.c b/drivers/input/mouse/synaptics.c
index 3a32caf06bf1..58102970f94f 100644
--- a/drivers/input/mouse/synaptics.c
+++ b/drivers/input/mouse/synaptics.c
@@ -940,6 +940,14 @@ static void synaptics_report_mt_data(struct psmouse *psmouse,
input_report_abs(dev, ABS_MT_PRESSURE, hw[i]->z);
}
+ /* keep (slot count <= num_fingers) by pinning all slots */
+ if (num_fingers >= 3) {
+ for (i = 0; i < 3; i++) {
+ input_mt_slot(dev, i);
+ input_mt_report_slot_state(dev, MT_TOOL_FINGER, true);
+ }
+ }
+
input_mt_drop_unused(dev);
/* Don't use active slot count to generate BTN_TOOL events. */

View file

@ -0,0 +1,54 @@
From 70cecc97a4fc1667472224558a50dd7b6c42c789 Mon Sep 17 00:00:00 2001
From: Robert Holmes <robeholmes@gmail.com>
Date: Tue, 23 Apr 2019 07:39:29 +0000
Subject: [PATCH] KEYS: Make use of platform keyring for module signature
verify
This patch completes commit 278311e417be ("kexec, KEYS: Make use of
platform keyring for signature verify") which, while adding the
platform keyring for bzImage verification, neglected to also add
this keyring for module verification.
As such, kernel modules signed with keys from the MokList variable
were not successfully verified.
Signed-off-by: Robert Holmes <robeholmes@gmail.com>
---
kernel/module_signing.c | 16 ++++++++++++----
1 file changed, 12 insertions(+), 4 deletions(-)
diff --git a/kernel/module_signing.c b/kernel/module_signing.c
index 6b9a926fd86b..cf94220e9154 100644
--- a/kernel/module_signing.c
+++ b/kernel/module_signing.c
@@ -49,6 +49,7 @@ int mod_verify_sig(const void *mod, struct load_info *info)
{
struct module_signature ms;
size_t sig_len, modlen = info->len;
+ int ret;
pr_devel("==>%s(,%zu)\n", __func__, modlen);
@@ -82,8 +83,15 @@ int mod_verify_sig(const void *mod, struct load_info *info)
return -EBADMSG;
}
- return verify_pkcs7_signature(mod, modlen, mod + modlen, sig_len,
- VERIFY_USE_SECONDARY_KEYRING,
- VERIFYING_MODULE_SIGNATURE,
- NULL, NULL);
+ ret = verify_pkcs7_signature(mod, modlen, mod + modlen, sig_len,
+ VERIFY_USE_SECONDARY_KEYRING,
+ VERIFYING_MODULE_SIGNATURE,
+ NULL, NULL);
+ if (ret == -ENOKEY && IS_ENABLED(CONFIG_INTEGRITY_PLATFORM_KEYRING)) {
+ ret = verify_pkcs7_signature(mod, modlen, mod + modlen, sig_len,
+ VERIFY_USE_PLATFORM_KEYRING,
+ VERIFYING_MODULE_SIGNATURE,
+ NULL, NULL);
+ }
+ return ret;
}
--
2.21.0

View file

@ -0,0 +1,94 @@
From a446d2f94ce540689c7a46bf457d92409e9c4d7e Mon Sep 17 00:00:00 2001
From: Josh Stone <jistone@redhat.com>
Date: Fri, 21 Nov 2014 10:40:00 -0800
Subject: [PATCH] Kbuild: Add an option to enable GCC VTA
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Due to recent codegen issues, gcc -fvar-tracking-assignments was
unconditionally disabled in commit 2062afb4f804a ("Fix gcc-4.9.0
miscompilation of load_balance() in scheduler"). However, this reduces
the debuginfo coverage for variable locations, especially in inline
functions. VTA is certainly not perfect either in those cases, but it
is much better than without. With compiler versions that have fixed the
codegen bugs, we would prefer to have the better details for SystemTap,
and surely other debuginfo consumers like perf will benefit as well.
This patch simply makes CONFIG_DEBUG_INFO_VTA an option. I considered
Frank and Linus's discussion of a cc-option-like -fcompare-debug test,
but I'm convinced that a narrow test of an arch-specific codegen issue
is not really useful. GCC has their own regression tests for this, so
I'd suggest GCC_COMPARE_DEBUG=-fvar-tracking-assignments-toggle is more
useful for kernel developers to test confidence.
In fact, I ran into a couple more issues when testing for this patch[1],
although neither of those had any codegen impact.
[1] https://bugzilla.redhat.com/show_bug.cgi?id=1140872
With gcc-4.9.2-1.fc22, I can now build v3.18-rc5 with Fedora's i686 and
x86_64 configs, and this is completely clean with GCC_COMPARE_DEBUG.
Cc: Frank Ch. Eigler <fche@redhat.com>
Cc: Jakub Jelinek <jakub@redhat.com>
Cc: Josh Boyer <jwboyer@fedoraproject.org>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Markus Trippelsdorf <markus@trippelsdorf.de>
Cc: Michel Dänzer <michel@daenzer.net>
Signed-off-by: Josh Stone <jistone@redhat.com>
Signed-off-by: Jeremy Cline <jcline@redhat.com>
---
Makefile | 4 ++++
lib/Kconfig.debug | 18 +++++++++++++++++-
2 files changed, 21 insertions(+), 1 deletion(-)
diff --git a/Makefile b/Makefile
index 9ef547fc7ffe..5777d902f8f3 100644
--- a/Makefile
+++ b/Makefile
@@ -735,7 +735,11 @@ KBUILD_CFLAGS += -fomit-frame-pointer
KBUILD_CFLAGS += -ftrivial-auto-var-init=pattern
endif
+ifdef CONFIG_DEBUG_INFO_VTA
+DEBUG_CFLAGS += $(call cc-option, -fvar-tracking-assignments)
+else
DEBUG_CFLAGS := $(call cc-option, -fno-var-tracking-assignments)
+endif
ifdef CONFIG_DEBUG_INFO
ifdef CONFIG_DEBUG_INFO_SPLIT
diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug
index 0d9e81779e37..424206212931 100644
--- a/lib/Kconfig.debug
+++ b/lib/Kconfig.debug
@@ -217,7 +217,23 @@ config DEBUG_INFO_DWARF4
Generate dwarf4 debug info. This requires recent versions
of gcc and gdb. It makes the debug information larger.
But it significantly improves the success of resolving
- variables in gdb on optimized code.
+ variables in gdb on optimized code. The gcc docs also
+ recommend enabling -fvar-tracking-assignments for maximum
+ benefit. (see DEBUG_INFO_VTA)
+
+config DEBUG_INFO_VTA
+ bool "Enable var-tracking-assignments for debuginfo"
+ depends on DEBUG_INFO
+ help
+ Enable gcc -fvar-tracking-assignments for improved debug
+ information on variable locations in optimized code. Per
+ gcc, DEBUG_INFO_DWARF4 is recommended for best use of VTA.
+
+ VTA has been implicated in codegen bugs (gcc PR61801,
+ PR61904), so this may deserve some caution. One can set
+ GCC_COMPARE_DEBUG=-fvar-tracking-assignments-toggle in the
+ environment to automatically compile everything both ways,
+ generating an error if anything differs.
config DEBUG_INFO_BTF
bool "Generate BTF typeinfo"
--
2.20.1

View file

@ -0,0 +1,246 @@
From 90dc66270b02981b19a085c6a9184e3452b7b3e8 Mon Sep 17 00:00:00 2001
From: Josh Boyer <jwboyer@fedoraproject.org>
Date: Fri, 5 May 2017 08:21:59 +0100
Subject: [PATCH 3/4] MODSIGN: Import certificates from UEFI Secure Boot
Secure Boot stores a list of allowed certificates in the 'db' variable.
This imports those certificates into the system trusted keyring. This
allows for a third party signing certificate to be used in conjunction
with signed modules. By importing the public certificate into the 'db'
variable, a user can allow a module signed with that certificate to
load. The shim UEFI bootloader has a similar certificate list stored
in the 'MokListRT' variable. We import those as well.
Secure Boot also maintains a list of disallowed certificates in the 'dbx'
variable. We load those certificates into the newly introduced system
blacklist keyring and forbid any module signed with those from loading and
forbid the use within the kernel of any key with a matching hash.
This facility is enabled by setting CONFIG_LOAD_UEFI_KEYS.
Signed-off-by: Josh Boyer <jwboyer@fedoraproject.org>
Signed-off-by: David Howells <dhowells@redhat.com>
---
certs/Kconfig | 16 ++++++
certs/Makefile | 4 ++
certs/load_uefi.c | 168 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
3 files changed, 188 insertions(+)
create mode 100644 certs/load_uefi.c
diff --git a/certs/Kconfig b/certs/Kconfig
index 630ae09..edf9f75 100644
--- a/certs/Kconfig
+++ b/certs/Kconfig
@@ -90,4 +90,20 @@ config EFI_SIGNATURE_LIST_PARSER
This option provides support for parsing EFI signature lists for
X.509 certificates and turning them into keys.
+config LOAD_UEFI_KEYS
+ bool "Load certs and blacklist from UEFI db for module checking"
+ depends on SYSTEM_BLACKLIST_KEYRING
+ depends on SECONDARY_TRUSTED_KEYRING
+ depends on EFI
+ depends on EFI_SIGNATURE_LIST_PARSER
+ help
+ If the kernel is booted in secure boot mode, this option will cause
+ the kernel to load the certificates from the UEFI db and MokListRT
+ into the secondary trusted keyring. It will also load any X.509
+ SHA256 hashes in the dbx list into the blacklist.
+
+ The effect of this is that, if the kernel is booted in secure boot
+ mode, modules signed with UEFI-stored keys will be permitted to be
+ loaded and keys that match the blacklist will be rejected.
+
endmenu
diff --git a/certs/Makefile b/certs/Makefile
index 738151a..a5e057a 100644
--- a/certs/Makefile
+++ b/certs/Makefile
@@ -11,6 +11,10 @@ obj-$(CONFIG_SYSTEM_BLACKLIST_KEYRING) += blacklist_nohashes.o
endif
obj-$(CONFIG_EFI_SIGNATURE_LIST_PARSER) += efi_parser.o
+obj-$(CONFIG_LOAD_UEFI_KEYS) += load_uefi.o
+$(obj)/load_uefi.o: KBUILD_CFLAGS += -fshort-wchar
+
+
ifeq ($(CONFIG_SYSTEM_TRUSTED_KEYRING),y)
$(eval $(call config_filename,SYSTEM_TRUSTED_KEYS))
diff --git a/certs/load_uefi.c b/certs/load_uefi.c
new file mode 100644
index 0000000..b44e464
--- /dev/null
+++ b/certs/load_uefi.c
@@ -0,0 +1,168 @@
+#include <linux/kernel.h>
+#include <linux/sched.h>
+#include <linux/cred.h>
+#include <linux/err.h>
+#include <linux/efi.h>
+#include <linux/slab.h>
+#include <keys/asymmetric-type.h>
+#include <keys/system_keyring.h>
+#include "internal.h"
+
+static __initdata efi_guid_t efi_cert_x509_guid = EFI_CERT_X509_GUID;
+static __initdata efi_guid_t efi_cert_x509_sha256_guid = EFI_CERT_X509_SHA256_GUID;
+static __initdata efi_guid_t efi_cert_sha256_guid = EFI_CERT_SHA256_GUID;
+
+/*
+ * Get a certificate list blob from the named EFI variable.
+ */
+static __init void *get_cert_list(efi_char16_t *name, efi_guid_t *guid,
+ unsigned long *size)
+{
+ efi_status_t status;
+ unsigned long lsize = 4;
+ unsigned long tmpdb[4];
+ void *db;
+
+ status = efi.get_variable(name, guid, NULL, &lsize, &tmpdb);
+ if (status != EFI_BUFFER_TOO_SMALL) {
+ pr_err("Couldn't get size: 0x%lx\n", status);
+ return NULL;
+ }
+
+ db = kmalloc(lsize, GFP_KERNEL);
+ if (!db) {
+ pr_err("Couldn't allocate memory for uefi cert list\n");
+ return NULL;
+ }
+
+ status = efi.get_variable(name, guid, NULL, &lsize, db);
+ if (status != EFI_SUCCESS) {
+ kfree(db);
+ pr_err("Error reading db var: 0x%lx\n", status);
+ return NULL;
+ }
+
+ *size = lsize;
+ return db;
+}
+
+/*
+ * Blacklist an X509 TBS hash.
+ */
+static __init void uefi_blacklist_x509_tbs(const char *source,
+ const void *data, size_t len)
+{
+ char *hash, *p;
+
+ hash = kmalloc(4 + len * 2 + 1, GFP_KERNEL);
+ if (!hash)
+ return;
+ p = memcpy(hash, "tbs:", 4);
+ p += 4;
+ bin2hex(p, data, len);
+ p += len * 2;
+ *p = 0;
+
+ mark_hash_blacklisted(hash);
+ kfree(hash);
+}
+
+/*
+ * Blacklist the hash of an executable.
+ */
+static __init void uefi_blacklist_binary(const char *source,
+ const void *data, size_t len)
+{
+ char *hash, *p;
+
+ hash = kmalloc(4 + len * 2 + 1, GFP_KERNEL);
+ if (!hash)
+ return;
+ p = memcpy(hash, "bin:", 4);
+ p += 4;
+ bin2hex(p, data, len);
+ p += len * 2;
+ *p = 0;
+
+ mark_hash_blacklisted(hash);
+ kfree(hash);
+}
+
+/*
+ * Return the appropriate handler for particular signature list types found in
+ * the UEFI db and MokListRT tables.
+ */
+static __init efi_element_handler_t get_handler_for_db(const efi_guid_t *sig_type)
+{
+ if (efi_guidcmp(*sig_type, efi_cert_x509_guid) == 0)
+ return add_trusted_secondary_key;
+ return 0;
+}
+
+/*
+ * Return the appropriate handler for particular signature list types found in
+ * the UEFI dbx and MokListXRT tables.
+ */
+static __init efi_element_handler_t get_handler_for_dbx(const efi_guid_t *sig_type)
+{
+ if (efi_guidcmp(*sig_type, efi_cert_x509_sha256_guid) == 0)
+ return uefi_blacklist_x509_tbs;
+ if (efi_guidcmp(*sig_type, efi_cert_sha256_guid) == 0)
+ return uefi_blacklist_binary;
+ return 0;
+}
+
+/*
+ * Load the certs contained in the UEFI databases
+ */
+static int __init load_uefi_certs(void)
+{
+ efi_guid_t secure_var = EFI_IMAGE_SECURITY_DATABASE_GUID;
+ efi_guid_t mok_var = EFI_SHIM_LOCK_GUID;
+ void *db = NULL, *dbx = NULL, *mok = NULL;
+ unsigned long dbsize = 0, dbxsize = 0, moksize = 0;
+ int rc = 0;
+
+ if (!efi.get_variable)
+ return false;
+
+ /* Get db, MokListRT, and dbx. They might not exist, so it isn't
+ * an error if we can't get them.
+ */
+ db = get_cert_list(L"db", &secure_var, &dbsize);
+ if (!db) {
+ pr_err("MODSIGN: Couldn't get UEFI db list\n");
+ } else {
+ rc = parse_efi_signature_list("UEFI:db",
+ db, dbsize, get_handler_for_db);
+ if (rc)
+ pr_err("Couldn't parse db signatures: %d\n", rc);
+ kfree(db);
+ }
+
+ mok = get_cert_list(L"MokListRT", &mok_var, &moksize);
+ if (!mok) {
+ pr_info("MODSIGN: Couldn't get UEFI MokListRT\n");
+ } else {
+ rc = parse_efi_signature_list("UEFI:MokListRT",
+ mok, moksize, get_handler_for_db);
+ if (rc)
+ pr_err("Couldn't parse MokListRT signatures: %d\n", rc);
+ kfree(mok);
+ }
+
+ dbx = get_cert_list(L"dbx", &secure_var, &dbxsize);
+ if (!dbx) {
+ pr_info("MODSIGN: Couldn't get UEFI dbx list\n");
+ } else {
+ rc = parse_efi_signature_list("UEFI:dbx",
+ dbx, dbxsize,
+ get_handler_for_dbx);
+ if (rc)
+ pr_err("Couldn't parse dbx signatures: %d\n", rc);
+ kfree(dbx);
+ }
+
+ return rc;
+}
+late_initcall(load_uefi_certs);
--
2.9.3

View file

@ -0,0 +1,88 @@
From 9f1958a0cc911e1f79b2733ee5029dbd819ff328 Mon Sep 17 00:00:00 2001
From: Josh Boyer <jwboyer@fedoraproject.org>
Date: Fri, 5 May 2017 08:21:59 +0100
Subject: [PATCH 4/4] MODSIGN: Allow the "db" UEFI variable to be suppressed
If a user tells shim to not use the certs/hashes in the UEFI db variable
for verification purposes, shim will set a UEFI variable called
MokIgnoreDB. Have the uefi import code look for this and ignore the db
variable if it is found.
Signed-off-by: Josh Boyer <jwboyer@fedoraproject.org>
Signed-off-by: David Howells <dhowells@redhat.com>
---
certs/load_uefi.c | 44 ++++++++++++++++++++++++++++++++++----------
1 file changed, 34 insertions(+), 10 deletions(-)
diff --git a/certs/load_uefi.c b/certs/load_uefi.c
index b44e464..3d88459 100644
--- a/certs/load_uefi.c
+++ b/certs/load_uefi.c
@@ -13,6 +13,26 @@ static __initdata efi_guid_t efi_cert_x509_sha256_guid = EFI_CERT_X509_SHA256_GU
static __initdata efi_guid_t efi_cert_sha256_guid = EFI_CERT_SHA256_GUID;
/*
+ * Look to see if a UEFI variable called MokIgnoreDB exists and return true if
+ * it does.
+ *
+ * This UEFI variable is set by the shim if a user tells the shim to not use
+ * the certs/hashes in the UEFI db variable for verification purposes. If it
+ * is set, we should ignore the db variable also and the true return indicates
+ * this.
+ */
+static __init bool uefi_check_ignore_db(void)
+{
+ efi_status_t status;
+ unsigned int db = 0;
+ unsigned long size = sizeof(db);
+ efi_guid_t guid = EFI_SHIM_LOCK_GUID;
+
+ status = efi.get_variable(L"MokIgnoreDB", &guid, NULL, &size, &db);
+ return status == EFI_SUCCESS;
+}
+
+/*
* Get a certificate list blob from the named EFI variable.
*/
static __init void *get_cert_list(efi_char16_t *name, efi_guid_t *guid,
@@ -113,7 +133,9 @@ static __init efi_element_handler_t get_handler_for_dbx(const efi_guid_t *sig_ty
}
/*
- * Load the certs contained in the UEFI databases
+ * Load the certs contained in the UEFI databases into the secondary trusted
+ * keyring and the UEFI blacklisted X.509 cert SHA256 hashes into the blacklist
+ * keyring.
*/
static int __init load_uefi_certs(void)
{
@@ -129,15 +151,17 @@ static int __init load_uefi_certs(void)
/* Get db, MokListRT, and dbx. They might not exist, so it isn't
* an error if we can't get them.
*/
- db = get_cert_list(L"db", &secure_var, &dbsize);
- if (!db) {
- pr_err("MODSIGN: Couldn't get UEFI db list\n");
- } else {
- rc = parse_efi_signature_list("UEFI:db",
- db, dbsize, get_handler_for_db);
- if (rc)
- pr_err("Couldn't parse db signatures: %d\n", rc);
- kfree(db);
+ if (!uefi_check_ignore_db()) {
+ db = get_cert_list(L"db", &secure_var, &dbsize);
+ if (!db) {
+ pr_err("MODSIGN: Couldn't get UEFI db list\n");
+ } else {
+ rc = parse_efi_signature_list("UEFI:db",
+ db, dbsize, get_handler_for_db);
+ if (rc)
+ pr_err("Couldn't parse db signatures: %d\n", rc);
+ kfree(db);
+ }
}
mok = get_cert_list(L"MokListRT", &mok_var, &moksize);
--
2.9.3

50
Makefile Normal file
View file

@ -0,0 +1,50 @@
# Makefile for source rpm: kernel
SPECFILE := kernel.spec
# we only check the .sign signatures
UPSTREAM_CHECKS = sign
.PHONY: help
help:
%:
@echo "Try fedpkg $@ or something like that"
@exit 1
prep: config-files
fedpkg -v prep
noarch:
fedpkg -v local --arch=noarch
# 'make local' also needs to build the noarch firmware package
local:
fedpkg -v local
extremedebug:
@perl -pi -e 's/# CONFIG_DEBUG_PAGEALLOC is not set/CONFIG_DEBUG_PAGEALLOC=y/' config-nodebug
config-files:
@./build_configs.sh
debug:
@perl -pi -e 's/^%define debugbuildsenabled 1/%define debugbuildsenabled 0/' kernel.spec
@rpmdev-bumpspec -c "Reenable debugging options." kernel.spec
release:
@perl -pi -e 's/^%define debugbuildsenabled 0/%define debugbuildsenabled 1/' kernel.spec
@rpmdev-bumpspec -c "Disable debugging options." kernel.spec
nodebuginfo:
@perl -pi -e 's/^%define with_debuginfo %\{\?_without_debuginfo: 0\} %\{\?\!_without_debuginfo: 1\}/%define with_debuginfo %\{\?_without_debuginfo: 0\} %\{\?\!_without_debuginfo: 0\}/' kernel.spec
nodebug: release
@perl -pi -e 's/^%define debugbuildsenabled 1/%define debugbuildsenabled 0/' kernel.spec
ifeq ($(MAKECMDGOALS),me a sandwich)
.PHONY: me a sandwich
me a:
@:
sandwich:
@[ `id -u` -ne 0 ] && echo "What? Make it yourself." || echo Okay.
endif

View file

@ -1,60 +0,0 @@
RHEL_MAJOR = 10
RHEL_MINOR = 99
#
# RHEL_RELEASE
# -------------
#
# Represents build number in 'release' part of RPM's name-version-release.
# name is <package_name>, e.g. kernel
# version is upstream kernel version this kernel is based on, e.g. 4.18.0
# release is <RHEL_RELEASE>.<dist_tag>[<buildid>], e.g. 100.el8
#
# Use this spot to avoid future merge conflicts.
# Do not trim this comment.
RHEL_RELEASE = 38
#
# RHEL_REBASE_NUM
# ----------------
#
# Used in RPM version string for Gemini kernels, which dont use upstream
# VERSION/PATCHLEVEL/SUBLEVEL. The number represents rebase number for
# current MAJOR release.
#
# Use this spot to avoid future merge conflicts.
# Do not trim this comment.
RHEL_REBASE_NUM = 1
#
# ZSTREAM
# -------
#
# This variable controls whether we use zstream numbering or not for the
# package release. The zstream release keeps the build number of the last
# build done for ystream for the Beta milestone, and increments a second
# number for each build. The third number is used for branched builds
# (eg.: for builds with security fixes or hot fixes done outside of the
# batch release process).
#
# For example, with ZSTREAM unset or set to "no", all builds will contain
# a release with only the build number, eg.: kernel-<kernel version>-X.el*,
# where X is the build number. With ZSTREAM set to "yes", we will have
# builds with kernel-<kernel version>-X.Y.Z.el*, where X is the last
# RHEL_RELEASE number before ZSTREAM flag was set to yes, Y will now be the
# build number and Z will always be 1 except if you're doing a branched build
# (when you give RHDISTGIT_BRANCH on the command line, in which case the Z
# number will be incremented instead of the Y).
#
ZSTREAM ?= no
#
# Automotive
# ----------
#
# Represents the major and minor release used by automotive.
# Primarily this is used to to identify the build target when
# building the automotive kernel package.
AUTOMOTIVE_MAJOR = 2
AUTOMOTIVE_MINOR = 99

View file

View file

View file

View file

View file

View file

View file

View file

@ -0,0 +1,153 @@
From mboxrd@z Thu Jan 1 00:00:00 1970
Return-Path: <SRS0=e2dy=XH=vger.kernel.org=selinux-owner@kernel.org>
X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on
aws-us-west-2-korg-lkml-1.web.codeaurora.org
X-Spam-Level:
X-Spam-Status: No, score=-15.0 required=3.0
tests=HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,
MENTIONS_GIT_HOSTING,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT
autolearn=ham autolearn_force=no version=3.4.0
Received: from mail.kernel.org (mail.kernel.org [198.145.29.99])
by smtp.lore.kernel.org (Postfix) with ESMTP id 0CE63C4CEC5
for <selinux@archiver.kernel.org>; Thu, 12 Sep 2019 13:30:40 +0000 (UTC)
Received: from vger.kernel.org (vger.kernel.org [209.132.180.67])
by mail.kernel.org (Postfix) with ESMTP id DC0B020CC7
for <selinux@archiver.kernel.org>; Thu, 12 Sep 2019 13:30:39 +0000 (UTC)
Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand
id S1732192AbfILNaj (ORCPT <rfc822;selinux@archiver.kernel.org>);
Thu, 12 Sep 2019 09:30:39 -0400
Received: from mx1.redhat.com ([209.132.183.28]:52278 "EHLO mx1.redhat.com"
rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP
id S1731687AbfILNaj (ORCPT <rfc822;selinux@vger.kernel.org>);
Thu, 12 Sep 2019 09:30:39 -0400
Received: from mail-qt1-f197.google.com (mail-qt1-f197.google.com [209.85.160.197])
(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
(No client certificate requested)
by mx1.redhat.com (Postfix) with ESMTPS id 97CC359465
for <selinux@vger.kernel.org>; Thu, 12 Sep 2019 13:30:38 +0000 (UTC)
Received: by mail-qt1-f197.google.com with SMTP id c8so13609684qtd.20
for <selinux@vger.kernel.org>; Thu, 12 Sep 2019 06:30:38 -0700 (PDT)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20161025;
h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version
:content-transfer-encoding;
bh=S/MIBrjCy5DTvfqPzJTJqDQQH1pDu780wgGyHs56w4k=;
b=H7fZr4X/c4ge0SXeHHRXrq3U4J60PWfSRqdCphTWxKjyLvBs8nktbJczT562oH7Hxv
hdvVjKgAzNxIXFdQetnmveDXojtHFrE21PNdo5ONQIyh35oZyrJB4ewZdUrNfbrvDc2y
ElMr/HoKEX5pY+GMJE4nzeBotlfCWU9BoAxJPUhzKA9Oib+AqDzQ0hCGH6pQY9RXRXBV
IMH21FE5dxQGtLHNCJXVxE14edDeRo8qQFWQw6ooogK7JvduuJrWBn3BmCbKz1YLTNZE
9wRXvaHFVGNhr79JrRcItTp6Sx+tZ3XY46CV+Wi6Rq1fu8MePP9zFdIQXw9wqyd+UgLa
AIlw==
X-Gm-Message-State: APjAAAXpWx500L+bZRH8M7OzuSb0aBlsvvjaBYCGvSkzojpa2nRWjtk0
cjKEj45ivsUgPW2Bbi6CGEtspqM4wmwb72z+ajR4hy5OjMT3KRh6W71HFbVPrlLYQTvse11Ax2d
wGOma7U/qIGDDYkjh/Q==
X-Received: by 2002:ac8:7b2e:: with SMTP id l14mr8094193qtu.11.1568295037636;
Thu, 12 Sep 2019 06:30:37 -0700 (PDT)
X-Google-Smtp-Source: APXvYqzybFpoaFyGZXafGEdtHCL3XllpHltaXggcIZEb7De49V/kJzm1pU6vpg1gN8HtgnB3cilLuA==
X-Received: by 2002:ac8:7b2e:: with SMTP id l14mr8094176qtu.11.1568295037442;
Thu, 12 Sep 2019 06:30:37 -0700 (PDT)
Received: from localhost.localdomain ([12.133.141.2])
by smtp.gmail.com with ESMTPSA id h68sm11848865qkd.35.2019.09.12.06.30.35
(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
Thu, 12 Sep 2019 06:30:36 -0700 (PDT)
From: Jonathan Lebon <jlebon@redhat.com>
To: selinux@vger.kernel.org
Cc: Jonathan Lebon <jlebon@redhat.com>,
Victor Kamensky <kamensky@cisco.com>
Subject: [PATCH v2] selinux: allow labeling before policy is loaded
Date: Thu, 12 Sep 2019 09:30:07 -0400
Message-Id: <20190912133007.27545-1-jlebon@redhat.com>
X-Mailer: git-send-email 2.21.0
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
Sender: selinux-owner@vger.kernel.org
Precedence: bulk
List-ID: <selinux.vger.kernel.org>
X-Mailing-List: selinux@vger.kernel.org
Archived-At: <https://lore.kernel.org/selinux/20190912133007.27545-1-jlebon@redhat.com/>
List-Archive: <https://lore.kernel.org/selinux/>
List-Post: <mailto:selinux@vger.kernel.org>
Currently, the SELinux LSM prevents one from setting the
`security.selinux` xattr on an inode without a policy first being
loaded. However, this restriction is problematic: it makes it impossible
to have newly created files with the correct label before actually
loading the policy.
This is relevant in distributions like Fedora, where the policy is
loaded by systemd shortly after pivoting out of the initrd. In such
instances, all files created prior to pivoting will be unlabeled. One
then has to relabel them after pivoting, an operation which inherently
races with other processes trying to access those same files.
Going further, there are use cases for creating the entire root
filesystem on first boot from the initrd (e.g. Container Linux supports
this today[1], and we'd like to support it in Fedora CoreOS as well[2]).
One can imagine doing this in two ways: at the block device level (e.g.
laying down a disk image), or at the filesystem level. In the former,
labeling can simply be part of the image. But even in the latter
scenario, one still really wants to be able to set the right labels when
populating the new filesystem.
This patch enables this by changing behaviour in the following two ways:
1. allow `setxattr` if we're not initialized
2. don't try to set the in-core inode SID if we're not initialized;
instead leave it as `LABEL_INVALID` so that revalidation may be
attempted at a later time
Note the first hunk of this patch is mostly the same as a previously
discussed one[3], though it was part of a larger series which wasn't
accepted.
Co-developed-by: Victor Kamensky <kamensky@cisco.com>
Signed-off-by: Victor Kamensky <kamensky@cisco.com>
Signed-off-by: Jonathan Lebon <jlebon@redhat.com>
[1] https://coreos.com/os/docs/latest/root-filesystem-placement.html
[2] https://github.com/coreos/fedora-coreos-tracker/issues/94
[3] https://www.spinics.net/lists/linux-initramfs/msg04593.html
---
v2:
- return early in selinux_inode_setxattr if policy hasn't been loaded
---
security/selinux/hooks.c | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/security/selinux/hooks.c b/security/selinux/hooks.c
index 94de51628..dbe96c707 100644
--- a/security/selinux/hooks.c
+++ b/security/selinux/hooks.c
@@ -3142,6 +3142,9 @@ static int selinux_inode_setxattr(struct dentry *dentry, const char *name,
return dentry_has_perm(current_cred(), dentry, FILE__SETATTR);
}
+ if (!selinux_state.initialized)
+ return (inode_owner_or_capable(inode) ? 0 : -EPERM);
+
sbsec = inode->i_sb->s_security;
if (!(sbsec->flags & SBLABEL_MNT))
return -EOPNOTSUPP;
@@ -3225,6 +3228,15 @@ static void selinux_inode_post_setxattr(struct dentry *dentry, const char *name,
return;
}
+ if (!selinux_state.initialized) {
+ /* If we haven't even been initialized, then we can't validate
+ * against a policy, so leave the label as invalid. It may
+ * resolve to a valid label on the next revalidation try if
+ * we've since initialized.
+ */
+ return;
+ }
+
rc = security_context_to_sid_force(&selinux_state, value, size,
&newsid);
if (rc) {
--
2.21.0

76
PatchList.txt Normal file
View file

@ -0,0 +1,76 @@
# This file contains patches that we intend to carry for longer than
# "Should show up in a stable release soonish"
# Some of these may eventually drop out
kbuild-AFTER_LINK.patch
arm64-avoid-needing-console-to-enable-serial-console.patch
geekbox-v4-device-tree-support.patch
Initial-AllWinner-A64-and-PINE64-support.patch
arm64-pcie-quirks-xgene.patch
usb-phy-tegra-Add-38.4MHz-clock-table-entry.patch
ARM-tegra-usb-no-reset.patch
bcm283x-upstream-fixes.patch
lib-cpumask-Make-CPUMASK_OFFSTACK-usable-without-deb.patch
input-kill-stupid-messages.patch
die-floppy-die.patch
no-pcspkr-modalias.patch
silence-fbcon-logo.patch
Kbuild-Add-an-option-to-enable-GCC-VTA.patch
crash-driver.patch
#Secure boot patches
Add-secure_modules-call.patch
PCI-Lock-down-BAR-access-when-module-security-is-ena.patch
x86-Lock-down-IO-port-access-when-module-security-is.patch
ACPI-Limit-access-to-custom_method.patch
asus-wmi-Restrict-debugfs-interface-when-module-load.patch
Restrict-dev-mem-and-dev-kmem-when-module-loading-is.patch
acpi-Ignore-acpi_rsdp-kernel-parameter-when-module-l.patch
kexec-Disable-at-runtime-if-the-kernel-enforces-modu.patch
x86-Restrict-MSR-access-when-module-loading-is-restr.patch
Add-option-to-automatically-enforce-module-signature.patch
efi-Disable-secure-boot-if-shim-is-in-insecure-mode.patch
efi-Add-EFI_SECURE_BOOT-bit.patch
hibernate-Disable-in-a-signed-modules-environment.patch
Add-EFI-signature-data-types.patch
Add-an-EFI-signature-blob-parser-and-key-loader.patch
KEYS-Add-a-system-blacklist-keyring.patch
MODSIGN-Import-certificates-from-UEFI-Secure-Boot.patch
MODSIGN-Support-not-importing-certs-from-db.patch
Add-sysrq-option-to-disable-secure-boot-mode.patch
kexec-uefi-copy-secure_boot-flag-in-boot-params.patch
drm-i915-hush-check-crtc-state.patch
disable-i8042-check-on-apple-mac.patch
lis3-improve-handling-of-null-rate.patch
scsi-sd_revalidate_disk-prevent-NULL-ptr-deref.patch
criu-no-expert.patch
ath9k-rx-dma-stop-check.patch
xen-pciback-Don-t-disable-PCI_COMMAND-on-PCI-device-.patch
Input-synaptics-pin-3-touches-when-the-firmware-repo.patch
firmware-Drop-WARN-from-usermodehelper_read_trylock-.patch
drm-i915-turn-off-wc-mmaps.patch

View file

@ -1,474 +0,0 @@
https://gitlab.com/cki-project/kernel-ark/-/commit/831ff9bcd8e9eab864062470a3250beb1e1ec924
831ff9bcd8e9eab864062470a3250beb1e1ec924 rust: Add -fdiagnostics-show-context to bindgen_skip_c_flags
https://gitlab.com/cki-project/kernel-ark/-/commit/fe3e9e24af806d756edbda922103b1fa95d9b89b
fe3e9e24af806d756edbda922103b1fa95d9b89b Revert "Removing Obsolete hba pci-ids from rhel8"
https://gitlab.com/cki-project/kernel-ark/-/commit/c4a0a995da9df8732f688d09db5252173277589d
c4a0a995da9df8732f688d09db5252173277589d rh_messages.h: add missing lpfc devices
https://gitlab.com/cki-project/kernel-ark/-/commit/0ad9a88c3263fa8fa39437f69472588917255c99
0ad9a88c3263fa8fa39437f69472588917255c99 kernel: extend rh_waived to cope better with the CVE mitigations case
https://gitlab.com/cki-project/kernel-ark/-/commit/cf18c49636f2583c85831f909699034026325242
cf18c49636f2583c85831f909699034026325242 rh_messages.h: add missing aacraid device
https://gitlab.com/cki-project/kernel-ark/-/commit/26ca931184edb2c3c7f7c1951f53fa3333d9c90e
26ca931184edb2c3c7f7c1951f53fa3333d9c90e rh_messages.h: update unmaintained drivers
https://gitlab.com/cki-project/kernel-ark/-/commit/c1c1a1b7059900f4b9b657f5189285a287160e11
c1c1a1b7059900f4b9b657f5189285a287160e11 arm64: add early lockdown for secure boot
https://gitlab.com/cki-project/kernel-ark/-/commit/a613ae52a8d9378e6fa70f697b3ce0acee220491
a613ae52a8d9378e6fa70f697b3ce0acee220491 efi: pass secure boot mode to kernel proper
https://gitlab.com/cki-project/kernel-ark/-/commit/f869258b6b654d316e84325e46e431da4dfd04e7
f869258b6b654d316e84325e46e431da4dfd04e7 selftests/bpf: Remove ksyms_weak_lskel test
https://gitlab.com/cki-project/kernel-ark/-/commit/8b69219fe6a11766cf1a2e07dc94e56448b47824
8b69219fe6a11766cf1a2e07dc94e56448b47824 Simplify include Makefile.rhelver
https://gitlab.com/cki-project/kernel-ark/-/commit/c2621ac616e25a9a04fbcb8af0c1f8b2bdd8c099
c2621ac616e25a9a04fbcb8af0c1f8b2bdd8c099 redhat: make ENABLE_WERROR also enable OBJTOOL_WERROR
https://gitlab.com/cki-project/kernel-ark/-/commit/d28cbdeb89fe565e10fb4be8d8378153e86611f6
d28cbdeb89fe565e10fb4be8d8378153e86611f6 main.c: fix initcall blacklisted
https://gitlab.com/cki-project/kernel-ark/-/commit/b71ab57c8db44881edc32a124ddc2ebe536b6a4c
b71ab57c8db44881edc32a124ddc2ebe536b6a4c arch/x86/kernel/setup.c: fix rh_check_supported
https://gitlab.com/cki-project/kernel-ark/-/commit/c4ea2384863e54e0c5582b3508518e659581ce69
c4ea2384863e54e0c5582b3508518e659581ce69 efi,lockdown: fix kernel lockdown on Secure Boot
https://gitlab.com/cki-project/kernel-ark/-/commit/60b2ddeb0986e1c43a98b44a4ab414a7e2744701
60b2ddeb0986e1c43a98b44a4ab414a7e2744701 Revert "nvme: Return BLK_STS_TARGET if the DNR bit is set"
https://gitlab.com/cki-project/kernel-ark/-/commit/860632dd288c7aa7807959a79af9159482510cd1
860632dd288c7aa7807959a79af9159482510cd1 Revert "nvme: allow local retry and proper failover for REQ_FAILFAST_TRANSPORT"
https://gitlab.com/cki-project/kernel-ark/-/commit/aaef2c3ee081c8980bb60fd4b7a6ed9e187d9048
aaef2c3ee081c8980bb60fd4b7a6ed9e187d9048 Revert "nvme: decouple basic ANA log page re-read support from native multipathing"
https://gitlab.com/cki-project/kernel-ark/-/commit/5cd4353dae0ee79d13f57b7ccee85cd0bcbe4b4f
5cd4353dae0ee79d13f57b7ccee85cd0bcbe4b4f Revert "nvme: nvme_mpath_init remove multipath check"
https://gitlab.com/cki-project/kernel-ark/-/commit/656a0565ffe54f99ac1390a68c5ee7050ab6fb25
656a0565ffe54f99ac1390a68c5ee7050ab6fb25 redhat: automotive: define CONFIG_RH_AUTOMOTIVE
https://gitlab.com/cki-project/kernel-ark/-/commit/f1025d6236c72b4fbd03940b6fa2178f2a84f418
f1025d6236c72b4fbd03940b6fa2178f2a84f418 redhat: fix modules.order target
https://gitlab.com/cki-project/kernel-ark/-/commit/6e0fa997052c92d6085a50083e75dedc0160443f
6e0fa997052c92d6085a50083e75dedc0160443f [redhat] rh_messages.h: driver and device updates
https://gitlab.com/cki-project/kernel-ark/-/commit/d8822fd0573e9f254f097c1743078e4e74ac70f5
d8822fd0573e9f254f097c1743078e4e74ac70f5 crypto: rng - Fix extrng EFAULT handling
https://gitlab.com/cki-project/kernel-ark/-/commit/c224e4b6a61af08574bb0565755ed609bf08cacb
c224e4b6a61af08574bb0565755ed609bf08cacb crypto: sig - Disable signing
https://gitlab.com/cki-project/kernel-ark/-/commit/39417e970be7f6bc63f34d5ed5511f7e629802c2
39417e970be7f6bc63f34d5ed5511f7e629802c2 crypto: rng - Ensure stdrng is tested before user-space starts
https://gitlab.com/cki-project/kernel-ark/-/commit/52be246b6342ed5b1486729fd5c5893b10549a92
52be246b6342ed5b1486729fd5c5893b10549a92 [redhat] rh_messages.h: Mark BlueField-4 as disabled
https://gitlab.com/cki-project/kernel-ark/-/commit/2c9e64af9fa1f8599ce05877441afcac8ac91b04
2c9e64af9fa1f8599ce05877441afcac8ac91b04 Update the RHEL_DIFFERENCES help string
https://gitlab.com/cki-project/kernel-ark/-/commit/beef34cb1efc34b7fbee35535c66915995d12ed1
beef34cb1efc34b7fbee35535c66915995d12ed1 redhat: include resolve_btfids in kernel-devel
https://gitlab.com/cki-project/kernel-ark/-/commit/1a1426b7a8df854c78385dd8ce8b74e9ee641477
1a1426b7a8df854c78385dd8ce8b74e9ee641477 redhat: workaround CKI cross compilation for scripts
https://gitlab.com/cki-project/kernel-ark/-/commit/2c83d6cfffe1f891bf024df81be6cd41c2073ad9
2c83d6cfffe1f891bf024df81be6cd41c2073ad9 crypto: akcipher - Disable signing and decryption
https://gitlab.com/cki-project/kernel-ark/-/commit/af93553b8d335ccf5dd4f90ab9419e497aa36a80
af93553b8d335ccf5dd4f90ab9419e497aa36a80 crypto: dh - implement FIPS PCT
https://gitlab.com/cki-project/kernel-ark/-/commit/f0540d9d32978dff227cbb930193e8dc2557b23b
f0540d9d32978dff227cbb930193e8dc2557b23b crypto: ecdh - disallow plain "ecdh" usage in FIPS mode
https://gitlab.com/cki-project/kernel-ark/-/commit/243ef89ad354eea332d7bfb23fd4cf259240de91
243ef89ad354eea332d7bfb23fd4cf259240de91 crypto: seqiv - flag instantiations as FIPS compliant
https://gitlab.com/cki-project/kernel-ark/-/commit/6a23cbc588e9b9f7b2bc7250c6c6903d4d904eb1
6a23cbc588e9b9f7b2bc7250c6c6903d4d904eb1 [kernel] bpf: set default value for bpf_jit_harden
https://gitlab.com/cki-project/kernel-ark/-/commit/bb84b630a172d0204c8d243c57a6a1d2eae7843c
bb84b630a172d0204c8d243c57a6a1d2eae7843c not upstream: Disable vdso getrandom when FIPS is enabled
https://gitlab.com/cki-project/kernel-ark/-/commit/b643998c61552fb5615268e7e529999d64d54175
b643998c61552fb5615268e7e529999d64d54175 Add support to rh_waived cmdline boot parameter
https://gitlab.com/cki-project/kernel-ark/-/commit/a1e04b6f3580382a902256c7bf8b395b9a1be47f
a1e04b6f3580382a902256c7bf8b395b9a1be47f rh_flags: fix failed when register_sysctl_sz rh_flags_table to kernel
https://gitlab.com/cki-project/kernel-ark/-/commit/03cf1862c6221ee2a6de9a5ab25adaec6460b62e
03cf1862c6221ee2a6de9a5ab25adaec6460b62e [redhat] rh_flags: constify the ctl_table argument of proc_handler
https://gitlab.com/cki-project/kernel-ark/-/commit/e2708e55f9151652da80e388b4bf88c649288c0f
e2708e55f9151652da80e388b4bf88c649288c0f redhat: rh_flags: declare proper static methods when !CONFIG_RHEL_DIFFERENCES
https://gitlab.com/cki-project/kernel-ark/-/commit/6f593811cc1e5664f45fe2d09916eada1187e992
6f593811cc1e5664f45fe2d09916eada1187e992 redhat: make bnx2xx drivers unmaintained in rhel-10
https://gitlab.com/cki-project/kernel-ark/-/commit/5db8220bd67c719a20c1269233585b40f48837da
5db8220bd67c719a20c1269233585b40f48837da rh_flags: Rename rh_features to rh_flags
https://gitlab.com/cki-project/kernel-ark/-/commit/19ca502a0087eed65a014c6271f9bfc207d8d7eb
19ca502a0087eed65a014c6271f9bfc207d8d7eb kernel: rh_features: fix reading empty feature list from /proc
https://gitlab.com/cki-project/kernel-ark/-/commit/ba24639032f00b47748a6f39a4eb33950df015c2
ba24639032f00b47748a6f39a4eb33950df015c2 rh_features: move rh_features entry to sys/kernel
https://gitlab.com/cki-project/kernel-ark/-/commit/883e43fe6a0da0d9ad90e7c997a95f11bab9b888
883e43fe6a0da0d9ad90e7c997a95f11bab9b888 rh_features: convert to atomic allocation
https://gitlab.com/cki-project/kernel-ark/-/commit/c8daa2e832df14ee9174435a357b2ae0994a3ef3
c8daa2e832df14ee9174435a357b2ae0994a3ef3 add rh_features to /proc
https://gitlab.com/cki-project/kernel-ark/-/commit/4f33dbbe3ec578d49e12c07421b913bf480fccef
4f33dbbe3ec578d49e12c07421b913bf480fccef add support for rh_features
https://gitlab.com/cki-project/kernel-ark/-/commit/53a5900b05260b81f13eb3b9d6a9419429f310ab
53a5900b05260b81f13eb3b9d6a9419429f310ab [redhat] PCI: Fix pci_rh_check_status() call semantics
https://gitlab.com/cki-project/kernel-ark/-/commit/aeb9a237a0ec39b7bde89d8bb040cd5b267f6802
aeb9a237a0ec39b7bde89d8bb040cd5b267f6802 scsi: sd: condition probe_type under RHEL_DIFFERENCES
https://gitlab.com/cki-project/kernel-ark/-/commit/159e72af8b1631b720f4a7e0012fa624764cecde
159e72af8b1631b720f4a7e0012fa624764cecde scsi: sd: remove unused sd_probe_types
https://gitlab.com/cki-project/kernel-ark/-/commit/d8c04860eb7bf29617ca1754f1076fd9f5992e77
d8c04860eb7bf29617ca1754f1076fd9f5992e77 [redhat] rh_messages.h: mark mlx5 on Bluefield-3 as unmaintained
https://gitlab.com/cki-project/kernel-ark/-/commit/496c64b4afece4ab525467a6be71ffe60d0c564f
496c64b4afece4ab525467a6be71ffe60d0c564f [redhat] rh_messages.h: initial driver and device lists
https://gitlab.com/cki-project/kernel-ark/-/commit/5cf456aaba6f5c9406421c04c65d43b2c71f5927
5cf456aaba6f5c9406421c04c65d43b2c71f5927 arch/x86: Fix XSAVE check for x86_64-v2 check
https://gitlab.com/cki-project/kernel-ark/-/commit/252bf9586fca6e57a51966c0294a9a0cb33ff4f5
252bf9586fca6e57a51966c0294a9a0cb33ff4f5 arch/x86/kernel/setup.c: fixup rh_check_supported
https://gitlab.com/cki-project/kernel-ark/-/commit/30faf17591afbd4230d590355351044294ad43d2
30faf17591afbd4230d590355351044294ad43d2 lsm: update security_lock_kernel_down
https://gitlab.com/cki-project/kernel-ark/-/commit/e88ee9e2e869e7259faa5bf3ff6689becabb53cb
e88ee9e2e869e7259faa5bf3ff6689becabb53cb arch/x86: mark x86_64-v1 and x86_64-v2 processors as deprecated
https://gitlab.com/cki-project/kernel-ark/-/commit/26ebc304df38a49ce7cc69b4bdf220298cff2460
26ebc304df38a49ce7cc69b4bdf220298cff2460 redhat: kABI: add missing RH_KABI_SIZE_ALIGN_CHECKS Kconfig option
https://gitlab.com/cki-project/kernel-ark/-/commit/8c71392703448be8e8217592dd46ea1cc8b157e1
8c71392703448be8e8217592dd46ea1cc8b157e1 redhat: rh_kabi: introduce RH_KABI_EXCLUDE_WITH_SIZE
https://gitlab.com/cki-project/kernel-ark/-/commit/d42afcb843fcc87e59ba39b5574c18d89fd07a91
d42afcb843fcc87e59ba39b5574c18d89fd07a91 redhat: rh_kabi: move semicolon inside __RH_KABI_CHECK_SIZE
https://gitlab.com/cki-project/kernel-ark/-/commit/95a56955f9ba6ef1e1dd2d99d8f98254da274267
95a56955f9ba6ef1e1dd2d99d8f98254da274267 random: replace import_single_range() with import_ubuf()
https://gitlab.com/cki-project/kernel-ark/-/commit/92d6612578b79fd3a09e10504ed71209ba43c271
92d6612578b79fd3a09e10504ed71209ba43c271 ext4: Mark mounting fs-verity filesystems as tech-preview
https://gitlab.com/cki-project/kernel-ark/-/commit/5c51745b8aec113ff0605ab833c3e472d99c55c8
5c51745b8aec113ff0605ab833c3e472d99c55c8 erofs: Add tech preview markers at mount
https://gitlab.com/cki-project/kernel-ark/-/commit/6d687c70a7eda10eac0ddc6eedeaccc30eef5349
6d687c70a7eda10eac0ddc6eedeaccc30eef5349 kernel/rh_messages.c: Mark functions as possibly unused
https://gitlab.com/cki-project/kernel-ark/-/commit/dfb09b1d833cad815ea2f5cb69505010de260c40
dfb09b1d833cad815ea2f5cb69505010de260c40 crypto: rng - Override drivers/char/random in FIPS mode
https://gitlab.com/cki-project/kernel-ark/-/commit/ddbe3667f2462817f3f936141fff08604dde1564
ddbe3667f2462817f3f936141fff08604dde1564 random: Add hook to override device reads and getrandom(2)
https://gitlab.com/cki-project/kernel-ark/-/commit/92525a9129d85fa6400c9e653379862a67cb43b2
92525a9129d85fa6400c9e653379862a67cb43b2 [redhat] kernel/rh_messages.c: move hardware tables to rh_messages.h
https://gitlab.com/cki-project/kernel-ark/-/commit/eacd81fdaf31d456a82c553735faf64c8efad2eb
eacd81fdaf31d456a82c553735faf64c8efad2eb [redhat] kernel/rh_messages.c: Wire up new calls
https://gitlab.com/cki-project/kernel-ark/-/commit/32af8640a651c642ee5706dda0cf35ff508bcdcb
32af8640a651c642ee5706dda0cf35ff508bcdcb [redhat] drivers/pci: Update rh_messages.c
https://gitlab.com/cki-project/kernel-ark/-/commit/db366977f9e13f903cc9b7f22936b581594a7731
db366977f9e13f903cc9b7f22936b581594a7731 [redhat] drivers/pci: Remove RHEL-only pci_hw_*() functions
https://gitlab.com/cki-project/kernel-ark/-/commit/402504ff66e5d118b514253df5d55f8413e2e167
402504ff66e5d118b514253df5d55f8413e2e167 scsi: sd: Add "probe_type" module parameter to allow synchronous probing
https://gitlab.com/cki-project/kernel-ark/-/commit/5e96a345c6fb24e282ce1769223c1a339d0dbe94
5e96a345c6fb24e282ce1769223c1a339d0dbe94 Revert "Remove EXPERT from ARCH_FORCE_MAX_ORDER for aarch64"
https://gitlab.com/cki-project/kernel-ark/-/commit/ce943989ae8cb2b8e0b4699c148584d3cd18ec9b
ce943989ae8cb2b8e0b4699c148584d3cd18ec9b kernel/rh_messages.c: Another gcc12 warning on redundant NULL test
https://gitlab.com/cki-project/kernel-ark/-/commit/c0624b3913d8c3f262e20910a2f2c4d2f99ce61f
c0624b3913d8c3f262e20910a2f2c4d2f99ce61f Enable IO_URING for RHEL
https://gitlab.com/cki-project/kernel-ark/-/commit/861f2d38d82cfb374799ec517f18cc021701068e
861f2d38d82cfb374799ec517f18cc021701068e Remove EXPERT from ARCH_FORCE_MAX_ORDER for aarch64
https://gitlab.com/cki-project/kernel-ark/-/commit/e02ec93117d6eea21e80baf69e6f9848cf1a9774
e02ec93117d6eea21e80baf69e6f9848cf1a9774 redhat: version two of Makefile.rhelver tweaks
https://gitlab.com/cki-project/kernel-ark/-/commit/964e830b4fae678dec5b8b93dcd402c73fdf2912
964e830b4fae678dec5b8b93dcd402c73fdf2912 redhat: adapt to upstream Makefile change
https://gitlab.com/cki-project/kernel-ark/-/commit/60a4025a3b1cdec1c7bbdabf1e30278f615bb493
60a4025a3b1cdec1c7bbdabf1e30278f615bb493 kernel/rh_messages.c: gcc12 warning on redundant NULL test
https://gitlab.com/cki-project/kernel-ark/-/commit/a5c9e3c6e3dcda60b5f753d1bae86a686f3ac087
a5c9e3c6e3dcda60b5f753d1bae86a686f3ac087 Change acpi_bus_get_acpi_device to acpi_get_acpi_dev
https://gitlab.com/cki-project/kernel-ark/-/commit/092e751fe418623c5ad04e77fa6c993d48d96533
092e751fe418623c5ad04e77fa6c993d48d96533 ARK: Remove code marking devices unmaintained
https://gitlab.com/cki-project/kernel-ark/-/commit/c27fa327fb3de69773568d211fd2f8f13a72e342
c27fa327fb3de69773568d211fd2f8f13a72e342 rh_message: Fix function name
https://gitlab.com/cki-project/kernel-ark/-/commit/c9b07fd3a141ad0283d7eaadf5a06aec9af2b8c9
c9b07fd3a141ad0283d7eaadf5a06aec9af2b8c9 Add Partner Supported taint flag to kAFS
https://gitlab.com/cki-project/kernel-ark/-/commit/6b0e3a47ec436527a736c0e7159b41624d176dd9
6b0e3a47ec436527a736c0e7159b41624d176dd9 Add Partner Supported taint flag
https://gitlab.com/cki-project/kernel-ark/-/commit/3a4e2ad92c430d2f584f56ca686bc75a469d06c0
3a4e2ad92c430d2f584f56ca686bc75a469d06c0 kabi: Add kABI macros for enum type
https://gitlab.com/cki-project/kernel-ark/-/commit/04fbd46f834f3a012ca9d5bef91db377a3dbaed0
04fbd46f834f3a012ca9d5bef91db377a3dbaed0 kabi: expand and clarify documentation of aux structs
https://gitlab.com/cki-project/kernel-ark/-/commit/cf8df8ef88e094ebb049a7e1e6fec069aaf54faa
cf8df8ef88e094ebb049a7e1e6fec069aaf54faa kabi: introduce RH_KABI_USE_AUX_PTR
https://gitlab.com/cki-project/kernel-ark/-/commit/31779ca0c6c9aab28184a42ac3f17ac219b37b2b
31779ca0c6c9aab28184a42ac3f17ac219b37b2b kabi: rename RH_KABI_SIZE_AND_EXTEND to AUX
https://gitlab.com/cki-project/kernel-ark/-/commit/2e12a05d339ed936b9cd59f420b161d70b4a130a
2e12a05d339ed936b9cd59f420b161d70b4a130a kabi: more consistent _RH_KABI_SIZE_AND_EXTEND
https://gitlab.com/cki-project/kernel-ark/-/commit/b83556eebdc2efdc2d2c22610b7cd7c5cafb2bae
b83556eebdc2efdc2d2c22610b7cd7c5cafb2bae kabi: use fixed field name for extended part
https://gitlab.com/cki-project/kernel-ark/-/commit/4c9a3b306a34ed7017e35b0de26b2d98e1a04373
4c9a3b306a34ed7017e35b0de26b2d98e1a04373 kabi: fix dereference in RH_KABI_CHECK_EXT
https://gitlab.com/cki-project/kernel-ark/-/commit/a961660df0a73bcf2dcd8cb8855c2f5d5ded0ae9
a961660df0a73bcf2dcd8cb8855c2f5d5ded0ae9 kabi: fix RH_KABI_SET_SIZE macro
https://gitlab.com/cki-project/kernel-ark/-/commit/9f9ef5e8b4694fa7fb6a8f941fb741121fe5aab3
9f9ef5e8b4694fa7fb6a8f941fb741121fe5aab3 kabi: expand and clarify documentation
https://gitlab.com/cki-project/kernel-ark/-/commit/308d17beeaa6cb4a514f77319b636c9a2c15f5eb
308d17beeaa6cb4a514f77319b636c9a2c15f5eb kabi: make RH_KABI_USE replace any number of reserved fields
https://gitlab.com/cki-project/kernel-ark/-/commit/f3d12dffffeee8d6692be46044b9fc8448901692
f3d12dffffeee8d6692be46044b9fc8448901692 kabi: rename RH_KABI_USE2 to RH_KABI_USE_SPLIT
https://gitlab.com/cki-project/kernel-ark/-/commit/520e726b4e78101e73fa3d77cdcbc21d204a75a9
520e726b4e78101e73fa3d77cdcbc21d204a75a9 kabi: change RH_KABI_REPLACE2 to RH_KABI_REPLACE_SPLIT
https://gitlab.com/cki-project/kernel-ark/-/commit/7160868bd40d04e6d1a80f55d1bf9bb62ede0ba3
7160868bd40d04e6d1a80f55d1bf9bb62ede0ba3 kabi: change RH_KABI_REPLACE_UNSAFE to RH_KABI_BROKEN_REPLACE
https://gitlab.com/cki-project/kernel-ark/-/commit/0b83063cf6c57dc20a80c35396fa425ec1963d53
0b83063cf6c57dc20a80c35396fa425ec1963d53 kabi: introduce RH_KABI_ADD_MODIFIER
https://gitlab.com/cki-project/kernel-ark/-/commit/d276c2393792e3eec80a73a4fe964f9ec11145a7
d276c2393792e3eec80a73a4fe964f9ec11145a7 kabi: Include kconfig.h
https://gitlab.com/cki-project/kernel-ark/-/commit/28c30de9c771ff91994c9f0a42bdcc260fa97c2d
28c30de9c771ff91994c9f0a42bdcc260fa97c2d kabi: macros for intentional kABI breakage
https://gitlab.com/cki-project/kernel-ark/-/commit/9b671c725ac69c47874321e5636e6541bb6d219d
9b671c725ac69c47874321e5636e6541bb6d219d kabi: fix the note about terminating semicolon
https://gitlab.com/cki-project/kernel-ark/-/commit/6443eef17fb53f62886ecce519b6e12dd310e7f5
6443eef17fb53f62886ecce519b6e12dd310e7f5 kabi: introduce RH_KABI_HIDE_INCLUDE and RH_KABI_FAKE_INCLUDE
https://gitlab.com/cki-project/kernel-ark/-/commit/47746fc3837b476ec265e2a0c2aaa86de0d3994e
47746fc3837b476ec265e2a0c2aaa86de0d3994e pci.h: Fix static include
https://gitlab.com/cki-project/kernel-ark/-/commit/67ce66385c6b619356c4030e6163c4fb18a50427
67ce66385c6b619356c4030e6163c4fb18a50427 drivers/pci/pci-driver.c: Fix if/ifdef typo
https://gitlab.com/cki-project/kernel-ark/-/commit/0dfd7feeadc964ef2a9d118218b54831381c8d7a
0dfd7feeadc964ef2a9d118218b54831381c8d7a kernel/rh_taint.c: Update to new messaging
https://gitlab.com/cki-project/kernel-ark/-/commit/35e5ee153637e59c9297c9cc8ba7f3960277ffc2
35e5ee153637e59c9297c9cc8ba7f3960277ffc2 redhat: Add mark_driver_deprecated()
https://gitlab.com/cki-project/kernel-ark/-/commit/ff7aa8cae4c7e3e7bbc1bb5612efc2157c81fa7d
ff7aa8cae4c7e3e7bbc1bb5612efc2157c81fa7d RHEL: disable io_uring support
https://gitlab.com/cki-project/kernel-ark/-/commit/517351ed810bf2707e7fdb2ab22029aeb594db59
517351ed810bf2707e7fdb2ab22029aeb594db59 bpf: Fix unprivileged_bpf_disabled setup
https://gitlab.com/cki-project/kernel-ark/-/commit/48fe2e5f40c901e92d1f8c62bc97f58af4b0906a
48fe2e5f40c901e92d1f8c62bc97f58af4b0906a nvme: nvme_mpath_init remove multipath check
https://gitlab.com/cki-project/kernel-ark/-/commit/1c9bd09f303e2c9d2c67fdc46604d94e00cbf67c
1c9bd09f303e2c9d2c67fdc46604d94e00cbf67c wireguard: disable in FIPS mode
https://gitlab.com/cki-project/kernel-ark/-/commit/57872981891fe8f3f7205daa4b78c8c0d676b171
57872981891fe8f3f7205daa4b78c8c0d676b171 nvme: decouple basic ANA log page re-read support from native multipathing
https://gitlab.com/cki-project/kernel-ark/-/commit/0561f5953431ff471193611cd73af65dd394c8cd
0561f5953431ff471193611cd73af65dd394c8cd nvme: allow local retry and proper failover for REQ_FAILFAST_TRANSPORT
https://gitlab.com/cki-project/kernel-ark/-/commit/f801483d711fa5f83a0f9d4c479eeba702d1d477
f801483d711fa5f83a0f9d4c479eeba702d1d477 nvme: Return BLK_STS_TARGET if the DNR bit is set
https://gitlab.com/cki-project/kernel-ark/-/commit/4f2bc09956ad4829d139e9d69b86ba8b9ebc66e2
4f2bc09956ad4829d139e9d69b86ba8b9ebc66e2 REDHAT: coresight: etm4x: Disable coresight on HPE Apollo 70
https://gitlab.com/cki-project/kernel-ark/-/commit/65a21d545cc43328ea00fdbd62e7b45f375adce8
65a21d545cc43328ea00fdbd62e7b45f375adce8 redhat: remove remaining references of CONFIG_RH_DISABLE_DEPRECATED
https://gitlab.com/cki-project/kernel-ark/-/commit/1c1b5380b0b56d3be978997b128f84aeb9906656
1c1b5380b0b56d3be978997b128f84aeb9906656 arch/x86: Remove vendor specific CPU ID checks
https://gitlab.com/cki-project/kernel-ark/-/commit/f7c032c856ba6379a77b76179d0352929d6039ec
f7c032c856ba6379a77b76179d0352929d6039ec redhat: Replace hardware.redhat.com link in Unsupported message
https://gitlab.com/cki-project/kernel-ark/-/commit/9a6eb49603959cf0aab0198e13946eaee07801c3
9a6eb49603959cf0aab0198e13946eaee07801c3 x86: Fix compile issues with rh_check_supported()
https://gitlab.com/cki-project/kernel-ark/-/commit/8a605436efddfa7dbc6e007b2881fa81f17968a5
8a605436efddfa7dbc6e007b2881fa81f17968a5 KEYS: Make use of platform keyring for module signature verify
https://gitlab.com/cki-project/kernel-ark/-/commit/c7c191f662438423a23592db42838ff550c2bdda
c7c191f662438423a23592db42838ff550c2bdda Input: rmi4 - remove the need for artificial IRQ in case of HID
https://gitlab.com/cki-project/kernel-ark/-/commit/4ae139284600cd6fef133ce7a981485ea73381ab
4ae139284600cd6fef133ce7a981485ea73381ab ARM: tegra: usb no reset
https://gitlab.com/cki-project/kernel-ark/-/commit/8156e2102f753bbe0f0dd222a5f232e7f3d99883
8156e2102f753bbe0f0dd222a5f232e7f3d99883 arm: make CONFIG_HIGHPTE optional without CONFIG_EXPERT
https://gitlab.com/cki-project/kernel-ark/-/commit/823e733a88ddd21c735288dd3b08348e79872b91
823e733a88ddd21c735288dd3b08348e79872b91 redhat: rh_kabi: deduplication friendly structs
https://gitlab.com/cki-project/kernel-ark/-/commit/61d2a751fe1b1305684d6c1899f26fa9e38ac0a9
61d2a751fe1b1305684d6c1899f26fa9e38ac0a9 redhat: rh_kabi add a comment with warning about RH_KABI_EXCLUDE usage
https://gitlab.com/cki-project/kernel-ark/-/commit/7d09cb3ea3dd2f3cda5a6a31be429f259106ca61
7d09cb3ea3dd2f3cda5a6a31be429f259106ca61 redhat: rh_kabi: introduce RH_KABI_EXTEND_WITH_SIZE
https://gitlab.com/cki-project/kernel-ark/-/commit/c0c51c6f123df02948e11680d9b90324593ba547
c0c51c6f123df02948e11680d9b90324593ba547 redhat: rh_kabi: Indirect EXTEND macros so nesting of other macros will resolve.
https://gitlab.com/cki-project/kernel-ark/-/commit/96b20c70b39cd28efcec2336417cb0db9ff7853c
96b20c70b39cd28efcec2336417cb0db9ff7853c redhat: rh_kabi: Fix RH_KABI_SET_SIZE to use dereference operator
https://gitlab.com/cki-project/kernel-ark/-/commit/198030a81d85dbac8f4030e69d3d376327433487
198030a81d85dbac8f4030e69d3d376327433487 redhat: rh_kabi: Add macros to size and extend structs
https://gitlab.com/cki-project/kernel-ark/-/commit/695af00ed9e393abe88d9ee4de3702c15ded186d
695af00ed9e393abe88d9ee4de3702c15ded186d Removing Obsolete hba pci-ids from rhel8
https://gitlab.com/cki-project/kernel-ark/-/commit/736038bd8039d1543468c1dc8925f20929645804
736038bd8039d1543468c1dc8925f20929645804 mptsas: pci-id table changes
https://gitlab.com/cki-project/kernel-ark/-/commit/83cdf2924bdcc90c433a58129b4501e10b1295dc
83cdf2924bdcc90c433a58129b4501e10b1295dc mptspi: pci-id table changes
https://gitlab.com/cki-project/kernel-ark/-/commit/0b634d81ed7f0730e13d720508dbaa6ab94e54d2
0b634d81ed7f0730e13d720508dbaa6ab94e54d2 qla2xxx: Remove PCI IDs of deprecated adapter
https://gitlab.com/cki-project/kernel-ark/-/commit/0d11491f9e7fe0c8c301db3256cb47c66ae8450f
0d11491f9e7fe0c8c301db3256cb47c66ae8450f hpsa: remove old cciss-based smartarray pci ids
https://gitlab.com/cki-project/kernel-ark/-/commit/75f69a4f7b8f9d38c5efb0231186ed8726e526f2
75f69a4f7b8f9d38c5efb0231186ed8726e526f2 kernel: add SUPPORT_REMOVED kernel taint
https://gitlab.com/cki-project/kernel-ark/-/commit/50081b0865239d853d77bc71e54d13fad8bac9f0
50081b0865239d853d77bc71e54d13fad8bac9f0 Rename RH_DISABLE_DEPRECATED to RHEL_DIFFERENCES
https://gitlab.com/cki-project/kernel-ark/-/commit/dc84f3cc1b19a0524e58a382c382f34081dc6c35
dc84f3cc1b19a0524e58a382c382f34081dc6c35 s390: Lock down the kernel when the IPL secure flag is set
https://gitlab.com/cki-project/kernel-ark/-/commit/cb55378c04d6516f303e98061ec7ddd6563429a8
cb55378c04d6516f303e98061ec7ddd6563429a8 efi: Lock down the kernel if booted in secure boot mode
https://gitlab.com/cki-project/kernel-ark/-/commit/9b06e1f07c3cc9e1d0533b8615426d4d5d9e4ebb
9b06e1f07c3cc9e1d0533b8615426d4d5d9e4ebb efi: Add an EFI_SECURE_BOOT flag to indicate secure boot mode
https://gitlab.com/cki-project/kernel-ark/-/commit/db249925c6802b38d910927e4d032af1e00bee56
db249925c6802b38d910927e4d032af1e00bee56 security: lockdown: expose a hook to lock the kernel down
https://gitlab.com/cki-project/kernel-ark/-/commit/f9604bcd305aba2a94e713ee758a51143687ae9f
f9604bcd305aba2a94e713ee758a51143687ae9f Make get_cert_list() use efi_status_to_str() to print error messages.
https://gitlab.com/cki-project/kernel-ark/-/commit/b75eb3e922c93d78d4190a759f5725e856d35439
b75eb3e922c93d78d4190a759f5725e856d35439 Add efi_status_to_str() and rework efi_status_to_err().
https://gitlab.com/cki-project/kernel-ark/-/commit/2f80042d6b8199fceadf3623243402066e0cd4ea
2f80042d6b8199fceadf3623243402066e0cd4ea Add support for deprecating processors
https://gitlab.com/cki-project/kernel-ark/-/commit/5a3b4f5754788e42db8ed550b359382b600f2b08
5a3b4f5754788e42db8ed550b359382b600f2b08 arm: aarch64: Drop the EXPERT setting from ARM64_FORCE_52BIT
https://gitlab.com/cki-project/kernel-ark/-/commit/36cd5d0a0aa0a3be8ac385ca8991563c9e58227f
36cd5d0a0aa0a3be8ac385ca8991563c9e58227f iommu/arm-smmu: workaround DMA mode issues
https://gitlab.com/cki-project/kernel-ark/-/commit/ca34010e072550c8d5ea57f9436bab254c3521cc
ca34010e072550c8d5ea57f9436bab254c3521cc rh_kabi: introduce RH_KABI_EXCLUDE
https://gitlab.com/cki-project/kernel-ark/-/commit/26054e2c4e2253fe955a351971dc6b931cb68961
26054e2c4e2253fe955a351971dc6b931cb68961 ipmi: do not configure ipmi for HPE m400
https://gitlab.com/cki-project/kernel-ark/-/commit/9cb0f734492a21a7e506d7145caf143ccd927b2a
9cb0f734492a21a7e506d7145caf143ccd927b2a kABI: Add generic kABI macros to use for kABI workarounds
https://gitlab.com/cki-project/kernel-ark/-/commit/4960e5ee4a0e9bb28e512eb35cfa633ac4552049
4960e5ee4a0e9bb28e512eb35cfa633ac4552049 add pci_hw_vendor_status()
https://gitlab.com/cki-project/kernel-ark/-/commit/291c4e2878431fd6937c5b9248babe8ec8d4233e
291c4e2878431fd6937c5b9248babe8ec8d4233e ahci: thunderx2: Fix for errata that affects stop engine
https://gitlab.com/cki-project/kernel-ark/-/commit/996869cc0b3e78cb9182a4ebced2c46ee2774935
996869cc0b3e78cb9182a4ebced2c46ee2774935 Vulcan: AHCI PCI bar fix for Broadcom Vulcan early silicon
https://gitlab.com/cki-project/kernel-ark/-/commit/c1c7a887998ab12c5a1180c4bca3b41c31fe4aa6
c1c7a887998ab12c5a1180c4bca3b41c31fe4aa6 bpf: set unprivileged_bpf_disabled to 1 by default, add a boot parameter
https://gitlab.com/cki-project/kernel-ark/-/commit/e40c9d10474d1a5b5f7f01175a72ba4a3c7f5e8e
e40c9d10474d1a5b5f7f01175a72ba4a3c7f5e8e add Red Hat-specific taint flags
https://gitlab.com/cki-project/kernel-ark/-/commit/f23f446b724fbb79c1e09a278fcb427fc29c0c05
f23f446b724fbb79c1e09a278fcb427fc29c0c05 tags.sh: Ignore redhat/rpm
https://gitlab.com/cki-project/kernel-ark/-/commit/a68aa65a20fba1908a7326e5321ce8bc39a9ae14
a68aa65a20fba1908a7326e5321ce8bc39a9ae14 put RHEL info into generated headers
https://gitlab.com/cki-project/kernel-ark/-/commit/80937f1973d73fccdc75db4026fbed7cba16f489
80937f1973d73fccdc75db4026fbed7cba16f489 aarch64: acpi scan: Fix regression related to X-Gene UARTs
https://gitlab.com/cki-project/kernel-ark/-/commit/3362fd10fe075b48ff8af023da5643bc9477a4c6
3362fd10fe075b48ff8af023da5643bc9477a4c6 ACPI / irq: Workaround firmware issue on X-Gene based m400
https://gitlab.com/cki-project/kernel-ark/-/commit/ffc66b174954abecfb360dcc3b98c3139ef12d96
ffc66b174954abecfb360dcc3b98c3139ef12d96 modules: add rhelversion MODULE_INFO tag
https://gitlab.com/cki-project/kernel-ark/-/commit/7e469c23b8f648d79e8a0e82ee41cda0e50b2f19
7e469c23b8f648d79e8a0e82ee41cda0e50b2f19 ACPI: APEI: arm64: Ignore broken HPE moonshot APEI support
https://gitlab.com/cki-project/kernel-ark/-/commit/a0f49117d038de2d4db4940f5f039addb2f7231d
a0f49117d038de2d4db4940f5f039addb2f7231d Add Red Hat tainting
https://gitlab.com/cki-project/kernel-ark/-/commit/fa67c16e780ed355f9847da90e8055ad1175c238
fa67c16e780ed355f9847da90e8055ad1175c238 Introduce CONFIG_RH_DISABLE_DEPRECATED
https://gitlab.com/cki-project/kernel-ark/-/commit/e7e1371803470a7840dc61da628cb912834ec149
e7e1371803470a7840dc61da628cb912834ec149 Pull the RHEL version defines out of the Makefile
https://gitlab.com/cki-project/kernel-ark/-/commit/84d1d3e3d0c2c7ed1f571c8495bad3b4d97cfa8e
84d1d3e3d0c2c7ed1f571c8495bad3b4d97cfa8e [initial commit] Add Red Hat variables in the top level makefile

View file

@ -1,25 +0,0 @@
===================
The Kernel dist-git
===================
The kernel is maintained in a `source tree`_ rather than directly in dist-git.
The specfile is maintained as a `template`_ in the source tree along with a set
of build scripts to generate configurations, (S)RPMs, and to populate the
dist-git repository.
The `documentation`_ for the source tree covers how to contribute and maintain
the tree.
If you're looking for the downstream patch set it's available in the source
tree with "git log master..ark-patches" or
`online`_.
Each release in dist-git is tagged in the source repository so you can easily
check out the source tree for a build. The tags are in the format
name-version-release, but note release doesn't contain the dist tag since the
source can be built in different build roots (Fedora, CentOS, etc.)
.. _source tree: https://gitlab.com/cki-project/kernel-ark.git
.. _template: https://gitlab.com/cki-project/kernel-ark/-/blob/os-build/redhat/kernel.spec.template
.. _documentation: https://gitlab.com/cki-project/kernel-ark/-/wikis/home
.. _online: https://gitlab.com/cki-project/kernel-ark/-/commits/ark-patches

78
README.txt Normal file
View file

@ -0,0 +1,78 @@
Kernel package tips & tricks.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The kernel is one of the more complicated packages in the distro, and
for the newcomer, some of the voodoo in the spec file can be somewhat scary.
This file attempts to document some of the magic.
Speeding up make prep
---------------------
The kernel is nearly 500MB of source code, and as such, 'make prep'
takes a while. The spec file employs some trickery so that repeated
invocations of make prep don't take as long. Ordinarily the %prep
phase of a package will delete the tree it is about to untar/patch.
The kernel %prep keeps around an unpatched version of the tree,
and makes a symlink tree clone of that clean tree and than applies
the patches listed in the spec to the symlink tree.
This makes a huge difference if you're doing multiple make preps a day.
As an added bonus, doing a diff between the clean tree and the symlink
tree is slightly faster than it would be doing two proper copies of the tree.
build logs.
-----------
There's a convenience helper script in scripts/grab-logs.sh
that will grab the build logs from koji for the kernel version reported
by make verrel
config heirarchy.
-----------------
Instead of having to maintain a config file for every arch variant we build on,
the kernel spec uses a nested system of configs. Each option CONFIG_FOO is
represented by a single file named CONFIG_FOO which contains the state (=y, =m,
=n). These options are collected in the folder base-generic. Architecture
specific options are set in nested folders. An option set in a nested folder
will override the same option set in one of the higher levels.
The individual CONFIG_FOO files only exist in the pkg-git repository. The RPM
contains kernel-foo.config files which are the result of combining all the
CONFIG_FOO files. The files are combined by running build_configs.sh. This
script _must_ be run each time one of the options is changed.
Example flow:
# Enable the option CONFIG_ABC123 as a module for all arches
echo "CONFIG_ABC123=m" > configs/base-generic/CONFIG_ABC1234
# enable the option CONFIG_XYZ321 for only x86
echo "# CONFIG_XYZ321 is not set" > configs/base-generic/CONFIG_XYZ321
echo "CONFIG_XYZ321=m" > configs/base-generic/x86/CONFIG_XYZ321
# regenerate the combined config files
./build_configs.sh
The file config_generation gives a listing of what folders go into each
config file generated.
debug options.
--------------
This is a little complicated, as the purpose & meaning of this changes
depending on where we are in the release cycle.
If we are building for a current stable release, 'make release' has
typically been run already, which sets up the following..
- Two builds occur, a 'kernel' and a 'kernel-debug' flavor.
- kernel-debug will get various heavyweight debugging options like
lockdep etc turned on.
If we are building for rawhide, 'make debug' has been run, which changes
the status quo to:
- We only build one kernel 'kernel'
- The debug options are always turned on.
This is done to increase coverage testing, as not many people actually
run kernel-debug.
The debug options are managed in a separate heierarchy under base-debug. This
works in a similar manner to base-generic. More deeply nested folders, again,
override options. The file config_generation gives a listing of what folders
go into each config file generated.

10
TODO Normal file
View file

@ -0,0 +1,10 @@
Config TODOs:
* review & disable a bunch of the I2C, RTC, DVB, SOUND options.
Spec file TODOs:
* modules-extra: Do a few more things to make it a bit more robust.
- Allow for comments in the mod-extra.list file.
- Don't fail the build if a module is listed but not built (maybe).
- See if it can be tied into Kconfig instead of module names.

View file

@ -0,0 +1,31 @@
From 19908e5fe3e63ed2d39f0a8a9135f35fd428d766 Mon Sep 17 00:00:00 2001
From: Jon Masters <jcm@redhat.com>
Date: Thu, 18 Jul 2019 15:47:26 -0400
Subject: [PATCH] arm: make CONFIG_HIGHPTE optional without CONFIG_EXPERT
We will use this to force CONFIG_HIGHPTE off on LPAE for now
Signed-off-by: Jon Masters <jcm@redhat.com>
---
arch/arm/Kconfig | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index 2bf1ce39a96d..e792b3e60095 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -1644,9 +1644,9 @@ config HIGHMEM
If unsure, say n.
config HIGHPTE
- bool "Allocate 2nd-level pagetables from highmem" if EXPERT
+ bool "Allocate 2nd-level pagetables from highmem"
depends on HIGHMEM
- default y
+ default n
help
The VM uses one page of physical memory for each page table.
For systems with a lot of processes, this can use a lot of
--
2.17.2

View file

@ -0,0 +1,75 @@
From 50d6b3cf9403879911e06d69c7ef41e43f8f7b4b Mon Sep 17 00:00:00 2001
From: Russell King <rmk+kernel@armlinux.org.uk>
Date: Wed, 12 Dec 2018 11:49:47 +0000
Subject: ARM: OMAP2+: fix lack of timer interrupts on CPU1 after hotplug
If we have a kernel configured for periodic timer interrupts, and we
have cpuidle enabled, then we end up with CPU1 losing timer interupts
after a hotplug.
This can manifest itself in RCU stall warnings, or userspace becoming
unresponsive.
The problem is that the kernel initially wants to use the TWD timer
for interrupts, but the TWD loses context when we enter the C3 cpuidle
state. Nothing reprograms the TWD after idle.
We have solved this in the past by switching to broadcast timer ticks,
and cpuidle44xx switches to that mode at boot time. However, there is
nothing to switch from periodic mode local timers after a hotplug
operation.
We call tick_broadcast_enter() in omap_enter_idle_coupled(), which one
would expect would take care of the issue, but internally this only
deals with one-shot local timers - tick_broadcast_enable() on the other
hand only deals with periodic local timers. So, we need to call both.
Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
[tony@atomide.com: just standardized the subject line]
Signed-off-by: Tony Lindgren <tony@atomide.com>
---
arch/arm/mach-omap2/cpuidle44xx.c | 16 ++++------------
1 file changed, 4 insertions(+), 12 deletions(-)
diff --git a/arch/arm/mach-omap2/cpuidle44xx.c b/arch/arm/mach-omap2/cpuidle44xx.c
index a8b291f00109..dae514c8276a 100644
--- a/arch/arm/mach-omap2/cpuidle44xx.c
+++ b/arch/arm/mach-omap2/cpuidle44xx.c
@@ -152,6 +152,10 @@ static int omap_enter_idle_coupled(struct cpuidle_device *dev,
mpuss_can_lose_context = (cx->mpu_state == PWRDM_POWER_RET) &&
(cx->mpu_logic_state == PWRDM_POWER_OFF);
+ /* Enter broadcast mode for periodic timers */
+ tick_broadcast_enable();
+
+ /* Enter broadcast mode for one-shot timers */
tick_broadcast_enter();
/*
@@ -218,15 +222,6 @@ fail:
return index;
}
-/*
- * For each cpu, setup the broadcast timer because local timers
- * stops for the states above C1.
- */
-static void omap_setup_broadcast_timer(void *arg)
-{
- tick_broadcast_enable();
-}
-
static struct cpuidle_driver omap4_idle_driver = {
.name = "omap4_idle",
.owner = THIS_MODULE,
@@ -319,8 +314,5 @@ int __init omap4_idle_init(void)
if (!cpu_clkdm[0] || !cpu_clkdm[1])
return -ENODEV;
- /* Configure the broadcast timer on each cpu */
- on_each_cpu(omap_setup_broadcast_timer, NULL, 1);
-
return cpuidle_register(idle_driver, cpu_online_mask);
}
--
cgit 1.2-0.3.lf.el7

View file

@ -0,0 +1,44 @@
From dc30e70391376ba3987aeb856ae6d9c0706534f1 Mon Sep 17 00:00:00 2001
From: Yizhuo <yzhai003@ucr.edu>
Date: Fri, 25 Jan 2019 22:32:20 -0800
Subject: ARM: OMAP2+: Variable "reg" in function omap4_dsi_mux_pads() could be
uninitialized
In function omap4_dsi_mux_pads(), local variable "reg" could
be uninitialized if function regmap_read() returns -EINVAL.
However, it will be used directly in the later context, which
is potentially unsafe.
Signed-off-by: Yizhuo <yzhai003@ucr.edu>
Signed-off-by: Tony Lindgren <tony@atomide.com>
---
arch/arm/mach-omap2/display.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/arch/arm/mach-omap2/display.c b/arch/arm/mach-omap2/display.c
index f86b72d1d59e..1444b4b4bd9f 100644
--- a/arch/arm/mach-omap2/display.c
+++ b/arch/arm/mach-omap2/display.c
@@ -83,6 +83,7 @@ static int omap4_dsi_mux_pads(int dsi_id, unsigned lanes)
u32 enable_mask, enable_shift;
u32 pipd_mask, pipd_shift;
u32 reg;
+ int ret;
if (dsi_id == 0) {
enable_mask = OMAP4_DSI1_LANEENABLE_MASK;
@@ -98,7 +99,11 @@ static int omap4_dsi_mux_pads(int dsi_id, unsigned lanes)
return -ENODEV;
}
- regmap_read(omap4_dsi_mux_syscon, OMAP4_DSIPHY_SYSCON_OFFSET, &reg);
+ ret = regmap_read(omap4_dsi_mux_syscon,
+ OMAP4_DSIPHY_SYSCON_OFFSET,
+ &reg);
+ if (ret)
+ return ret;
reg &= ~enable_mask;
reg &= ~pipd_mask;
--
cgit 1.2-0.3.lf.el7

View file

@ -0,0 +1,57 @@
From patchwork Thu Jun 28 08:13:30 2018
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Subject: [2/3] mmc: sdhci: add quirk to prevent higher speed modes
From: Stefan Agner <stefan@agner.ch>
X-Patchwork-Id: 10493273
Message-Id: <20180628081331.13051-3-stefan@agner.ch>
To: adrian.hunter@intel.com, ulf.hansson@linaro.org
Cc: fabio.estevam@nxp.com, haibo.chen@nxp.com, aisheng.dong@nxp.com,
michael@amarulasolutions.com, rmk+kernel@armlinux.org.uk,
linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org,
Stefan Agner <stefan@agner.ch>
Date: Thu, 28 Jun 2018 10:13:30 +0200
Some hosts are capable of running higher speed modes but do not
have the board support for it. Introduce a quirk which prevents
the stack from using modes running at 100MHz or faster.
Signed-off-by: Stefan Agner <stefan@agner.ch>
---
drivers/mmc/host/sdhci.c | 8 ++++++++
drivers/mmc/host/sdhci.h | 2 ++
2 files changed, 10 insertions(+)
diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c
index 1c828e0e9905..8ac257dfaab3 100644
--- a/drivers/mmc/host/sdhci.c
+++ b/drivers/mmc/host/sdhci.c
@@ -3749,6 +3749,14 @@ int sdhci_setup_host(struct sdhci_host *host)
}
}
+ if (host->quirks2 & SDHCI_QUIRK2_NO_UHS_HS200_HS400) {
+ host->caps1 &= ~(SDHCI_SUPPORT_SDR104 | SDHCI_SUPPORT_SDR50 |
+ SDHCI_SUPPORT_DDR50);
+
+ mmc->caps2 &= ~(MMC_CAP2_HSX00_1_8V | MMC_CAP2_HSX00_1_2V |
+ MMC_CAP2_HS400_ES);
+ }
+
if (host->quirks2 & SDHCI_QUIRK2_NO_1_8_V) {
host->caps1 &= ~(SDHCI_SUPPORT_SDR104 | SDHCI_SUPPORT_SDR50 |
SDHCI_SUPPORT_DDR50);
diff --git a/drivers/mmc/host/sdhci.h b/drivers/mmc/host/sdhci.h
index 23966f887da6..cb2433d6d61f 100644
--- a/drivers/mmc/host/sdhci.h
+++ b/drivers/mmc/host/sdhci.h
@@ -450,6 +450,8 @@ struct sdhci_host {
* block count.
*/
#define SDHCI_QUIRK2_USE_32BIT_BLK_CNT (1<<18)
+/* Do not support any higher speeds (>50MHz) */
+#define SDHCI_QUIRK2_NO_UHS_HS200_HS400 (1<<19)
int irq; /* Device IRQ */
void __iomem *ioaddr; /* Mapped address */

View file

@ -0,0 +1,29 @@
From 487ff7b0e537506057960a0c2d9482d19f2acf4a Mon Sep 17 00:00:00 2001
From: Peter Robinson <pbrobinson@gmail.com>
Date: Wed, 26 Apr 2017 11:12:54 +0100
Subject: [PATCH] Add option of 13 for FORCE_MAX_ZONEORDER
This is a hack, but it's what the other distros currently use
for aarch64 with 4K pages so we'll do the same while upstream
decides what the best outcome is (which isn't this).
Signed-off-by: Peter Robinson <pbrobinson@gmail.com>
---
arch/arm64/Kconfig | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig
index 3741859765cf..deec9511f1d3 100644
--- a/arch/arm64/Kconfig
+++ b/arch/arm64/Kconfig
@@ -751,6 +751,7 @@ config XEN
config FORCE_MAX_ZONEORDER
int
default "14" if (ARM64_64K_PAGES && TRANSPARENT_HUGEPAGE)
+ default "13" if (ARCH_THUNDER && !ARM64_64K_PAGES)
default "12" if (ARM64_16K_PAGES && TRANSPARENT_HUGEPAGE)
default "11"
help
--
2.12.2

View file

@ -0,0 +1,623 @@
From patchwork Thu Sep 5 14:51:12 2019
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
X-Patchwork-Submitter: Lee Jones <lee.jones@linaro.org>
X-Patchwork-Id: 11133293
Return-Path:
<SRS0=FLD0=XA=lists.infradead.org=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@kernel.org>
Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org
[172.30.200.123])
by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id EF29913BD
for <patchwork-linux-arm@patchwork.kernel.org>;
Thu, 5 Sep 2019 14:51:26 +0000 (UTC)
Received: from bombadil.infradead.org (bombadil.infradead.org
[198.137.202.133])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by mail.kernel.org (Postfix) with ESMTPS id 1997020820
for <patchwork-linux-arm@patchwork.kernel.org>;
Thu, 5 Sep 2019 14:51:27 +0000 (UTC)
Authentication-Results: mail.kernel.org;
dkim=pass (2048-bit key) header.d=lists.infradead.org
header.i=@lists.infradead.org header.b="QcCmRfwJ";
dkim=fail reason="signature verification failed" (2048-bit key)
header.d=linaro.org header.i=@linaro.org header.b="UUIx2S2a"
DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 1997020820
Authentication-Results: mail.kernel.org;
dmarc=fail (p=none dis=none) header.from=linaro.org
Authentication-Results: mail.kernel.org;
spf=none
smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
d=lists.infradead.org; s=bombadil.20170209; h=Sender:
Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe:
List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:Message-Id:Date:
Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date:
Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:
References:List-Owner; bh=RFMjkhfiAb3mDQJcei/M3ErXIrcuIvXho1uY3CGaFs8=; b=QcC
mRfwJTEzsniFc2PQTDfopo/phWmprscia3e6OqRIHx0I6F8qNt3pLneLcx7MATAHPJHeD2Bfz/d1W
vk/w8leYRcdrNca/SkMK3grqwTP3XueqwIC3W59cpisOR1/MTcmZZ05pTYnppFox5HNzWRfOL6Z6r
CZvdTV7DVN0DYpv+NU1GnegQ3L8w/B1BaXGHVCPJjH/dHMLJ4OqBor2LD0dBQpYwROMamQbE3enrN
WGMNjdb3YYZU47m5stsgoivzulIOlOF5PKp+VY75IwHxck1S07mqhqxB9cmIvdEke7S9T1EpoIOJs
2cu8v9rxofEpJNocOcSJeYiEpGj6qIA==;
Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org)
by bombadil.infradead.org with esmtp (Exim 4.92 #3 (Red Hat Linux))
id 1i5t6X-0000ra-3X; Thu, 05 Sep 2019 14:51:21 +0000
Received: from mail-wm1-x343.google.com ([2a00:1450:4864:20::343])
by bombadil.infradead.org with esmtps (Exim 4.92 #3 (Red Hat Linux))
id 1i5t6S-0000r9-W3
for linux-arm-kernel@lists.infradead.org; Thu, 05 Sep 2019 14:51:18 +0000
Received: by mail-wm1-x343.google.com with SMTP id n10so3441823wmj.0
for <linux-arm-kernel@lists.infradead.org>;
Thu, 05 Sep 2019 07:51:16 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google;
h=from:to:cc:subject:date:message-id;
bh=hP6dTKrGhmI4Li1vYBwvA5G00RWYLdiehRQLahBt/08=;
b=UUIx2S2a1OTzLYcxsOGi8vjYvnpXjIXXfjjInQmQhJrOoLVMUI4bMk0pP8K4hv5+v1
bC+ahF3FezFlzFIlypiny7EYPPxM79sdZHZnnpe6qgrTfl/6guRvEmNJy8vpPadhocR8
IW0JAJGxuc7RH4bWScdjpjBLvTYEo3MLTNDGuJOCB05O5AH8D6gSDZPqwaUWbITmdboy
JTOLJ37XUMxPF83r7F6BQwynpfcnLc9Ytv9w1tMp0R82MmO52QP457mar3d7PWPJu/Rw
YJb6IDjcjSjZJrr3aGvnJVnETp/zGeRsmeTgNtJe37OYQ5blm4tzTlx1dRxuMiRRs6DS
rUaA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20161025;
h=x-gm-message-state:from:to:cc:subject:date:message-id;
bh=hP6dTKrGhmI4Li1vYBwvA5G00RWYLdiehRQLahBt/08=;
b=d2RovY2av4Dyx8Ou6LJ+nAvLFVrruV6de3b6OWCOF5mnVZA2T2tJEcsrZEGXSSpkiz
1YxSkV7YgJJElZhqlfudvkyyxth7A1ZDQnU4x3QyppMQ5lWeHg/xT9+q+h7orxiRjQeX
2J+SRG4WqZwcpbUSe95Wy2tPFVB5GYv1eyARjCARCpYOECeprtSl1ckDVyBJ/3G4AVLm
kB1xk3Ua101/bad3LA8IW1Zo0ld7x7u42jPYO7kJhPH8Ec/l0mrAVSIJn54PKoLu/DhW
yH6q+kD4LffmAtpj4ICo/rQdtmjV7msTJZ/Dcos9IpUPi5KoXbxWdP+NoUyaVleKhEIl
IYMA==
X-Gm-Message-State: APjAAAUQgezKycPxaZ7DvJWRiVy/0dp867xlik7J0fXQ60D99YKcuW0q
aRR9aWXTADWPSkrcTkd0a071Qw==
X-Google-Smtp-Source:
APXvYqybUDyw7bzKyC0JJlkse2i6lXau2tHY0+7iUxCwZcbyfwIDTqmYWXxNn26wfhgBAKudt68zBQ==
X-Received: by 2002:a1c:a404:: with SMTP id n4mr3206745wme.137.1567695075383;
Thu, 05 Sep 2019 07:51:15 -0700 (PDT)
Received: from localhost.localdomain ([95.147.198.36])
by smtp.gmail.com with ESMTPSA id g201sm4376858wmg.34.2019.09.05.07.51.14
(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
Thu, 05 Sep 2019 07:51:14 -0700 (PDT)
From: Lee Jones <lee.jones@linaro.org>
To: agross@kernel.org, robh+dt@kernel.org, mark.rutland@arm.com,
bjorn.andersson@linaro.org, arnd@arndb.de
Subject: [PATCH v4 1/1] arm64: dts: qcom: Add Lenovo Yoga C630
Date: Thu, 5 Sep 2019 15:51:12 +0100
Message-Id: <20190905145112.7366-1-lee.jones@linaro.org>
X-Mailer: git-send-email 2.17.1
X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3
X-CRM114-CacheID: sfid-20190905_075117_040430_5C619449
X-CRM114-Status: GOOD ( 14.05 )
X-Spam-Score: -0.2 (/)
X-Spam-Report: SpamAssassin version 3.4.2 on bombadil.infradead.org summary:
Content analysis details: (-0.2 points)
pts rule name description
---- ----------------------
--------------------------------------------------
-0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/,
no trust [2a00:1450:4864:20:0:0:0:343 listed in]
[list.dnswl.org]
-0.0 SPF_PASS SPF: sender matches SPF record
0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record
-0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from
envelope-from domain
-0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from
author's domain
0.1 DKIM_SIGNED Message has a DKIM or DK signature,
not necessarily
valid
-0.1 DKIM_VALID Message has at least one valid DKIM or DK signature
X-BeenThere: linux-arm-kernel@lists.infradead.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: <linux-arm-kernel.lists.infradead.org>
List-Unsubscribe:
<http://lists.infradead.org/mailman/options/linux-arm-kernel>,
<mailto:linux-arm-kernel-request@lists.infradead.org?subject=unsubscribe>
List-Archive: <http://lists.infradead.org/pipermail/linux-arm-kernel/>
List-Post: <mailto:linux-arm-kernel@lists.infradead.org>
List-Help: <mailto:linux-arm-kernel-request@lists.infradead.org?subject=help>
List-Subscribe:
<http://lists.infradead.org/mailman/listinfo/linux-arm-kernel>,
<mailto:linux-arm-kernel-request@lists.infradead.org?subject=subscribe>
Cc: devicetree@vger.kernel.org, linux-arm-msm@vger.kernel.org,
linux-kernel@vger.kernel.org, soc@kernel.org,
Lee Jones <lee.jones@linaro.org>,
linux-arm-kernel@lists.infradead.org
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Sender: "linux-arm-kernel" <linux-arm-kernel-bounces@lists.infradead.org>
Errors-To:
linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org
From: Bjorn Andersson <bjorn.andersson@linaro.org>
The Lenovo Yoga C630 is built on the SDM850 from Qualcomm, but this seem
to be similar enough to the SDM845 that we can reuse the sdm845.dtsi.
Supported by this patch is: keyboard, battery monitoring, UFS storage,
USB host and Bluetooth.
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Reviewed-by: Vinod Koul <vkoul@kernel.org>
Acked-by: Sudeep Holla <sudeep.holla@arm.com>
[Lee] Reorder, change licence, remove non-upstream device node
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
Changelog:
* Reorder nodes alphabetically
* Remove superfluous node for driver not yet upstream
* Add (then remove) 'no-dma' property
* Change licence to BSD
arch/arm64/boot/dts/qcom/Makefile | 1 +
.../boot/dts/qcom/sdm850-lenovo-yoga-c630.dts | 446 ++++++++++++++++++
2 files changed, 447 insertions(+)
create mode 100644 arch/arm64/boot/dts/qcom/sdm850-lenovo-yoga-c630.dts
diff --git a/arch/arm64/boot/dts/qcom/Makefile b/arch/arm64/boot/dts/qcom/Makefile
index 0a7e5dfce6f7..670c6c65f9e9 100644
--- a/arch/arm64/boot/dts/qcom/Makefile
+++ b/arch/arm64/boot/dts/qcom/Makefile
@@ -12,5 +12,6 @@ dtb-$(CONFIG_ARCH_QCOM) += sdm845-cheza-r2.dtb
dtb-$(CONFIG_ARCH_QCOM) += sdm845-cheza-r3.dtb
dtb-$(CONFIG_ARCH_QCOM) += sdm845-db845c.dtb
dtb-$(CONFIG_ARCH_QCOM) += sdm845-mtp.dtb
+dtb-$(CONFIG_ARCH_QCOM) += sdm850-lenovo-yoga-c630.dtb
dtb-$(CONFIG_ARCH_QCOM) += qcs404-evb-1000.dtb
dtb-$(CONFIG_ARCH_QCOM) += qcs404-evb-4000.dtb
diff --git a/arch/arm64/boot/dts/qcom/sdm850-lenovo-yoga-c630.dts b/arch/arm64/boot/dts/qcom/sdm850-lenovo-yoga-c630.dts
new file mode 100644
index 000000000000..ded120d3aef5
--- /dev/null
+++ b/arch/arm64/boot/dts/qcom/sdm850-lenovo-yoga-c630.dts
@@ -0,0 +1,446 @@
+// SPDX-License-Identifier: BSD-3-Clause
+/*
+ * Lenovo Yoga C630
+ *
+ * Copyright (c) 2019, Linaro Ltd.
+ */
+
+/dts-v1/;
+
+#include <dt-bindings/regulator/qcom,rpmh-regulator.h>
+#include "sdm845.dtsi"
+#include "pm8998.dtsi"
+
+/ {
+ model = "Lenovo Yoga C630";
+ compatible = "lenovo,yoga-c630", "qcom,sdm845";
+
+ aliases {
+ hsuart0 = &uart6;
+ };
+};
+
+&apps_rsc {
+ pm8998-rpmh-regulators {
+ compatible = "qcom,pm8998-rpmh-regulators";
+ qcom,pmic-id = "a";
+
+ vdd-l2-l8-l17-supply = <&vreg_s3a_1p35>;
+ vdd-l7-l12-l14-l15-supply = <&vreg_s5a_2p04>;
+
+ vreg_s2a_1p125: smps2 {
+ };
+
+ vreg_s3a_1p35: smps3 {
+ regulator-min-microvolt = <1352000>;
+ regulator-max-microvolt = <1352000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vreg_s4a_1p8: smps4 {
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vreg_s5a_2p04: smps5 {
+ regulator-min-microvolt = <2040000>;
+ regulator-max-microvolt = <2040000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vreg_s7a_1p025: smps7 {
+ };
+
+ vdd_qusb_hs0:
+ vdda_hp_pcie_core:
+ vdda_mipi_csi0_0p9:
+ vdda_mipi_csi1_0p9:
+ vdda_mipi_csi2_0p9:
+ vdda_mipi_dsi0_pll:
+ vdda_mipi_dsi1_pll:
+ vdda_qlink_lv:
+ vdda_qlink_lv_ck:
+ vdda_qrefs_0p875:
+ vdda_pcie_core:
+ vdda_pll_cc_ebi01:
+ vdda_pll_cc_ebi23:
+ vdda_sp_sensor:
+ vdda_ufs1_core:
+ vdda_ufs2_core:
+ vdda_usb1_ss_core:
+ vdda_usb2_ss_core:
+ vreg_l1a_0p875: ldo1 {
+ regulator-min-microvolt = <880000>;
+ regulator-max-microvolt = <880000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vddpx_10:
+ vreg_l2a_1p2: ldo2 {
+ regulator-min-microvolt = <1200000>;
+ regulator-max-microvolt = <1200000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ regulator-always-on;
+ };
+
+ vreg_l3a_1p0: ldo3 {
+ };
+
+ vdd_wcss_cx:
+ vdd_wcss_mx:
+ vdda_wcss_pll:
+ vreg_l5a_0p8: ldo5 {
+ regulator-min-microvolt = <800000>;
+ regulator-max-microvolt = <800000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vddpx_13:
+ vreg_l6a_1p8: ldo6 {
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vreg_l7a_1p8: ldo7 {
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vreg_l8a_1p2: ldo8 {
+ };
+
+ vreg_l9a_1p8: ldo9 {
+ };
+
+ vreg_l10a_1p8: ldo10 {
+ };
+
+ vreg_l11a_1p0: ldo11 {
+ };
+
+ vdd_qfprom:
+ vdd_qfprom_sp:
+ vdda_apc1_cs_1p8:
+ vdda_gfx_cs_1p8:
+ vdda_qrefs_1p8:
+ vdda_qusb_hs0_1p8:
+ vddpx_11:
+ vreg_l12a_1p8: ldo12 {
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vddpx_2:
+ vreg_l13a_2p95: ldo13 {
+ };
+
+ vreg_l14a_1p88: ldo14 {
+ regulator-min-microvolt = <1880000>;
+ regulator-max-microvolt = <1880000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ regulator-always-on;
+ };
+
+ vreg_l15a_1p8: ldo15 {
+ };
+
+ vreg_l16a_2p7: ldo16 {
+ };
+
+ vreg_l17a_1p3: ldo17 {
+ regulator-min-microvolt = <1304000>;
+ regulator-max-microvolt = <1304000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vreg_l18a_2p7: ldo18 {
+ };
+
+ vreg_l19a_3p0: ldo19 {
+ regulator-min-microvolt = <3100000>;
+ regulator-max-microvolt = <3108000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vreg_l20a_2p95: ldo20 {
+ regulator-min-microvolt = <2960000>;
+ regulator-max-microvolt = <2960000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vreg_l21a_2p95: ldo21 {
+ };
+
+ vreg_l22a_2p85: ldo22 {
+ };
+
+ vreg_l23a_3p3: ldo23 {
+ };
+
+ vdda_qusb_hs0_3p1:
+ vreg_l24a_3p075: ldo24 {
+ regulator-min-microvolt = <3075000>;
+ regulator-max-microvolt = <3083000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vreg_l25a_3p3: ldo25 {
+ regulator-min-microvolt = <3104000>;
+ regulator-max-microvolt = <3112000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vdda_hp_pcie_1p2:
+ vdda_hv_ebi0:
+ vdda_hv_ebi1:
+ vdda_hv_ebi2:
+ vdda_hv_ebi3:
+ vdda_mipi_csi_1p25:
+ vdda_mipi_dsi0_1p2:
+ vdda_mipi_dsi1_1p2:
+ vdda_pcie_1p2:
+ vdda_ufs1_1p2:
+ vdda_ufs2_1p2:
+ vdda_usb1_ss_1p2:
+ vdda_usb2_ss_1p2:
+ vreg_l26a_1p2: ldo26 {
+ regulator-min-microvolt = <1200000>;
+ regulator-max-microvolt = <1208000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vreg_l28a_3p0: ldo28 {
+ };
+
+ vreg_lvs1a_1p8: lvs1 {
+ };
+
+ vreg_lvs2a_1p8: lvs2 {
+ };
+ };
+};
+
+&apps_smmu {
+ /* TODO: Figure out how to survive booting with this enabled */
+ status = "disabled";
+};
+
+&gcc {
+ protected-clocks = <GCC_QSPI_CORE_CLK>,
+ <GCC_QSPI_CORE_CLK_SRC>,
+ <GCC_QSPI_CNOC_PERIPH_AHB_CLK>;
+};
+
+&i2c1 {
+ status = "okay";
+ clock-frequency = <400000>;
+};
+
+&i2c3 {
+ status = "okay";
+ clock-frequency = <400000>;
+
+ hid@15 {
+ compatible = "hid-over-i2c";
+ reg = <0x15>;
+ hid-descr-addr = <0x1>;
+
+ interrupts-extended = <&tlmm 37 IRQ_TYPE_EDGE_RISING>;
+ };
+
+ hid@2c {
+ compatible = "hid-over-i2c";
+ reg = <0x2c>;
+ hid-descr-addr = <0x20>;
+
+ interrupts-extended = <&tlmm 37 IRQ_TYPE_EDGE_RISING>;
+
+ pinctrl-names = "default";
+ pinctrl-0 = <&i2c2_hid_active>;
+ };
+};
+
+&i2c5 {
+ status = "okay";
+ clock-frequency = <400000>;
+
+ hid@10 {
+ compatible = "hid-over-i2c";
+ reg = <0x10>;
+ hid-descr-addr = <0x1>;
+
+ interrupts-extended = <&tlmm 125 IRQ_TYPE_EDGE_FALLING>;
+
+ pinctrl-names = "default";
+ pinctrl-0 = <&i2c6_hid_active>;
+ };
+};
+
+&i2c11 {
+ status = "okay";
+ clock-frequency = <400000>;
+
+ hid@5c {
+ compatible = "hid-over-i2c";
+ reg = <0x5c>;
+ hid-descr-addr = <0x1>;
+
+ interrupts-extended = <&tlmm 92 IRQ_TYPE_LEVEL_LOW>;
+
+ pinctrl-names = "default";
+ pinctrl-0 = <&i2c12_hid_active>;
+ };
+};
+
+&qup_i2c12_default {
+ drive-strength = <2>;
+ bias-disable;
+};
+
+&qup_uart6_default {
+ pinmux {
+ pins = "gpio45", "gpio46", "gpio47", "gpio48";
+ function = "qup6";
+ };
+
+ cts {
+ pins = "gpio45";
+ bias-pull-down;
+ };
+
+ rts-tx {
+ pins = "gpio46", "gpio47";
+ drive-strength = <2>;
+ bias-disable;
+ };
+
+ rx {
+ pins = "gpio48";
+ bias-pull-up;
+ };
+};
+
+&qupv3_id_0 {
+ status = "okay";
+};
+
+&qupv3_id_1 {
+ status = "okay";
+};
+
+&tlmm {
+ gpio-reserved-ranges = <0 4>, <81 4>;
+
+ i2c2_hid_active: i2c2-hid-active {
+ pins = <37>;
+ function = "gpio";
+
+ input-enable;
+ bias-pull-up;
+ drive-strength = <2>;
+ };
+
+ i2c6_hid_active: i2c6-hid-active {
+ pins = <125>;
+ function = "gpio";
+
+ input-enable;
+ bias-pull-up;
+ drive-strength = <2>;
+ };
+
+ i2c12_hid_active: i2c12-hid-active {
+ pins = <92>;
+ function = "gpio";
+
+ input-enable;
+ bias-pull-up;
+ drive-strength = <2>;
+ };
+};
+
+&uart6 {
+ status = "okay";
+
+ bluetooth {
+ compatible = "qcom,wcn3990-bt";
+
+ vddio-supply = <&vreg_s4a_1p8>;
+ vddxo-supply = <&vreg_l7a_1p8>;
+ vddrf-supply = <&vreg_l17a_1p3>;
+ vddch0-supply = <&vreg_l25a_3p3>;
+ max-speed = <3200000>;
+ };
+};
+
+&ufs_mem_hc {
+ status = "okay";
+
+ vcc-supply = <&vreg_l20a_2p95>;
+ vcc-max-microamp = <600000>;
+};
+
+&ufs_mem_phy {
+ status = "okay";
+
+ vdda-phy-supply = <&vdda_ufs1_core>;
+ vdda-pll-supply = <&vdda_ufs1_1p2>;
+};
+
+&usb_1 {
+ status = "okay";
+};
+
+&usb_1_dwc3 {
+ dr_mode = "host";
+};
+
+&usb_1_hsphy {
+ status = "okay";
+
+ vdd-supply = <&vdda_usb1_ss_core>;
+ vdda-pll-supply = <&vdda_qusb_hs0_1p8>;
+ vdda-phy-dpdm-supply = <&vdda_qusb_hs0_3p1>;
+
+ qcom,imp-res-offset-value = <8>;
+ qcom,hstx-trim-value = <QUSB2_V2_HSTX_TRIM_21_6_MA>;
+ qcom,preemphasis-level = <QUSB2_V2_PREEMPHASIS_5_PERCENT>;
+ qcom,preemphasis-width = <QUSB2_V2_PREEMPHASIS_WIDTH_HALF_BIT>;
+};
+
+&usb_1_qmpphy {
+ status = "okay";
+
+ vdda-phy-supply = <&vdda_usb1_ss_1p2>;
+ vdda-pll-supply = <&vdda_usb1_ss_core>;
+};
+
+&usb_2 {
+ status = "okay";
+};
+
+&usb_2_dwc3 {
+ dr_mode = "host";
+};
+
+&usb_2_hsphy {
+ status = "okay";
+
+ vdd-supply = <&vdda_usb2_ss_core>;
+ vdda-pll-supply = <&vdda_qusb_hs0_1p8>;
+ vdda-phy-dpdm-supply = <&vdda_qusb_hs0_3p1>;
+
+ qcom,imp-res-offset-value = <8>;
+ qcom,hstx-trim-value = <QUSB2_V2_HSTX_TRIM_22_8_MA>;
+};
+
+&usb_2_qmpphy {
+ status = "okay";
+
+ vdda-phy-supply = <&vdda_usb2_ss_1p2>;
+ vdda-pll-supply = <&vdda_usb2_ss_core>;
+};

View file

@ -0,0 +1,29 @@
From 59780095ba35a49946e726c88caff6f65f3e433a Mon Sep 17 00:00:00 2001
From: Peter Robinson <pbrobinson@gmail.com>
Date: Tue, 30 Jul 2019 14:22:36 +0100
Subject: [PATCH] arm64: tegra: Jetson TX2: Allow bootloader to configure
Ethernet MAC
Add an ethernet alias so that a stable MAC address is added to the
device tree for the wired ethernet interface.
Signed-off-by: Peter Robinson <pbrobinson@gmail.com>
---
arch/arm64/boot/dts/nvidia/tegra186-p3310.dtsi | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/arm64/boot/dts/nvidia/tegra186-p3310.dtsi b/arch/arm64/boot/dts/nvidia/tegra186-p3310.dtsi
index 5e18acf5cfad..947744d0f04c 100644
--- a/arch/arm64/boot/dts/nvidia/tegra186-p3310.dtsi
+++ b/arch/arm64/boot/dts/nvidia/tegra186-p3310.dtsi
@@ -8,6 +8,7 @@
compatible = "nvidia,p3310", "nvidia,tegra186";
aliases {
+ ethernet0 = "/ethernet@2490000";
sdhci0 = "/sdhci@3460000";
sdhci1 = "/sdhci@3400000";
serial0 = &uarta;
--
2.21.0

View file

@ -0,0 +1,39 @@
From aea4a7a551fd7342299d34f04a8b75f58644ac07 Mon Sep 17 00:00:00 2001
From: Peter Robinson <pbrobinson@gmail.com>
Date: Sat, 23 Mar 2019 17:45:10 +0000
Subject: [PATCH 2/3] arm64: tegra210: Jetson TX1: disable display panel and
associated backlight
The Jetson TX1 dev kit doesn't ship with a screen by default and if
it's not there it appears to crash on boot so disable them both by
default until we work out the problem.
Signed-off-by: Peter Robinson <pbrobinson@gmail.com>
---
arch/arm64/boot/dts/nvidia/tegra210-p2371-2180.dts | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/arch/arm64/boot/dts/nvidia/tegra210-p2371-2180.dts b/arch/arm64/boot/dts/nvidia/tegra210-p2371-2180.dts
index 37e3c46e753f..a16f24f1d5ff 100644
--- a/arch/arm64/boot/dts/nvidia/tegra210-p2371-2180.dts
+++ b/arch/arm64/boot/dts/nvidia/tegra210-p2371-2180.dts
@@ -36,7 +36,7 @@
host1x@50000000 {
dsi@54300000 {
- status = "okay";
+ status = "disabled";
avdd-dsi-csi-supply = <&vdd_dsi_csi>;
@@ -54,6 +54,8 @@
i2c@7000c400 {
backlight: backlight@2c {
+ status = "disabled";
+
compatible = "ti,lp8557";
reg = <0x2c>;
--
2.20.1

View file

@ -0,0 +1,51 @@
From e5ccb943712d261b8ebb3e8ac92a82be4b244ce4 Mon Sep 17 00:00:00 2001
From: Peter Robinson <pbrobinson@gmail.com>
Date: Sun, 6 Oct 2019 14:44:25 +0100
Subject: [PATCH] arm64: tegra186: enable USB on Jetson-TX2
Based on the following patch series:
https://www.spinics.net/lists/linux-tegra/msg44216.html
Signed-off-by: Peter Robinson <pbrobinson@gmail.com>
---
arch/arm64/boot/dts/nvidia/tegra186-p2771-0000.dts | 4 ++--
arch/arm64/boot/dts/nvidia/tegra186.dtsi | 1 +
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/arch/arm64/boot/dts/nvidia/tegra186-p2771-0000.dts b/arch/arm64/boot/dts/nvidia/tegra186-p2771-0000.dts
index bdace01561ba..2e6195764268 100644
--- a/arch/arm64/boot/dts/nvidia/tegra186-p2771-0000.dts
+++ b/arch/arm64/boot/dts/nvidia/tegra186-p2771-0000.dts
@@ -115,7 +115,7 @@
};
padctl@3520000 {
- status = "disabled";
+ status = "okay";
avdd-pll-erefeut-supply = <&vdd_1v8_pll>;
avdd-usb-supply = <&vdd_3v3_sys>;
@@ -193,7 +193,7 @@
};
usb@3530000 {
- status = "disabled";
+ status = "okay";
phys = <&{/padctl@3520000/pads/usb2/lanes/usb2-0}>,
<&{/padctl@3520000/pads/usb2/lanes/usb2-1}>,
diff --git a/arch/arm64/boot/dts/nvidia/tegra186.dtsi b/arch/arm64/boot/dts/nvidia/tegra186.dtsi
index 47cd831fcf44..abdc81f555b9 100644
--- a/arch/arm64/boot/dts/nvidia/tegra186.dtsi
+++ b/arch/arm64/boot/dts/nvidia/tegra186.dtsi
@@ -525,6 +525,7 @@
<0x0 0x03538000 0x0 0x1000>;
reg-names = "hcd", "fpci";
+ iommus = <&smmu TEGRA186_SID_XUSB_HOST>;
interrupts = <GIC_SPI 163 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 164 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 167 IRQ_TYPE_LEVEL_HIGH>;
--
2.21.0

124
asus-fx503-keyb.patch Normal file
View file

@ -0,0 +1,124 @@
From c1dfbd7a588e43be466d12c3636f5670aef04847 Mon Sep 17 00:00:00 2001
From: Hans de Goede <hdegoede@redhat.com>
Date: Fri, 23 Nov 2018 13:31:00 +0100
Subject: [PATCH 1/2] HID: asus: Add event handler to catch unmapped Asus
Vendor UsagePage codes
Various Asus devices generate HID events using the Asus Vendor specific
UsagePage 0xff31 and hid-asus will map these in its input_mapping for all
devices to which it binds (independent of any quirks).
Add an event callback which check for unmapped (because sofar unknown)
usages within the Asus Vendor UsagePage and log a warning for these.
The purpose of this patch is to help debugging / find such unmapped codes
and add them to the asus_input_mapping() function.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
---
drivers/hid/hid-asus.c | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/drivers/hid/hid-asus.c b/drivers/hid/hid-asus.c
index a1fa2fc8c9b5..61fb5a43c1cb 100644
--- a/drivers/hid/hid-asus.c
+++ b/drivers/hid/hid-asus.c
@@ -241,6 +241,18 @@ static int asus_report_input(struct asus_drvdata *drvdat, u8 *data, int size)
return 1;
}
+static int asus_event(struct hid_device *hdev, struct hid_field *field,
+ struct hid_usage *usage, __s32 value)
+{
+ if ((usage->hid & HID_USAGE_PAGE) == 0xff310000 &&
+ (usage->hid & HID_USAGE) != 0x00 && !usage->type) {
+ hid_warn(hdev, "Unmapped Asus vendor usagepage code 0x%02x\n",
+ usage->hid & HID_USAGE);
+ }
+
+ return 0;
+}
+
static int asus_raw_event(struct hid_device *hdev,
struct hid_report *report, u8 *data, int size)
{
@@ -832,6 +844,7 @@ static struct hid_driver asus_driver = {
#ifdef CONFIG_PM
.reset_resume = asus_reset_resume,
#endif
+ .event = asus_event,
.raw_event = asus_raw_event
};
module_hid_driver(asus_driver);
--
2.19.2
From 53cb4c986eaedd2cfa161932b36d80c70d947e9e Mon Sep 17 00:00:00 2001
From: Hans de Goede <hdegoede@redhat.com>
Date: Fri, 23 Nov 2018 13:44:27 +0100
Subject: [PATCH 2/2] HID: asus: Add support for the ASUS FX503VD laptop
The ASUS FX503VD laptop uses an USB keyboard with several hotkeys
which use the Asus Vendor specific UsagePage.
This uses two usage-codes within the page which have not been seen
before, 0x7c for its mic-mute hotkey and 0x99 for Fn+F5 which has
a "fan" symbol as hotkey symbol on the keyb. we map this to KEY_PROG4
(PROG1-PROG3 are already used).
This commit adds the mappings for the 2 new usage codes and the USB-ids
for this keyboard to the hid-asus driver.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
---
drivers/hid/hid-asus.c | 7 +++++++
drivers/hid/hid-ids.h | 1 +
2 files changed, 8 insertions(+)
diff --git a/drivers/hid/hid-asus.c b/drivers/hid/hid-asus.c
index 61fb5a43c1cb..ab8bd40a77ed 100644
--- a/drivers/hid/hid-asus.c
+++ b/drivers/hid/hid-asus.c
@@ -522,6 +522,7 @@ static int asus_input_mapping(struct hid_device *hdev,
case 0x20: asus_map_key_clear(KEY_BRIGHTNESSUP); break;
case 0x35: asus_map_key_clear(KEY_DISPLAY_OFF); break;
case 0x6c: asus_map_key_clear(KEY_SLEEP); break;
+ case 0x7c: asus_map_key_clear(KEY_MICMUTE); break;
case 0x82: asus_map_key_clear(KEY_CAMERA); break;
case 0x88: asus_map_key_clear(KEY_RFKILL); break;
case 0xb5: asus_map_key_clear(KEY_CALC); break;
@@ -540,6 +541,9 @@ static int asus_input_mapping(struct hid_device *hdev,
/* Fn+Space Power4Gear Hybrid */
case 0x5c: asus_map_key_clear(KEY_PROG3); break;
+ /* Fn+F5 "fan" symbol on FX503VD */
+ case 0x99: asus_map_key_clear(KEY_PROG4); break;
+
default:
/* ASUS lazily declares 256 usages, ignore the rest,
* as some make the keyboard appear as a pointer device. */
@@ -817,6 +821,9 @@ static const struct hid_device_id asus_devices[] = {
USB_DEVICE_ID_ASUSTEK_ROG_KEYBOARD2), QUIRK_USE_KBD_BACKLIGHT },
{ HID_USB_DEVICE(USB_VENDOR_ID_ASUSTEK,
USB_DEVICE_ID_ASUSTEK_ROG_KEYBOARD3), QUIRK_G752_KEYBOARD },
+ { HID_USB_DEVICE(USB_VENDOR_ID_ASUSTEK,
+ USB_DEVICE_ID_ASUSTEK_FX503VD_KEYBOARD),
+ QUIRK_USE_KBD_BACKLIGHT },
{ HID_USB_DEVICE(USB_VENDOR_ID_ASUSTEK,
USB_DEVICE_ID_ASUSTEK_T100TA_KEYBOARD),
QUIRK_T100_KEYBOARD | QUIRK_NO_CONSUMER_USAGES },
diff --git a/drivers/hid/hid-ids.h b/drivers/hid/hid-ids.h
index ed35c9a9a110..4206428c0ba2 100644
--- a/drivers/hid/hid-ids.h
+++ b/drivers/hid/hid-ids.h
@@ -190,6 +190,7 @@
#define USB_DEVICE_ID_ASUSTEK_ROG_KEYBOARD1 0x1854
#define USB_DEVICE_ID_ASUSTEK_ROG_KEYBOARD2 0x1837
#define USB_DEVICE_ID_ASUSTEK_ROG_KEYBOARD3 0x1822
+#define USB_DEVICE_ID_ASUSTEK_FX503VD_KEYBOARD 0x1869
#define USB_VENDOR_ID_ATEN 0x0557
#define USB_DEVICE_ID_ATEN_UC100KM 0x2004
--
2.19.2

View file

@ -0,0 +1,154 @@
From patchwork Fri Sep 20 01:36:26 2019
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
X-Patchwork-Submitter: Navid Emamdoost <navid.emamdoost@gmail.com>
X-Patchwork-Id: 11153701
Return-Path:
<SRS0=bWbZ=XP=lists.infradead.org=ath10k-bounces+patchwork-ath10k=patchwork.kernel.org@kernel.org>
Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org
[172.30.200.123])
by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id D3F0714DB
for <patchwork-ath10k@patchwork.kernel.org>;
Fri, 20 Sep 2019 01:36:54 +0000 (UTC)
Received: from bombadil.infradead.org (bombadil.infradead.org
[198.137.202.133])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by mail.kernel.org (Postfix) with ESMTPS id B1A2E206C2
for <patchwork-ath10k@patchwork.kernel.org>;
Fri, 20 Sep 2019 01:36:54 +0000 (UTC)
Authentication-Results: mail.kernel.org;
dkim=pass (2048-bit key) header.d=lists.infradead.org
header.i=@lists.infradead.org header.b="bhsKgarK";
dkim=fail reason="signature verification failed" (2048-bit key)
header.d=gmail.com header.i=@gmail.com header.b="nljLTTHa"
DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B1A2E206C2
Authentication-Results: mail.kernel.org;
dmarc=fail (p=none dis=none) header.from=gmail.com
Authentication-Results: mail.kernel.org;
spf=none
smtp.mailfrom=ath10k-bounces+patchwork-ath10k=patchwork.kernel.org@lists.infradead.org
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
d=lists.infradead.org; s=bombadil.20170209; h=Sender:
Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe:
List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:Message-Id:Date:
Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date:
Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:
References:List-Owner; bh=TgqIPzTUSDBMffxK6MmqtQ+I81SfWmrbmWLuWLbhwV8=; b=bhs
KgarKUaVoFaf/6TPo+T+LIemPUgT0DioZ9Aa4cXD7m02vV5SrBodW911B9amgDGQ4ipx7UyAgOokS
QqumgU8MLbC9VEmDHseDYkrMDJvPAVL/+Ou5bAAoDDa4G14hJi1RWh5lsdIJBMKmjMI9KcW7qFdEj
eQ6JBoJXliaYp31BoAPEbyBnG4b8RQxO6wT9wA+/Bs8gR8bBQN9Wjo7zsIKHobQbKfAXTTRwn46dt
J7kt19264hkIv2Dr3UQc7W8kYL09TmllYFjEGYTOuGFEOoHlejt6CpbUnh0mdPtDggPPxsQ+e/f/h
0dGNUqgR/L7R5/70DbHnF24DnXzwfQw==;
Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org)
by bombadil.infradead.org with esmtp (Exim 4.92.2 #3 (Red Hat Linux))
id 1iB7qu-0006An-U6; Fri, 20 Sep 2019 01:36:52 +0000
Received: from mail-io1-xd43.google.com ([2607:f8b0:4864:20::d43])
by bombadil.infradead.org with esmtps (Exim 4.92.2 #3 (Red Hat Linux))
id 1iB7qr-0006A2-PC
for ath10k@lists.infradead.org; Fri, 20 Sep 2019 01:36:51 +0000
Received: by mail-io1-xd43.google.com with SMTP id q10so12531160iop.2
for <ath10k@lists.infradead.org>; Thu, 19 Sep 2019 18:36:47 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
h=from:to:cc:subject:date:message-id;
bh=2vkYM2Vw9GpvccAiSSIMhifEzfuK8Ld4R3bwXVgh1ps=;
b=nljLTTHaQr3RenMHyxOGrtAwE/I0ES0GK9UJLdYkS7iEalzRrwu+/ygif0A/YnEFuE
fMLFG5zBRN2I7SpqvTBqaxAYJbA+a5Nnb5ymeV3s6Ef+CcGHE165IRfi+4dxEt/RvV3k
4CjBDTDWGnnBO1wfDcS0WW9TqjJEoxFKWNCL+8oAzUyMten4zs8XPRUPlZVc5dHnkqC9
LmLWnaSBjm2g5JG0GJKSrT8KrYP2mv4yGUR0HaWruQWwfQQ8NJc2RyXm1Ml99KZkoU73
TG98jQSy2dcHrVqaNRfpAtyj0WEwXdLqMfT1ggk69p1ZfC7ol/7QEQxzgDIU0EFn2r59
owvA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20161025;
h=x-gm-message-state:from:to:cc:subject:date:message-id;
bh=2vkYM2Vw9GpvccAiSSIMhifEzfuK8Ld4R3bwXVgh1ps=;
b=h6uidvjJA/lvtevOi6n+lWV9vjtx5XM1d7kRlAFgObUBjJMIap329Jxa7uA0de8dx/
4ANBCQj9/8psgTYwWqBv0bJH+7IC+ewxZb2m3z1dMYwsFp8coTyMryaBVWb4trh0My3B
XT2OseKTL0iAiy35/SDbWV/5FljTuVmto5Jgglq6lB3uPpQVIGu46UY8kNKwuIdNseow
y4r+4w82KCHMoANJmlEPlFYb7xnmENPIdx0ZITs6ISjjvTICaf8nyA3OgqPCI5l3/DCb
3plewsEuTwGiFXPqJx2ldY3gIwfH8D7w1MLxadUUL6o2fDRt0ZjFbJuUk/tiX/EM5MOL
W3dQ==
X-Gm-Message-State: APjAAAWIX+IMQ2tM7gV9yX2n6iqisUO1ysXCEYfl/P1BcWwlYgTk8xNq
/djn9P594uwGss08Ku8JA9E=
X-Google-Smtp-Source:
APXvYqzLPqJkNUviwDSfcaSYJH+eUFOLc0fBeZpgji797e/U5UAY6XAi9Cq7iKldElsnElvAmFWNCw==
X-Received: by 2002:a6b:8f15:: with SMTP id r21mr3490587iod.259.1568943406715;
Thu, 19 Sep 2019 18:36:46 -0700 (PDT)
Received: from cs-dulles.cs.umn.edu (cs-dulles.cs.umn.edu. [128.101.35.54])
by smtp.googlemail.com with ESMTPSA id x12sm335602ioh.76.2019.09.19.18.36.45
(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
Thu, 19 Sep 2019 18:36:45 -0700 (PDT)
From: Navid Emamdoost <navid.emamdoost@gmail.com>
To:
Subject: [PATCH] ath10k: fix memory leak
Date: Thu, 19 Sep 2019 20:36:26 -0500
Message-Id: <20190920013632.30796-1-navid.emamdoost@gmail.com>
X-Mailer: git-send-email 2.17.1
X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3
X-CRM114-CacheID: sfid-20190919_183649_845813_A1A80F7F
X-CRM114-Status: UNSURE ( 7.25 )
X-CRM114-Notice: Please train this message.
X-Spam-Score: -0.2 (/)
X-Spam-Report: SpamAssassin version 3.4.2 on bombadil.infradead.org summary:
Content analysis details: (-0.2 points)
pts rule name description
---- ----------------------
--------------------------------------------------
-0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/,
no trust [2607:f8b0:4864:20:0:0:0:d43 listed in]
[list.dnswl.org]
0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record
-0.0 SPF_PASS SPF: sender matches SPF record
0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail
provider (navid.emamdoost[at]gmail.com)
-0.1 DKIM_VALID Message has at least one valid DKIM or DK signature
-0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from
author's domain
-0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from
envelope-from domain
0.1 DKIM_SIGNED Message has a DKIM or DK signature,
not necessarily
valid
X-BeenThere: ath10k@lists.infradead.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: <ath10k.lists.infradead.org>
List-Unsubscribe: <http://lists.infradead.org/mailman/options/ath10k>,
<mailto:ath10k-request@lists.infradead.org?subject=unsubscribe>
List-Archive: <http://lists.infradead.org/pipermail/ath10k/>
List-Post: <mailto:ath10k@lists.infradead.org>
List-Help: <mailto:ath10k-request@lists.infradead.org?subject=help>
List-Subscribe: <http://lists.infradead.org/mailman/listinfo/ath10k>,
<mailto:ath10k-request@lists.infradead.org?subject=subscribe>
Cc: linux-wireless@vger.kernel.org, kjlu@umn.edu,
linux-kernel@vger.kernel.org,
ath10k@lists.infradead.org, emamd001@umn.edu, smccaman@umn.edu,
netdev@vger.kernel.org, "David S. Miller" <davem@davemloft.net>,
Kalle Valo <kvalo@codeaurora.org>,
Navid Emamdoost <navid.emamdoost@gmail.com>
MIME-Version: 1.0
Sender: "ath10k" <ath10k-bounces@lists.infradead.org>
Errors-To:
ath10k-bounces+patchwork-ath10k=patchwork.kernel.org@lists.infradead.org
In ath10k_usb_hif_tx_sg the allocated urb should be released if
usb_submit_urb fails.
Signed-off-by: Navid Emamdoost <navid.emamdoost@gmail.com>
---
drivers/net/wireless/ath/ath10k/usb.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/net/wireless/ath/ath10k/usb.c b/drivers/net/wireless/ath/ath10k/usb.c
index e1420f67f776..730ed22e08a0 100644
--- a/drivers/net/wireless/ath/ath10k/usb.c
+++ b/drivers/net/wireless/ath/ath10k/usb.c
@@ -435,6 +435,7 @@ static int ath10k_usb_hif_tx_sg(struct ath10k *ar, u8 pipe_id,
ath10k_dbg(ar, ATH10K_DBG_USB_BULK,
"usb bulk transmit failed: %d\n", ret);
usb_unanchor_urb(urb);
+ usb_free_urb(urb);
ret = -EINVAL;
goto err_free_urb_to_pipe;
}

View file

@ -0,0 +1,38 @@
From: "kernel-team@fedoraproject.org" <kernel-team@fedoraproject.org>
Date: Wed, 6 Feb 2013 09:57:47 -0500
Subject: [PATCH] ath9k: rx dma stop check
---
drivers/net/wireless/ath/ath9k/mac.c | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)
diff --git a/drivers/net/wireless/ath/ath9k/mac.c b/drivers/net/wireless/ath/ath9k/mac.c
index bba85d1a6cd1..ebbee8f17130 100644
--- a/drivers/net/wireless/ath/ath9k/mac.c
+++ b/drivers/net/wireless/ath/ath9k/mac.c
@@ -693,7 +693,7 @@ bool ath9k_hw_stopdmarecv(struct ath_hw *ah, bool *reset)
{
#define AH_RX_STOP_DMA_TIMEOUT 10000 /* usec */
struct ath_common *common = ath9k_hw_common(ah);
- u32 mac_status, last_mac_status = 0;
+ u32 mac_status = 0, last_mac_status = 0;
int i;
/* Enable access to the DMA observation bus */
@@ -723,6 +723,16 @@ bool ath9k_hw_stopdmarecv(struct ath_hw *ah, bool *reset)
}
if (i == 0) {
+ if (!AR_SREV_9300_20_OR_LATER(ah) &&
+ (mac_status & 0x700) == 0) {
+ /*
+ * DMA is idle but the MAC is still stuck
+ * processing events
+ */
+ *reset = true;
+ return true;
+ }
+
ath_err(common,
"DMA failed to stop in %d ms AR_CR=0x%08x AR_DIAG_SW=0x%08x DMADBG_7=0x%08x\n",
AH_RX_STOP_DMA_TIMEOUT / 1000,

View file

@ -0,0 +1,776 @@
From patchwork Sun Nov 11 20:23:55 2018
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
X-Patchwork-Submitter: Stefan Wahren <stefan.wahren@i2se.com>
X-Patchwork-Id: 10677861
Return-Path:
<linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org>
Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org
[172.30.200.125])
by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 3920A14BD
for <patchwork-linux-arm@patchwork.kernel.org>;
Sun, 11 Nov 2018 20:26:49 +0000 (UTC)
Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1])
by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2BB86296F9
for <patchwork-linux-arm@patchwork.kernel.org>;
Sun, 11 Nov 2018 20:26:49 +0000 (UTC)
Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486)
id 201BB296FF; Sun, 11 Nov 2018 20:26:49 +0000 (UTC)
X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on
pdx-wl-mail.web.codeaurora.org
X-Spam-Level:
X-Spam-Status: No, score=-3.6 required=2.0 tests=BAYES_00,DKIM_SIGNED,
DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.1
Received: from bombadil.infradead.org (bombadil.infradead.org
[198.137.202.133])
(using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id CB68B296F9
for <patchwork-linux-arm@patchwork.kernel.org>;
Sun, 11 Nov 2018 20:26:48 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
d=lists.infradead.org; s=bombadil.20170209; h=Sender:
Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe:
List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References:
In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID:
Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc
:Resent-Message-ID:List-Owner;
bh=Tt5EgaFovmpaVblg1vCoUL5KFNHfoZnIbMjvuoDpH+A=; b=YkFJNA/0JeWm1W0agi1fs65bw4
MuaP5Xd9dNXoiUTsnX7DaDk+CMixGON/AQSwqrRmPptbNpeKcoQ2xx08c2EyKnpDYGfzQ/HhclUjO
ZNhvf7TNzQknjeJ00NlJBnp1PwS4Mj9YZsHHTzC8GdMwzQ1IsBTh7F+j4sDJfF78FjjC14+nCgrjS
RiFJhoPq/9ddurP5XoM0scxQ6AziagQA3OPOalJK16OvXnyjBnZoFATKWhJ4ZbShRh6nlQoynEgIj
5WWVXJYzjquyUo2NV0tTq2QO/LSzrYscljqgOp7Fuu2YJeAa2QMRbFddcqempXwT0DDHLnFEvJ9kM
9VcVHbzw==;
Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org)
by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux))
id 1gLwJh-0005jD-Dj; Sun, 11 Nov 2018 20:26:45 +0000
Received: from merlin.infradead.org ([2001:8b0:10b:1231::1])
by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux))
id 1gLwHw-0002cc-12; Sun, 11 Nov 2018 20:24:56 +0000
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
d=infradead.org; s=merlin.20170209; h=References:In-Reply-To:Message-Id:Date:
Subject:Cc:To:From:Sender:Reply-To:MIME-Version:Content-Type:
Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date:
Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id:
List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive;
bh=9cNmmn25bR2zeN1vbgdjE8/Y0JXpSDhSkPM5GZxTcOo=; b=mF/YFu0vAFm8Cr1Ty9Lek+w6Y
8FRR01cy8fLjmnnNz+SVBTeEx6C/eTg7Q8SLdeJR6ql3cIeepC0WkIWJnFUCdWJ7fDkL5686pgjS7
2+4K5o5D1t8yank/9kA464gHTrwO0u4FUse+XWEoSPiET3SmZXXsHAQkBgfzIh2gyckpB0wir7K6h
tY5UPKoEDSbOa7uFKvARA6LA+0p+LS3mrZMFPQedoC0Uir/fMY8YYdY2Pc+vMi2nPXQ9LJ0fQ1dSe
wqYoeLdrTYjWL2XRMPohx95JxWvxfmgEhxXIFm6RFJvO9WItczYLy90wYmLHBvv9vyVUTo+nsLmvK
/EjccIV6w==;
Received: from mout.kundenserver.de ([212.227.126.130])
by merlin.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux))
id 1gLwHt-0001en-8D; Sun, 11 Nov 2018 20:24:54 +0000
Received: from localhost.localdomain ([37.4.249.153]) by
mrelayeu.kundenserver.de (mreue012 [212.227.15.167]) with ESMTPSA (Nemesis)
id 1Mw9oq-1fWAVX1zBk-00s3Fm; Sun, 11 Nov 2018 21:24:31 +0100
From: Stefan Wahren <stefan.wahren@i2se.com>
To: Eric Anholt <eric@anholt.net>, Florian Fainelli <f.fainelli@gmail.com>,
Ulf Hansson <ulf.hansson@linaro.org>
Subject: [PATCH V2 3/7] mmc: bcm2835: Release DMA channel on driver unload
Date: Sun, 11 Nov 2018 21:23:55 +0100
Message-Id: <1541967839-2847-4-git-send-email-stefan.wahren@i2se.com>
X-Mailer: git-send-email 2.7.4
In-Reply-To: <1541967839-2847-1-git-send-email-stefan.wahren@i2se.com>
References: <1541967839-2847-1-git-send-email-stefan.wahren@i2se.com>
X-Provags-ID: V03:K1:vlovEOP4OCkjuj6JaOkYwfmgG3Bal1ftfBxnk4DH9YyAICNcm4/
BpDpxF7lig5Fm91zl9duBF8Z2zsadWWX/cwUNHvjuCQzK6hM1miYmPrje9c2so98xLmVH42
HbkSAtFcHSGlfkxFrEQpCHQq6PbLfHsRrCjnzfeVe04uliFFd5uM+615obhLT+kxiXePpJc
itTAXDImHIb6ZbKx/ZkrA==
X-UI-Out-Filterresults: notjunk:1;V01:K0:SzTlMsQfrIw=:CfsWr+obS+SWBvm2OG7mgE
HaKV29VvbZWHeGysa26FcFnpU/aMj/f1Gy1jD4K8dNbWm7JFhBgARL7w82/dLGaTZym+NfdIf
JejZEUwNxdLoJ2pl9V/bfXHUF+NpmE29dvPnKgjRwO9sNfSPkcGWIwbAQm/ZpwBet+X3duzf4
3adSNuB6XHBEOognFdCt37nQs+pw397+jTcb4ATjYcbgok5ftyg9PBBRivJdBXxY3nZeZagWL
CQgDJv3jE8CEh1BPz/+UOxgAiV4Qmm6pirXi4NJ75cuHyWmhJBlWTNLxv2ocWyMD5c/korqqf
D61K0VeaRoL1EfiZ2pzJ9T/Do4lOYybMUWDQmeEMVN8pS9hv14rn98GqoOKydOW3jpPa7pZeu
5sc8I2WO6wSk/VOaNclHgKHyeS+zmGMMRMweDF1bkrMKIh+rdxd+zGN54JEEI+/AWWJ5p4nNw
0ob2FknCr0jsNWv7JUc3tQkjTxSnXD0gG/bdvnl9BQUPGwz683hyzdM6Gk31NuSk7JU/NOnzr
M3s6ysweEdzDS+wPOU9UBk5GcSxcGdlqvBN600TVgpUtaC9dwjVMk3qEot2fSp17KAUsrUaGz
YZz7fpiyWVZzj7dgOGvQ+SgjTs/8s4rj++ONlTl2OUtmp9eDw+/bsmML5z4nvQ0oLxKIDKRML
RMzjm6bjLc9KE6PagbagQbLHzPLziYIEkpEZmThm3Mm5oyTsh0l+ZD2hVE5yDtWVcz4wnNwbV
J1DxWtcAdy8X6WtYT27Eh7LxL2C8YyVtMRL3whClSs0RyGv3s3oe+qwqKa0rjtQDSAjosT651
gj54/sr39E84c9qNWL2IQmKZJs8rw==
X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3
X-CRM114-CacheID: sfid-20181111_152453_636383_8A225C26
X-CRM114-Status: GOOD ( 10.02 )
X-BeenThere: linux-arm-kernel@lists.infradead.org
X-Mailman-Version: 2.1.21
Precedence: list
List-Id: <linux-arm-kernel.lists.infradead.org>
List-Unsubscribe:
<http://lists.infradead.org/mailman/options/linux-arm-kernel>,
<mailto:linux-arm-kernel-request@lists.infradead.org?subject=unsubscribe>
List-Archive: <http://lists.infradead.org/pipermail/linux-arm-kernel/>
List-Post: <mailto:linux-arm-kernel@lists.infradead.org>
List-Help: <mailto:linux-arm-kernel-request@lists.infradead.org?subject=help>
List-Subscribe:
<http://lists.infradead.org/mailman/listinfo/linux-arm-kernel>,
<mailto:linux-arm-kernel-request@lists.infradead.org?subject=subscribe>
Cc: Stefan Wahren <stefan.wahren@i2se.com>,
Phil Elwell <phil@raspberrypi.org>,
linux-mmc@vger.kernel.org, linux-rpi-kernel@lists.infradead.org,
Michal Suchanek <msuchanek@suse.de>, linux-arm-kernel@lists.infradead.org
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Sender: "linux-arm-kernel" <linux-arm-kernel-bounces@lists.infradead.org>
Errors-To:
linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org
X-Virus-Scanned: ClamAV using ClamSMTP
We need to release the slave DMA channel during driver unload.
Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
---
drivers/mmc/host/bcm2835.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/mmc/host/bcm2835.c b/drivers/mmc/host/bcm2835.c
index a251be2..45724ef 100644
--- a/drivers/mmc/host/bcm2835.c
+++ b/drivers/mmc/host/bcm2835.c
@@ -1457,6 +1457,9 @@ static int bcm2835_remove(struct platform_device *pdev)
cancel_work_sync(&host->dma_work);
cancel_delayed_work_sync(&host->timeout_work);
+ if (host->dma_chan_rxtx)
+ dma_release_channel(host->dma_chan_rxtx);
+
mmc_free_host(host->mmc);
platform_set_drvdata(pdev, NULL);
From patchwork Sun Nov 11 20:23:56 2018
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
X-Patchwork-Submitter: Stefan Wahren <stefan.wahren@i2se.com>
X-Patchwork-Id: 10677851
Return-Path:
<linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org>
Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org
[172.30.200.125])
by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 9E68D14BD
for <patchwork-linux-arm@patchwork.kernel.org>;
Sun, 11 Nov 2018 20:25:23 +0000 (UTC)
Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1])
by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 90CA42969C
for <patchwork-linux-arm@patchwork.kernel.org>;
Sun, 11 Nov 2018 20:25:23 +0000 (UTC)
Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486)
id 8516B296F9; Sun, 11 Nov 2018 20:25:23 +0000 (UTC)
X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on
pdx-wl-mail.web.codeaurora.org
X-Spam-Level:
X-Spam-Status: No, score=-3.6 required=2.0 tests=BAYES_00,DKIM_SIGNED,
DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.1
Received: from bombadil.infradead.org (bombadil.infradead.org
[198.137.202.133])
(using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 3A73F2969C
for <patchwork-linux-arm@patchwork.kernel.org>;
Sun, 11 Nov 2018 20:25:23 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
d=lists.infradead.org; s=bombadil.20170209; h=Sender:
Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe:
List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References:
In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID:
Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc
:Resent-Message-ID:List-Owner;
bh=w/Gzy1FdXFoZZY/Bdgo4ocm33xnvBLknyOEQrYDJjx8=; b=AnOOH/JlAJanb/zGv8Tbhr5LUU
zhx/OjHDpTA+1ZN4gwSeeDWVgEHvlQ5b700sWdpjiUYxzkXMAtqOBCK20C8Cz7VIX9OtfFjhm43QL
Xn2eIdUXsmnEjJ4vN+c2GJ200/15T1/0eGCESCALXHcN5dVIfQTEXzzhuCLfDTra0py+5hc8tXRiZ
VeEkvMwNwmyYOMh7qoN4/GtOx96Y+Swupzns5QIJnWRuyu4kcFPTRiRQI7vOLJb6ahc53c/VWEGn5
CQKE7XPssSzcb8TnIRBhX5ChXO5V5J7hV8I6Mo467mbYpK1W7LtEkplA2JhZKcRJ3PkFXIya3Plqp
gLf70yzQ==;
Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org)
by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux))
id 1gLwIE-0003TU-1P; Sun, 11 Nov 2018 20:25:14 +0000
Received: from casper.infradead.org ([2001:8b0:10b:1236::1])
by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux))
id 1gLwHv-0002cV-24; Sun, 11 Nov 2018 20:24:55 +0000
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
d=infradead.org; s=casper.20170209; h=References:In-Reply-To:Message-Id:Date:
Subject:Cc:To:From:Sender:Reply-To:MIME-Version:Content-Type:
Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date:
Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id:
List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive;
bh=zHxxLEQsiHEhh7PVXEVNqUUxYM7wDjcAIJtcwJyNRQo=; b=DOPYo4t1y5vxpvZmFdW6hMyoZ
pBOQEji74bYHR5OwkWKuoDPpZlQiQRU21mZwp08MZHufSo0j5CcZapSY9kRCb5KszFqO98vRCYDCW
XP8SZxnfZV1eZ8OEGp82f8cQzrGl2FOpjKZNP1KX+0w2ibjMqcqZHppwTME1L96PAqzdexyzWJdGd
ofA4EK/v+6FQohG4RSPQX465ZGIiui3r/C1O0WKGVim2eK+cE1wVK88X+rhHk1BoNRP/5MOpaX/v3
O51RexHgFZ+0YlkVQTCb/Zfgd93BZb5XL/ewyaDlkmVuqCpSWOgj5jgrSkad88yRtx9A29PIbzWdB
JahBPzjOA==;
Received: from mout.kundenserver.de ([212.227.126.187])
by casper.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux))
id 1gLwHr-000149-RY; Sun, 11 Nov 2018 20:24:53 +0000
Received: from localhost.localdomain ([37.4.249.153]) by
mrelayeu.kundenserver.de (mreue012 [212.227.15.167]) with ESMTPSA (Nemesis)
id 1MvsyF-1fX0UR1Q9v-00ssSz; Sun, 11 Nov 2018 21:24:32 +0100
From: Stefan Wahren <stefan.wahren@i2se.com>
To: Eric Anholt <eric@anholt.net>, Florian Fainelli <f.fainelli@gmail.com>,
Ulf Hansson <ulf.hansson@linaro.org>
Subject: [PATCH V2 4/7] mmc: bcm2835: Avoid possible races on data requests
Date: Sun, 11 Nov 2018 21:23:56 +0100
Message-Id: <1541967839-2847-5-git-send-email-stefan.wahren@i2se.com>
X-Mailer: git-send-email 2.7.4
In-Reply-To: <1541967839-2847-1-git-send-email-stefan.wahren@i2se.com>
References: <1541967839-2847-1-git-send-email-stefan.wahren@i2se.com>
X-Provags-ID: V03:K1:ZLc6V0DmkpQIP44hYwa3HseRh7CvRoA9oKdzKs8yIsk8165B4Wj
xh/v/qDrvpHbc6Mo7+ESlJoA7iV2QBpKIYXkV+l+LxP1hUGn0iO44fmLP2qBvLJtZvx/Ojh
06wOufM/u9ZWw0FVd6z87NbwhQC+r0Hdx+GWumlgWYq9lppFAMYe+6pIqLKFwesssADK3OS
0MJwlz/he/7bB9DxhEcnw==
X-UI-Out-Filterresults: notjunk:1;V01:K0:lLFqbCq1JEc=:4dOYlMJrif5X850MHJ4IKv
SsggGIkb+7xoay8mJWO2ixu2r0n0ZJp/p5GCqVWB8a8GEJ5AXj04izOlxindxB0yxAXLfOtEY
+MADRnLwkXLIyvJ52YOhbudb4v+KVS8LnZmdnl+7dYi8ILPPI8K1YyOA0Atm0Sc1zKCyzyrb+
HXYtIBmpCCeoXAn6iF9KtPShMQN90JkCkhQDCTtvuHKB4+XasgiJQqwLvDbMhUTfAiHKRbT6A
Ret67MCTcoBZMJ8Lv5IVe96pGyj6/IftFJwD456d201u/qlGUEcsrQlXoVDZyYQINncWlmCe9
nhfpQF8UozqPck8kat7pUYNcoUck660Ob7tS+eW6IQxtgNKjjkiaYgE0VlcnBWXS46anJouuq
rFWawTXHFsLU6SVpIIVC5wCmDIOpgnWg2E5Dg6O3JtD4JPpSw9V3hM8L34Ii6DfWsvPAlJ46O
kCFiB/zfxUDXTLqed/nM9eufpPmQGlkRVnwoBNh18c7patPv1MzAU94KuN0ciq4QgoPk400rI
5AOu/Eb9ck9CqDcZnI9x3PGjBoRgf0O/cvmqP67kgt1u17W9OEGaqHaEkXh+xLTDICpauVWMp
kOXBFyQ2SWK4jxt/C1uNgcghWG4r8UDxx9LFHZA0Ut2oGO2bW8qkpXlRBI11lvMuK3P+jSSXu
8ZdD0IA/lvl6PXMOo1Zs7F+mho7h8yoB6XvVBOO8Mh8VonIPfeFZAQOrF/WP5SI3te/r5jk8v
wI7Eoz+v7SK4TMhwvTrIv+Q6zGYykDWUFqpehDe/ZhMpdl/XnD0H+Z9jGWgv6Wyi6Rmwc2JEJ
6Xq84VFzxbb0yps5VJcK6at8C/JGA==
X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3
X-CRM114-CacheID: sfid-20181111_202451_956461_704341B1
X-CRM114-Status: GOOD ( 11.96 )
X-BeenThere: linux-arm-kernel@lists.infradead.org
X-Mailman-Version: 2.1.21
Precedence: list
List-Id: <linux-arm-kernel.lists.infradead.org>
List-Unsubscribe:
<http://lists.infradead.org/mailman/options/linux-arm-kernel>,
<mailto:linux-arm-kernel-request@lists.infradead.org?subject=unsubscribe>
List-Archive: <http://lists.infradead.org/pipermail/linux-arm-kernel/>
List-Post: <mailto:linux-arm-kernel@lists.infradead.org>
List-Help: <mailto:linux-arm-kernel-request@lists.infradead.org?subject=help>
List-Subscribe:
<http://lists.infradead.org/mailman/listinfo/linux-arm-kernel>,
<mailto:linux-arm-kernel-request@lists.infradead.org?subject=subscribe>
Cc: Stefan Wahren <stefan.wahren@i2se.com>,
Phil Elwell <phil@raspberrypi.org>,
linux-mmc@vger.kernel.org, linux-rpi-kernel@lists.infradead.org,
Michal Suchanek <msuchanek@suse.de>, linux-arm-kernel@lists.infradead.org
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Sender: "linux-arm-kernel" <linux-arm-kernel-bounces@lists.infradead.org>
Errors-To:
linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org
X-Virus-Scanned: ClamAV using ClamSMTP
There are two accesses on the data requests which are not protected by
the mutex. So fix this accordingly.
Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
---
drivers/mmc/host/bcm2835.c | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/drivers/mmc/host/bcm2835.c b/drivers/mmc/host/bcm2835.c
index 45724ef..1c60798 100644
--- a/drivers/mmc/host/bcm2835.c
+++ b/drivers/mmc/host/bcm2835.c
@@ -1064,10 +1064,12 @@ static void bcm2835_dma_complete_work(struct work_struct *work)
{
struct bcm2835_host *host =
container_of(work, struct bcm2835_host, dma_work);
- struct mmc_data *data = host->data;
+ struct mmc_data *data;
mutex_lock(&host->mutex);
+ data = host->data;
+
if (host->dma_chan) {
dma_unmap_sg(host->dma_chan->device->dev,
data->sg, data->sg_len,
@@ -1192,9 +1194,6 @@ static void bcm2835_request(struct mmc_host *mmc, struct mmc_request *mrq)
return;
}
- if (host->use_dma && mrq->data && (mrq->data->blocks > PIO_THRESHOLD))
- bcm2835_prepare_dma(host, mrq->data);
-
mutex_lock(&host->mutex);
WARN_ON(host->mrq);
@@ -1218,6 +1217,9 @@ static void bcm2835_request(struct mmc_host *mmc, struct mmc_request *mrq)
return;
}
+ if (host->use_dma && mrq->data && (mrq->data->blocks > PIO_THRESHOLD))
+ bcm2835_prepare_dma(host, mrq->data);
+
host->use_sbc = !!mrq->sbc && host->mrq->data &&
(host->mrq->data->flags & MMC_DATA_READ);
if (host->use_sbc) {
From patchwork Sun Nov 11 20:23:57 2018
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
X-Patchwork-Submitter: Stefan Wahren <stefan.wahren@i2se.com>
X-Patchwork-Id: 10677855
Return-Path:
<linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org>
Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org
[172.30.200.125])
by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id B72A114BD
for <patchwork-linux-arm@patchwork.kernel.org>;
Sun, 11 Nov 2018 20:25:55 +0000 (UTC)
Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1])
by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A8FBF2969C
for <patchwork-linux-arm@patchwork.kernel.org>;
Sun, 11 Nov 2018 20:25:55 +0000 (UTC)
Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486)
id 9BA4C296F9; Sun, 11 Nov 2018 20:25:55 +0000 (UTC)
X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on
pdx-wl-mail.web.codeaurora.org
X-Spam-Level:
X-Spam-Status: No, score=-3.6 required=2.0 tests=BAYES_00,DKIM_SIGNED,
DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.1
Received: from bombadil.infradead.org (bombadil.infradead.org
[198.137.202.133])
(using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 3E5132969C
for <patchwork-linux-arm@patchwork.kernel.org>;
Sun, 11 Nov 2018 20:25:55 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
d=lists.infradead.org; s=bombadil.20170209; h=Sender:
Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe:
List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References:
In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID:
Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc
:Resent-Message-ID:List-Owner;
bh=MrabV/LatQSzA8nWJUbmpw6Z66+qt6yLE3DwaiTeQME=; b=C6Tp4s3/ByUA6gEAyLZXReuA6C
id+fWgoxsQzr2ckrLAgv48ru1ay5ieY89k0dCyY21EmJ+7DdHsVtlf8AU/pp7zc2v8WXZVjGc0Wre
YFPO0X47D1Ph+jrOAJ4EldEXPIk7KudaNJMF85Kayhvj4ehjIH10qF4pNR/GnBs5K4TVn0fqm5wkL
qXh8X60lZ8wzc/1kwor55UBVg6KsCr9RWAKxqVzvsq18LS5kgCLj32wFbWPdHWqEYYdMktOZnA+TZ
3yAKeFvxhZStgwUorKa3+KsbHzV7DRegF+0oVmQTR7IDEwQ7bsAjkCLS8MlMcgIBJbaIm70mraboJ
vf7ML3xg==;
Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org)
by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux))
id 1gLwIk-0004lM-CU; Sun, 11 Nov 2018 20:25:46 +0000
Received: from merlin.infradead.org ([2001:8b0:10b:1231::1])
by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux))
id 1gLwHv-0002cW-I3; Sun, 11 Nov 2018 20:24:55 +0000
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
d=infradead.org; s=merlin.20170209; h=References:In-Reply-To:Message-Id:Date:
Subject:Cc:To:From:Sender:Reply-To:MIME-Version:Content-Type:
Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date:
Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id:
List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive;
bh=Mk5UAGVXcnL2nHBZi5EjPPjTnNXOrWMlTyZHVyM9yOc=; b=b2656ew26XY6iOFE1AUGP51qB
FsWiQqitmJrrBacXDcwxx4b77oSYgvwb2wnBa7LE5GPdb48OBeCpb++0pRdU6LH1mLGY75l+SJkTE
fuEGG9nI+c7ylMsmuHzyIug+IcRMttr9Rv+lguVfxj+05E3Mug1Yjde0yV4DeeaDQcrcBW+cDxPD+
zBUTdh155DbVSr//DRSSJT3w5iirXL6DmNZX9aH6RIz8prxs5PBfYuAKmZD3JkHHBosP2MuOzyfCN
UW3Jmr2T/p8nGj4c5ZgHVcwtYTZ8zbEVSNSshLyLCmRvAvbWw9R7i04nOAZFMDwJ+nJrAOzc4JEyR
Bd0redZPw==;
Received: from mout.kundenserver.de ([212.227.126.133])
by merlin.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux))
id 1gLwHs-0001ej-CS; Sun, 11 Nov 2018 20:24:53 +0000
Received: from localhost.localdomain ([37.4.249.153]) by
mrelayeu.kundenserver.de (mreue012 [212.227.15.167]) with ESMTPSA (Nemesis)
id 1MMY9X-1g6LF00fdn-00JXiP; Sun, 11 Nov 2018 21:24:33 +0100
From: Stefan Wahren <stefan.wahren@i2se.com>
To: Eric Anholt <eric@anholt.net>, Florian Fainelli <f.fainelli@gmail.com>,
Ulf Hansson <ulf.hansson@linaro.org>
Subject: [PATCH V2 5/7] mmc: bcm2835: Terminate timeout work synchronously
Date: Sun, 11 Nov 2018 21:23:57 +0100
Message-Id: <1541967839-2847-6-git-send-email-stefan.wahren@i2se.com>
X-Mailer: git-send-email 2.7.4
In-Reply-To: <1541967839-2847-1-git-send-email-stefan.wahren@i2se.com>
References: <1541967839-2847-1-git-send-email-stefan.wahren@i2se.com>
X-Provags-ID: V03:K1:qNd5m8hilSIHpAhx5FhJUiaXDU7SU8xPGLPlkrJoWXv/UllNu+f
Z6MfgrWvjWpqxWfwowcV/8ImoMmyMh4JRxG2YbMxQXqKPs3IgT+uHUy/D8FHMMViil6gbjf
tQPTiuVKuzVualYbGsrj61hk9tmirGv3Idxmj6a5LmZWyqtBs+N/8+IESPXYZMMNePlqxh4
Dqnr1Ar9jhW2oYDHZeh4A==
X-UI-Out-Filterresults: notjunk:1;V01:K0:lvp7zKY2iuQ=:cBGp0NsOhdh4ZLCUkdL5pd
uZpSd0EXrWC/HNHCOrfgI5jErdtk8h8bAwHGFF9C12HB/cUTzhg8wPJL9Xy0yp40Hs6nh6qll
nIxKPiI2SHgGyMJojMc+SCNU4d0lbz36f5Eh2YngDbtaLgefteqUbZpEuWXdA5NHOoMAYj5GA
U7askfAl7jnbS6fpM/9Fr50J+y5g2WFb7g6Fb60eEWTi7qouSNuq/IsrOBhrOT1tgwZD3Tjxc
eCiIOvl8/12erXTfgm0ld79P12beE0yt8px7lBlfmStsDN2xbDUTVH8H9zhn34lSWULZ/oYvB
3B/areZj3M0dZCZCRghHQ+/H9RLNAbWOai7+H5GS3Uf9RqKrw9aaFmoTuSEbdma2a3I5N+/W0
Wm+CxBBaV9fdVveQggOChcuux8o+VuyD1rEAE+25VrkUbsKntB+EVRkUUbnCG84nOx3JxnQ9q
aUnhYzwvOZecim21D5c60r/iU304m4B7jNCzfLmW1LWjLRyqJOaR7iwZQq7D+wBFKHiJLLsSj
ecNx1ABuG5R7WWdp1fC717kyGF0LrB6D4Z6t+Sv8jJhpQaEXVvti+oeKsNkydEekDki5paUFn
d1V91g9p1g4VRyPDDin4g5ZjvBEG5MxJbL84GTRzesrCj0QthiZp6Il75PHRbXdgXXPg7RdzA
lnIcwMWrcb7sBYl9phazVWbZu4I2V+FSEMbvxVQ/Bc0K1p3pQ22LpI99JhQ178HMQvbPD6bJC
4ZIfHltA0+uOLgTG5XlOf8q+ra/Qfb1BzFhSsTv0nxcqcl1nqMFKGcG1mxVGJxSQhj7SyZkDC
ZNz0RUD94sGnsvkbhrtAMV7E/sbeQ==
X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3
X-CRM114-CacheID: sfid-20181111_152452_685437_9729AF90
X-CRM114-Status: GOOD ( 11.39 )
X-BeenThere: linux-arm-kernel@lists.infradead.org
X-Mailman-Version: 2.1.21
Precedence: list
List-Id: <linux-arm-kernel.lists.infradead.org>
List-Unsubscribe:
<http://lists.infradead.org/mailman/options/linux-arm-kernel>,
<mailto:linux-arm-kernel-request@lists.infradead.org?subject=unsubscribe>
List-Archive: <http://lists.infradead.org/pipermail/linux-arm-kernel/>
List-Post: <mailto:linux-arm-kernel@lists.infradead.org>
List-Help: <mailto:linux-arm-kernel-request@lists.infradead.org?subject=help>
List-Subscribe:
<http://lists.infradead.org/mailman/listinfo/linux-arm-kernel>,
<mailto:linux-arm-kernel-request@lists.infradead.org?subject=subscribe>
Cc: Stefan Wahren <stefan.wahren@i2se.com>,
Phil Elwell <phil@raspberrypi.org>,
linux-mmc@vger.kernel.org, linux-rpi-kernel@lists.infradead.org,
Michal Suchanek <msuchanek@suse.de>, linux-arm-kernel@lists.infradead.org
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Sender: "linux-arm-kernel" <linux-arm-kernel-bounces@lists.infradead.org>
Errors-To:
linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org
X-Virus-Scanned: ClamAV using ClamSMTP
It's better to make sure that the timeout work is really terminated
before calling mmc_request_done.
Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
---
drivers/mmc/host/bcm2835.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/mmc/host/bcm2835.c b/drivers/mmc/host/bcm2835.c
index 1c60798..2c7589f 100644
--- a/drivers/mmc/host/bcm2835.c
+++ b/drivers/mmc/host/bcm2835.c
@@ -608,7 +608,7 @@ static void bcm2835_finish_request(struct bcm2835_host *host)
struct dma_chan *terminate_chan = NULL;
struct mmc_request *mrq;
- cancel_delayed_work(&host->timeout_work);
+ cancel_delayed_work_sync(&host->timeout_work);
mrq = host->mrq;
From patchwork Sun Nov 11 20:23:58 2018
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
X-Patchwork-Submitter: Stefan Wahren <stefan.wahren@i2se.com>
X-Patchwork-Id: 10677853
Return-Path:
<linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org>
Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org
[172.30.200.125])
by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id B8F61139B
for <patchwork-linux-arm@patchwork.kernel.org>;
Sun, 11 Nov 2018 20:25:31 +0000 (UTC)
Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1])
by mail.wl.linuxfoundation.org (Postfix) with ESMTP id ABACE2969C
for <patchwork-linux-arm@patchwork.kernel.org>;
Sun, 11 Nov 2018 20:25:31 +0000 (UTC)
Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486)
id 9FBC6296F9; Sun, 11 Nov 2018 20:25:31 +0000 (UTC)
X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on
pdx-wl-mail.web.codeaurora.org
X-Spam-Level:
X-Spam-Status: No, score=-3.6 required=2.0 tests=BAYES_00,DKIM_SIGNED,
DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.1
Received: from bombadil.infradead.org (bombadil.infradead.org
[198.137.202.133])
(using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 4A58B2969C
for <patchwork-linux-arm@patchwork.kernel.org>;
Sun, 11 Nov 2018 20:25:31 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
d=lists.infradead.org; s=bombadil.20170209; h=Sender:
Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe:
List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References:
In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID:
Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc
:Resent-Message-ID:List-Owner;
bh=hLouXFNypHlFaQAINMwgzkBeirVP1RY0gAHWHAnuLpo=; b=rmTlZsugtWGOssKkbRRBUkkaMC
1KnpesZRiXcQ3pdco/0rDLTQmYxTCEUjV4xsBFaLiaoMeezFdRRBXGZeSPhk38338Y976XJ4cVMz2
XEbMflV3FhK8eHtirh7evoVdHR93K8s2TnFG5umUjZP9CNK6jB1uaKvNeOQt7ysjNFYI/o6mSAWQ8
96SikljKpBqFYT7sfjGMWWxEneZVIcw0uQMa+gaOxVIiXtG4BrxHOs3Fw9RjRuZ5eKEU1p3gCQVbu
XbZW1eUFOHav2KoX7nPYCjHgWhH6YwMTgEBBAnxobbfRHrCEpD9qTd5jujkCLDGdlUfcIs0x0gwMY
NVzKWO6w==;
Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org)
by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux))
id 1gLwIR-0004Ov-6u; Sun, 11 Nov 2018 20:25:27 +0000
Received: from merlin.infradead.org ([2001:8b0:10b:1231::1])
by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux))
id 1gLwHv-0002cX-I3; Sun, 11 Nov 2018 20:24:55 +0000
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
d=infradead.org; s=merlin.20170209; h=References:In-Reply-To:Message-Id:Date:
Subject:Cc:To:From:Sender:Reply-To:MIME-Version:Content-Type:
Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date:
Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id:
List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive;
bh=EGvrhwUaJ7ExcJvbLK8/AQ0rd/CXDt+a3em7ick8oO0=; b=hfLWj/nwTsxPLUALv1QKEYerW
kjTYzuw+nLWWi3Jmk4P9vRYMn7+DaGgrbi72/tY2ByngSSImu0PrCS8lm9Ptuq6yXd6tYsNVfzM2v
rmYwqdSBQg1JTzAY2Z9nFvV3PB1XFF36Lt1oFlkORRtQJSII2YZBaRJeyhjLpTqzBUwi4KgcWj56K
R6ymka+uGJPQ+KHwaOaS67glzE2ADOBMchS7gZu6WtPJEtwU5d7FMyWWPFV7PM4wKFS5Mkk59+9ee
hj7e7Zi/7YhnCEfVfZf7C6h6ejiW9YdnMadgdZttuh9DdLGUYVyGszdcNAwmEbpJUSvqM0MxYOBG7
/ZftqWKLA==;
Received: from mout.kundenserver.de ([212.227.126.130])
by merlin.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux))
id 1gLwHs-0001em-CO; Sun, 11 Nov 2018 20:24:53 +0000
Received: from localhost.localdomain ([37.4.249.153]) by
mrelayeu.kundenserver.de (mreue012 [212.227.15.167]) with ESMTPSA (Nemesis)
id 1MvsyF-1fX0UQ3835-00ssSz; Sun, 11 Nov 2018 21:24:33 +0100
From: Stefan Wahren <stefan.wahren@i2se.com>
To: Eric Anholt <eric@anholt.net>, Florian Fainelli <f.fainelli@gmail.com>,
Ulf Hansson <ulf.hansson@linaro.org>
Subject: [PATCH V2 6/7] mmc: bcm2835: Refactor dma_map_sg handling
Date: Sun, 11 Nov 2018 21:23:58 +0100
Message-Id: <1541967839-2847-7-git-send-email-stefan.wahren@i2se.com>
X-Mailer: git-send-email 2.7.4
In-Reply-To: <1541967839-2847-1-git-send-email-stefan.wahren@i2se.com>
References: <1541967839-2847-1-git-send-email-stefan.wahren@i2se.com>
X-Provags-ID: V03:K1:Sla5WKzJYGbilks4eIirHiMlx29aYsbN7KwNBzyZekQFCAy53V8
1SG4Lh3Be8yGw2tWhcGIWU4+p6Ui+o/TdYr+msz83Y0Sz252M6RAloy6wfmI9j/ONOhpARN
+Df5870IhZ0IcFsZwP4UNPyitLHHEtB7F0h3fH1ljMmy4qfxVgId5TqXkESoEci3lMhK7jI
tJt2agPN6ETkDIC1k0S1Q==
X-UI-Out-Filterresults: notjunk:1;V01:K0:SUFly36V7h8=:Vbqq6FwnjjUoAgvV8E+dwd
bvly0MobT7aTFxA6S7rJV76JrzK5Re4JsOiUl+7WNjHC+DT2hjNquy1oxd711UcXEAOqmPFAy
OJDhIHqS7UAkipQ25kMVV+BUFSDtsYwZhfhJUWMjETSgSOajgeWoTywu70K5P4OAAASvrVwUb
5TED1Vlj0n4fcrmLZdSEpborCiHk3YNdLhHxo7AG1BES3nZGoIOGVdoJ46ueOSmNZlp0owl9C
M6Ojk98PRUoV+3jn1od8MDRUazJRG187IGTG+1VZESWHn7IZveLNLhDzy9+pchAhovgwQnFhL
7cEt1VIJEk2QWc/pp3PrNUoQCHOI5lull8+TfBIrkPFQShcmEsXvtJ6xW70m7LKvLB1hQyGue
51kaIx86/7KW5bKnONR8GsPRhAaPWpNwJGk0sl8QgnahjcjoSc5V1pcb41Zxsikmxh/zy3bUA
93kQOzW2tjR1yw/Ppz+A2pvnad6QRY2pxB6+t2MJdrZTc4LZGCE7kTqYpoV40uPFTb9VNxhJK
fhNmDEgLBtlKz7usJIQXHfrsvC/0r0Efs194mqEs0U8S5C/ip+SYxzdNqy7950R3erQQJ4ABy
87xgLsDdOxe4m9f0ncvU1pd6Ys03Hw9vN4IKH11GptHYaTkZeCF5YTS6I+rIjI+6s8cB5AUV+
ZdjGUkrqxgkOsWgD1WRTl0+ejxE6GWxX+gsLRlzis74GhO5+V2G/x5/A9oPGp5YsT9ZzqWRb4
qP502rMnCPihAEgYTtgKeezNgBny3yQT+LvwXEj4gaeiyNOn/d7082ZRkf0TNexaK77RI3zqH
C4R9zEnu6vgo7DndG6z+zIAO1Ihxg==
X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3
X-CRM114-CacheID: sfid-20181111_152452_682340_CD00EDF2
X-CRM114-Status: GOOD ( 12.64 )
X-BeenThere: linux-arm-kernel@lists.infradead.org
X-Mailman-Version: 2.1.21
Precedence: list
List-Id: <linux-arm-kernel.lists.infradead.org>
List-Unsubscribe:
<http://lists.infradead.org/mailman/options/linux-arm-kernel>,
<mailto:linux-arm-kernel-request@lists.infradead.org?subject=unsubscribe>
List-Archive: <http://lists.infradead.org/pipermail/linux-arm-kernel/>
List-Post: <mailto:linux-arm-kernel@lists.infradead.org>
List-Help: <mailto:linux-arm-kernel-request@lists.infradead.org?subject=help>
List-Subscribe:
<http://lists.infradead.org/mailman/listinfo/linux-arm-kernel>,
<mailto:linux-arm-kernel-request@lists.infradead.org?subject=subscribe>
Cc: Stefan Wahren <stefan.wahren@i2se.com>,
Phil Elwell <phil@raspberrypi.org>,
linux-mmc@vger.kernel.org, linux-rpi-kernel@lists.infradead.org,
Michal Suchanek <msuchanek@suse.de>, linux-arm-kernel@lists.infradead.org
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Sender: "linux-arm-kernel" <linux-arm-kernel-bounces@lists.infradead.org>
Errors-To:
linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org
X-Virus-Scanned: ClamAV using ClamSMTP
There are two variables len within bcm2835_prepare_dma. So rename the result
of dma_map_sg to sg_len. While we are at this add a bail out to simplify the
following change.
Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
---
drivers/mmc/host/bcm2835.c | 16 +++++++---------
1 file changed, 7 insertions(+), 9 deletions(-)
diff --git a/drivers/mmc/host/bcm2835.c b/drivers/mmc/host/bcm2835.c
index 2c7589f..c42bdaa 100644
--- a/drivers/mmc/host/bcm2835.c
+++ b/drivers/mmc/host/bcm2835.c
@@ -464,7 +464,7 @@ static void bcm2835_transfer_pio(struct bcm2835_host *host)
static
void bcm2835_prepare_dma(struct bcm2835_host *host, struct mmc_data *data)
{
- int len, dir_data, dir_slave;
+ int sg_len, dir_data, dir_slave;
struct dma_async_tx_descriptor *desc = NULL;
struct dma_chan *dma_chan;
@@ -510,15 +510,13 @@ void bcm2835_prepare_dma(struct bcm2835_host *host, struct mmc_data *data)
&host->dma_cfg_rx :
&host->dma_cfg_tx);
- len = dma_map_sg(dma_chan->device->dev, data->sg, data->sg_len,
- dir_data);
+ sg_len = dma_map_sg(dma_chan->device->dev, data->sg, data->sg_len,
+ dir_data);
+ if (!sg_len)
+ return;
- if (len > 0) {
- desc = dmaengine_prep_slave_sg(dma_chan, data->sg,
- len, dir_slave,
- DMA_PREP_INTERRUPT |
- DMA_CTRL_ACK);
- }
+ desc = dmaengine_prep_slave_sg(dma_chan, data->sg, sg_len, dir_slave,
+ DMA_PREP_INTERRUPT | DMA_CTRL_ACK);
if (desc) {
desc->callback = bcm2835_dma_complete;
From patchwork Sun Nov 11 20:23:59 2018
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
X-Patchwork-Submitter: Stefan Wahren <stefan.wahren@i2se.com>
X-Patchwork-Id: 10677863
Return-Path:
<linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org>
Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org
[172.30.200.125])
by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 3D4A8139B
for <patchwork-linux-arm@patchwork.kernel.org>;
Sun, 11 Nov 2018 20:27:08 +0000 (UTC)
Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1])
by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2EABA296EB
for <patchwork-linux-arm@patchwork.kernel.org>;
Sun, 11 Nov 2018 20:27:08 +0000 (UTC)
Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486)
id 1FAB5296FF; Sun, 11 Nov 2018 20:27:08 +0000 (UTC)
X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on
pdx-wl-mail.web.codeaurora.org
X-Spam-Level:
X-Spam-Status: No, score=-3.6 required=2.0 tests=BAYES_00,DKIM_SIGNED,
DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.1
Received: from bombadil.infradead.org (bombadil.infradead.org
[198.137.202.133])
(using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id C63FC296EB
for <patchwork-linux-arm@patchwork.kernel.org>;
Sun, 11 Nov 2018 20:27:07 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
d=lists.infradead.org; s=bombadil.20170209; h=Sender:
Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe:
List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References:
In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID:
Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc
:Resent-Message-ID:List-Owner;
bh=w0gGu0RhdppnbHj+KC4eiYbqQi5jIFFj1vOCHvG7izk=; b=tSzVsJXA7bK2/gIIVp574/SFNR
BgvzhxZLA/OEkfPjbtzn6g7PhFHNYCY2tQT1NfP01NxDvDzgZB5TEcCqtrdjkJY0i0hpHS4Ex0SKr
oIYr7vZFZc3vcWcO/KC3Kmo+a6lT7nBNDddf/cXDJPS/+jOqm/QCf5ho2YvSATxAnxwgnSi60ZaUO
pr/6gai+PjYKpQFZOL6myQ0sWfTTlc1l2KdBGjXV/FLp6EVuwbVOO3xUNJ1ZRnY8Ku/4Hq7tVTYWO
oO45AJ1T+qe7lz9G/rfVbqXsnK8JZyhgubhZJXPRWAvoOGj1HIYGAwyOM4bKBfJn6LnKp6+bosthz
AN9aGK6g==;
Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org)
by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux))
id 1gLwK1-00061u-1u; Sun, 11 Nov 2018 20:27:05 +0000
Received: from merlin.infradead.org ([2001:8b0:10b:1231::1])
by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux))
id 1gLwHw-0002d9-OE; Sun, 11 Nov 2018 20:24:56 +0000
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
d=infradead.org; s=merlin.20170209; h=References:In-Reply-To:Message-Id:Date:
Subject:Cc:To:From:Sender:Reply-To:MIME-Version:Content-Type:
Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date:
Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id:
List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive;
bh=6Y3NNECHfTEnbE17TZ4lEpf9LD6uJsc6TH5WZfUfuzk=; b=HvhoptR8U2ubhwrWMzaTVnGQy
II2zx46KApZRWsxtYONLMA5cwNuCa0IlO7pyZ2xzkmkvg3l9zY9tw0FIFvHHLhMUBT2QfLdXX47QA
4IwFzcW0ZPkm1/jCaDHb+fjCb+4AHHBAae4C6MrN7+a6ykIfhqgPkEfTtZGdhAnxrTbMDTMhgqs3I
bSMEifAlxhV0ZMu8SNVAZNB1lgRsdsdgdcBY/t248mQgHc6o2D2ibCGnSYHMy8xjLjNIN2UHatXZf
O+ebwk3ljy5b6FcEOHgg0bOh3eTwjGlbh9jR06jAx95wa7gOJG7bJO2mLb1Q0TEg4O/jdMmSzmKZf
bnQ+8cx4A==;
Received: from mout.kundenserver.de ([212.227.126.135])
by merlin.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux))
id 1gLwHt-0001eo-Ny; Sun, 11 Nov 2018 20:24:54 +0000
Received: from localhost.localdomain ([37.4.249.153]) by
mrelayeu.kundenserver.de (mreue012 [212.227.15.167]) with ESMTPSA (Nemesis)
id 1Mw9oq-1fWB8w1OlA-00s3Fm; Sun, 11 Nov 2018 21:24:34 +0100
From: Stefan Wahren <stefan.wahren@i2se.com>
To: Eric Anholt <eric@anholt.net>, Florian Fainelli <f.fainelli@gmail.com>,
Ulf Hansson <ulf.hansson@linaro.org>
Subject: [PATCH V2 7/7] mmc: bcm2835: Properly handle dmaengine_prep_slave_sg
Date: Sun, 11 Nov 2018 21:23:59 +0100
Message-Id: <1541967839-2847-8-git-send-email-stefan.wahren@i2se.com>
X-Mailer: git-send-email 2.7.4
In-Reply-To: <1541967839-2847-1-git-send-email-stefan.wahren@i2se.com>
References: <1541967839-2847-1-git-send-email-stefan.wahren@i2se.com>
X-Provags-ID: V03:K1:YHuOF9ODbnoju/fZ6GEvx8dgsERlCPgAFKTWXLdnneRYXz5Rrwv
HmNp+EMMG4LCQ6yrw9geiQ8UMaSlKRlOogmYpjlT6+acj6AvpUhfV/V/QTZoIqWymmOLu00
ilWzNp6sUh0G36dYFqNQx/xxoevvSshDkQfngYwW4IylOJ5Ijw4q7mUNQJel0aDdT6VxcCF
vNXPaH6x5aju6BnVQQTZw==
X-UI-Out-Filterresults: notjunk:1;V01:K0:F8RnfZXOXFg=:/o9BXYY1XlPda36fnQR3pw
exiC7Lebj6iLmcKcGV1N+gYxVKa++UCwnlYE52iQ3aEq2FFOYc9MIGfKSXztp6aQJLMEcJ+Nl
Y6IvfEO9Wre/kOJHLSbnLgi5rdaSTR4mjKUA8jP7+hgmHvgkSbKeQPPA9NbLPN9j2p/jPQt6j
wWducLkOGSbZ5YW28XqMqKiEgyxjt72W7Ulgwt1l9fzu67fxmhDdc3UWHpofqHuJQ3dTz7iyH
kgg+rS8NAKZBCtm6dFRPHs5TFa1D75bGQE9WbGv828i+/KNpsIoAbBRLLRmeGAoFn+KRil/PA
2NEyeFtr8QO/DsyVQUofQeZgtDmWXquT6il4a9R21nFM8UVN72Lt47MR7dQIKfjtCewO1XhKp
aCAhoeqoKuI++NlYUmTAzwHyR1AzSqbz3qFLL669z219gmvjFFlmzCiNNQuixrhw3CvbXxywa
F8FFVxEdPJRjt5v5xsfEQ9kWNm/UneKmSuw+sOIM6NjTYMbCxUA8s/SReuQtco4vZ5fMk2a0E
H6WbLHlCpPoxm6106p29jhQ1MkQBcRRc/Gnr283sXcshS2idax1s/BXgEYWoqn1IXoSipmSRS
uO7fLBnuonw9uYoUm30LeVzea9BSFsXSJQUAXYoj0FC51hOHYQG6yaC1EoGnL13niwbOV1w3V
t7MsLAFqvse4jRXAQ2daRMVsoFeXyREOFlyM2u0kJ7SlglZ7O0HJNvOHJsOTEJBUDsCQQskjd
UPyZ9p8NHWMKpnE18BgSypX/UwcNIarGvkM8pe6BN+IN6YbM+3leikxVVZ7pD64qCCITVHvjt
SkzE3mpbb2hZZ/3vD8VryvQAJ4A0Q==
X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3
X-CRM114-CacheID: sfid-20181111_152453_987059_DF242521
X-CRM114-Status: GOOD ( 10.37 )
X-BeenThere: linux-arm-kernel@lists.infradead.org
X-Mailman-Version: 2.1.21
Precedence: list
List-Id: <linux-arm-kernel.lists.infradead.org>
List-Unsubscribe:
<http://lists.infradead.org/mailman/options/linux-arm-kernel>,
<mailto:linux-arm-kernel-request@lists.infradead.org?subject=unsubscribe>
List-Archive: <http://lists.infradead.org/pipermail/linux-arm-kernel/>
List-Post: <mailto:linux-arm-kernel@lists.infradead.org>
List-Help: <mailto:linux-arm-kernel-request@lists.infradead.org?subject=help>
List-Subscribe:
<http://lists.infradead.org/mailman/listinfo/linux-arm-kernel>,
<mailto:linux-arm-kernel-request@lists.infradead.org?subject=subscribe>
Cc: Stefan Wahren <stefan.wahren@i2se.com>,
Phil Elwell <phil@raspberrypi.org>,
linux-mmc@vger.kernel.org, linux-rpi-kernel@lists.infradead.org,
Michal Suchanek <msuchanek@suse.de>, linux-arm-kernel@lists.infradead.org
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Sender: "linux-arm-kernel" <linux-arm-kernel-bounces@lists.infradead.org>
Errors-To:
linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org
X-Virus-Scanned: ClamAV using ClamSMTP
In case dmaengine_prep_slave_sg fails we need to call dma_unmap_sg.
Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
Acked-by: Eric Anholt <eric@anholt.net>
---
drivers/mmc/host/bcm2835.c | 15 +++++++++------
1 file changed, 9 insertions(+), 6 deletions(-)
diff --git a/drivers/mmc/host/bcm2835.c b/drivers/mmc/host/bcm2835.c
index c42bdaa..82e4b08 100644
--- a/drivers/mmc/host/bcm2835.c
+++ b/drivers/mmc/host/bcm2835.c
@@ -518,13 +518,16 @@ void bcm2835_prepare_dma(struct bcm2835_host *host, struct mmc_data *data)
desc = dmaengine_prep_slave_sg(dma_chan, data->sg, sg_len, dir_slave,
DMA_PREP_INTERRUPT | DMA_CTRL_ACK);
- if (desc) {
- desc->callback = bcm2835_dma_complete;
- desc->callback_param = host;
- host->dma_desc = desc;
- host->dma_chan = dma_chan;
- host->dma_dir = dir_data;
+ if (!desc) {
+ dma_unmap_sg(dma_chan->device->dev, data->sg, sg_len, dir_data);
+ return;
}
+
+ desc->callback = bcm2835_dma_complete;
+ desc->callback_param = host;
+ host->dma_desc = desc;
+ host->dma_chan = dma_chan;
+ host->dma_dir = dir_data;
}
static void bcm2835_start_dma(struct bcm2835_host *host)

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,630 @@
From patchwork Mon Sep 17 08:22:22 2018
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
X-Patchwork-Submitter: Phil Elwell <phil@raspberrypi.org>
X-Patchwork-Id: 10602175
Return-Path:
<linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org>
Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org
[172.30.200.125])
by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 25D5E1508
for <patchwork-linux-arm@patchwork.kernel.org>;
Mon, 17 Sep 2018 08:24:30 +0000 (UTC)
Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1])
by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 16B1D26256
for <patchwork-linux-arm@patchwork.kernel.org>;
Mon, 17 Sep 2018 08:24:30 +0000 (UTC)
Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486)
id 0AA1627F86; Mon, 17 Sep 2018 08:24:30 +0000 (UTC)
X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on
pdx-wl-mail.web.codeaurora.org
X-Spam-Level:
X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00,DKIM_SIGNED,
DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1
Received: from bombadil.infradead.org (bombadil.infradead.org
[198.137.202.133])
(using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 8457326256
for <patchwork-linux-arm@patchwork.kernel.org>;
Mon, 17 Sep 2018 08:24:29 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
d=lists.infradead.org; s=bombadil.20170209; h=Sender:
Content-Transfer-Encoding:Content-Type:MIME-Version:List-Subscribe:List-Help:
List-Post:List-Archive:List-Unsubscribe:List-Id:References:In-Reply-To:
Message-Id:Date:Subject:To:From:Reply-To:Cc:Content-ID:Content-Description:
Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:
List-Owner; bh=hI/rkOHYLw6EFdgFyOZP5dMv2/ZTgGadMbPyZJmLpTc=; b=eZHlangjy/aXd9
xXj4Z+LS7RpoPK1fkoc37gkSBmRem5J0cSGe991FI/y452vB6mqT7ufhiTvGIeEmWU8A6cLGRABQP
fF4tvI39ztdvL2mHtLdNC9JRvYtw4haVuS5/LpkOoRCb5+ASym0RhvhxRCNVHAQLkg63aHTmHxU/P
uxSfy8T9cJwM8xXEQf8t6o88URzbsLQpXak2x6RRD5gdMWl2qIRCGuM8aLcVRVWdW2X8Zgom/L8Md
DAqYno1/RLlowIplhQvoSfTgoT+If2IZF3aYXp7neKn/ztdpZ+Usk8z3R4LyQvpG/NS8/LNRDkOez
MJhH2HBomJzgPwW4yiyw==;
Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org)
by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux))
id 1g1opO-0005xT-Iz; Mon, 17 Sep 2018 08:24:18 +0000
Received: from merlin.infradead.org ([2001:8b0:10b:1231::1])
by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux))
id 1g1ooJ-0005Wn-90
for linux-arm-kernel@bombadil.infradead.org; Mon, 17 Sep 2018 08:23:11 +0000
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
d=infradead.org; s=merlin.20170209; h=References:In-Reply-To:Message-Id:Date:
Subject:To:From:Sender:Reply-To:Cc:MIME-Version:Content-Type:
Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date:
Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id:
List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive;
bh=709kHRsgmnXd9YV1xoNMc1/aV4Xi/GYEdBYatqJnxII=; b=3Fh7sAF30uEjFVIokmsPp9aFa
dnvHs47JPnGnrZ6drQ65LjwPaLp7mZWUnnLRsx8NCIJXbG8ja4rz7ubFLekczmXpMp7kx+vp4GLX+
MQZ6Fkd8khgYkVyWVZJwvZXyjMJCLU40cSfPH+rwj2aE4Bsjkrm3gyYqTucdIaWGrmIKEddpvvUoj
gijSvNPe4wZ6F3B/OxGyQwY68rQ8e16MWFdQvF+m8r6hAzk1PjQfgh1U22DXRea5oDFVVfV8uFGPF
Mt87EyYei0srCrhHGpb1PeHXO4n7UkdGrKHItd7RQfQn9B29yw6yQMSMaEo9zTbpf7a9OgKbJ/jMB
jVfQIRXhg==;
Received: from mx07-00252a01.pphosted.com ([62.209.51.214])
by merlin.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux))
id 1g1ooA-0001aP-0d
for linux-arm-kernel@lists.infradead.org; Mon, 17 Sep 2018 08:23:06 +0000
Received: from pps.filterd (m0102628.ppops.net [127.0.0.1])
by mx07-00252a01.pphosted.com (8.16.0.23/8.16.0.23) with SMTP id
w8H8MU0C024133
for <linux-arm-kernel@lists.infradead.org>; Mon, 17 Sep 2018 09:22:43 +0100
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=raspberrypi.org;
h=from : to :
subject : date : message-id : in-reply-to : references; s=pp;
bh=709kHRsgmnXd9YV1xoNMc1/aV4Xi/GYEdBYatqJnxII=;
b=Xy9adKj2YJ9erCG8FVPBExmDtGihy6MDZ/iSf4J3SdOeXy+Tqf4iDg6DBLJrc17+DYOk
G7CpjQSLgraxnF1YGiBjgk7pOimnv39woGoyX6fVY97L4t3lDbf4qdMx5siW/3Wfb4BU
jZE1OTowh/4aV9sVCdmLLieaS2SnQWrTI5QW6RGOSZzrSdNfSsEi7T0w0PH8jfIpleHP
2o/WRY6P/3U12dgkEOk4dEejQTGAopzYJl9ZJkUZoFXMMimrgxn/J86Eh/Cd7hs4AOrb
xFl1QVFffBgVvD4oE094vl/C9gV0F3HHfRc5pTHAvAbXOzLJYQMHkX9c/zXfJ3J/Xgha kQ==
Received: from mail-wr1-f72.google.com (mail-wr1-f72.google.com
[209.85.221.72])
by mx07-00252a01.pphosted.com with ESMTP id 2mgw8f0va0-1
(version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=OK)
for <linux-arm-kernel@lists.infradead.org>; Mon, 17 Sep 2018 09:22:43 +0100
Received: by mail-wr1-f72.google.com with SMTP id g36-v6so22631044wrd.9
for <linux-arm-kernel@lists.infradead.org>;
Mon, 17 Sep 2018 01:22:43 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=raspberrypi.org; s=google;
h=from:to:subject:date:message-id:in-reply-to:references;
bh=709kHRsgmnXd9YV1xoNMc1/aV4Xi/GYEdBYatqJnxII=;
b=N6MpqvnqTnIPagi/9P59zuTXf0ho+gbFCEE6jfQYmzcdvGoA5THdZKUVyUyOX+BS5t
eodxpyGpb7CZ4wOo/o6Gg/rml2t1OQ3McKMh2t8zP26ITR+L61GLqWseLJt4831yEDE0
UE9392fae7t3SnVjq5ojbSmGWMRNPc0RYHT3A08TP+lUsupeI0yuw3+oY1DDFKYdC31E
FZfnvjUPjwkGYJo6GVCeyMQIhoWxGMmUkqPOq28WK9woffToeS69koX6AVl7azJ7qAWX
xuaAHTyYyjDl3Of9y5GaqPjjoQQd1tY4nz9aW6mLh5QsEx834C3Jg9va8kLQ3Y0gCpAD
nVSw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20161025;
h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to
:references;
bh=709kHRsgmnXd9YV1xoNMc1/aV4Xi/GYEdBYatqJnxII=;
b=UJHCKLVGminvg0HfeF13uwKYBy5wKpeLZSvZL+F/oep/12zVz6wR9ufer+HQRCOsNc
siZjpaTDiMgdv9cYcAmrrkxWWpRQzIqAbvhxk73vxddpr0ymwbHKkm6ycri21KEnHCEu
Cm9LpGslmcXtDXM2p83EQx73T9M4SM8Qsa9Zly+qHI8BKHKRm/H52GMXGRgPVtmbzs15
jPb8LBJJiOuBCjjVdWAX3hCjkNOprR4NSGQRNvXjVn+UEjwMVdLdbZpqng33DHOtt27Z
peJhxLbEg0NXj6QAPEpzUL2L6brBxJga2F3oJsn7i/lCqKn3ndxvvcRMRHF7QXcEMw/K
H2Vw==
X-Gm-Message-State: APzg51BHcGp99CKU3y/yJll0mWOB/Vkm9WUEqJHCnHDNn8NqTqSE+qpp
BgRFpPPLsY2z+3zNd1Bo9dcXQ2dwAO3db9d5vWJQOeZIn3UJUznPvSNKIqrOJWogsHoKeiWPzzP
ZSwJFaNOx3FkEva8I1tFQde3LPWn6d+1zM3c=
X-Received: by 2002:a5d:4512:: with SMTP id
s18-v6mr18187206wrq.82.1537172562500;
Mon, 17 Sep 2018 01:22:42 -0700 (PDT)
X-Google-Smtp-Source:
ANB0VdaiFK6VovMmRM+tnynuIhV35l0Bwr9uiQksEgfZzBhqOIqpV+djM4jUW5g+o6bqN2HLKChxyA==
X-Received: by 2002:a5d:4512:: with SMTP id
s18-v6mr18187191wrq.82.1537172562269;
Mon, 17 Sep 2018 01:22:42 -0700 (PDT)
Received: from buildbot.pitowers.org ([2a00:2381:fdf7:14:14e2:e2a0:5538:c448])
by smtp.gmail.com with ESMTPSA id
198-v6sm7938315wmm.0.2018.09.17.01.22.40
(version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128);
Mon, 17 Sep 2018 01:22:41 -0700 (PDT)
From: Phil Elwell <phil@raspberrypi.org>
To: Rob Herring <robh+dt@kernel.org>, Stefan Wahren <stefan.wahren@i2se.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Phil Elwell <phil@raspberrypi.org>, devicetree@vger.kernel.org,
linux-rpi-kernel@lists.infradead.org,
Russell King <linux@armlinux.org.uk>, Arnd Bergmann <arnd@arndb.de>,
linux-arm-kernel@lists.infradead.org,
bcm-kernel-feedback-list@broadcom.com, devel@driverdev.osuosl.org
Subject: [PATCH v3 2/4] dt-bindings: soc: Document "brcm,bcm2836-vchiq"
Date: Mon, 17 Sep 2018 09:22:22 +0100
Message-Id: <1537172544-104852-3-git-send-email-phil@raspberrypi.org>
X-Mailer: git-send-email 2.7.4
In-Reply-To: <1537172544-104852-1-git-send-email-phil@raspberrypi.org>
References: <1537172544-104852-1-git-send-email-phil@raspberrypi.org>
X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:, ,
definitions=2018-09-17_04:, , signatures=0
X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3
X-CRM114-CacheID: sfid-20180917_042302_769007_3F16157B
X-CRM114-Status: GOOD ( 17.25 )
X-BeenThere: linux-arm-kernel@lists.infradead.org
X-Mailman-Version: 2.1.21
Precedence: list
List-Id: <linux-arm-kernel.lists.infradead.org>
List-Unsubscribe:
<http://lists.infradead.org/mailman/options/linux-arm-kernel>,
<mailto:linux-arm-kernel-request@lists.infradead.org?subject=unsubscribe>
List-Archive: <http://lists.infradead.org/pipermail/linux-arm-kernel/>
List-Post: <mailto:linux-arm-kernel@lists.infradead.org>
List-Help: <mailto:linux-arm-kernel-request@lists.infradead.org?subject=help>
List-Subscribe:
<http://lists.infradead.org/mailman/listinfo/linux-arm-kernel>,
<mailto:linux-arm-kernel-request@lists.infradead.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Sender: "linux-arm-kernel" <linux-arm-kernel-bounces@lists.infradead.org>
Errors-To:
linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org
X-Virus-Scanned: ClamAV using ClamSMTP
"brcm,bcm2836-vchiq" should be used on BCM2836 and BCM2837 to ensure
correct operation.
Signed-off-by: Phil Elwell <phil@raspberrypi.org>
Acked-by: Stefan Wahren <stefan.wahren@i2se.com>
Reviewed-by: Rob Herring <robh@kernel.org>
---
Documentation/devicetree/bindings/soc/bcm/brcm,bcm2835-vchiq.txt | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/Documentation/devicetree/bindings/soc/bcm/brcm,bcm2835-vchiq.txt b/Documentation/devicetree/bindings/soc/bcm/brcm,bcm2835-vchiq.txt
index 8dd7b3a..f331316 100644
--- a/Documentation/devicetree/bindings/soc/bcm/brcm,bcm2835-vchiq.txt
+++ b/Documentation/devicetree/bindings/soc/bcm/brcm,bcm2835-vchiq.txt
@@ -2,7 +2,8 @@ Broadcom VCHIQ firmware services
Required properties:
-- compatible: Should be "brcm,bcm2835-vchiq"
+- compatible: Should be "brcm,bcm2835-vchiq" on BCM2835, otherwise
+ "brcm,bcm2836-vchiq".
- reg: Physical base address and length of the doorbell register pair
- interrupts: The interrupt number
See bindings/interrupt-controller/brcm,bcm2835-armctrl-ic.txt
From patchwork Mon Sep 17 08:22:23 2018
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
X-Patchwork-Submitter: Phil Elwell <phil@raspberrypi.org>
X-Patchwork-Id: 10602173
Return-Path:
<linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org>
Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org
[172.30.200.125])
by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id D23951508
for <patchwork-linux-arm@patchwork.kernel.org>;
Mon, 17 Sep 2018 08:23:48 +0000 (UTC)
Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1])
by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C0A5E2624C
for <patchwork-linux-arm@patchwork.kernel.org>;
Mon, 17 Sep 2018 08:23:48 +0000 (UTC)
Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486)
id B494527861; Mon, 17 Sep 2018 08:23:48 +0000 (UTC)
X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on
pdx-wl-mail.web.codeaurora.org
X-Spam-Level:
X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00,DKIM_SIGNED,
DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1
Received: from bombadil.infradead.org (bombadil.infradead.org
[198.137.202.133])
(using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 1D12F2624C
for <patchwork-linux-arm@patchwork.kernel.org>;
Mon, 17 Sep 2018 08:23:48 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
d=lists.infradead.org; s=bombadil.20170209; h=Sender:
Content-Transfer-Encoding:Content-Type:MIME-Version:List-Subscribe:List-Help:
List-Post:List-Archive:List-Unsubscribe:List-Id:References:In-Reply-To:
Message-Id:Date:Subject:To:From:Reply-To:Cc:Content-ID:Content-Description:
Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:
List-Owner; bh=Dwk4nV4syz12H5Joro54dzb4xRRZnm1pVXSS97zokG4=; b=u5ArKClp9m4rAw
X79KW+OdEYkjnJvDRiwHiXrIROhy9KqfwhQncB4G5DZxtVfKFiVHnbqXHk8f+WwX2BxPbMEDIZOoc
d/sIjVXlkW2RQBS8mgxjJc/92fmYqW9/xgsXF7mDz2uJxYTeH8ilqLG3yTIoPiLE5V/m/0kWlWp3q
/KS6alhirFx2v2lPNAF1/anBJRHtfMp2mLjK5fepthSwL2KNN9T+GIoluCeXKH4ikWTtZcT5t+2lt
XvOmzLVgOMhD2/Auupmh1bFAMoyLpk2N90IK/Vn5aR+SqwRV4VRriyUdSQbJw2lwXyeAnwHe8ioGW
qBY1kd4d9lahXdnwvbzw==;
Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org)
by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux))
id 1g1ooi-0005gd-Sz; Mon, 17 Sep 2018 08:23:37 +0000
Received: from merlin.infradead.org ([2001:8b0:10b:1231::1])
by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux))
id 1g1ooH-0005Wn-28
for linux-arm-kernel@bombadil.infradead.org; Mon, 17 Sep 2018 08:23:09 +0000
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
d=infradead.org; s=merlin.20170209; h=References:In-Reply-To:Message-Id:Date:
Subject:To:From:Sender:Reply-To:Cc:MIME-Version:Content-Type:
Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date:
Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id:
List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive;
bh=ibdA85hf8c1CV6AjnoansL0OLKCQv7xqz6Dd4T0WwYE=; b=kq+r4aiTxCfQb9ANr0fYzAHvh
lwPy2MDuD58jFZXIeBlNCsd16UJwPv79X/C3PeK3VurkqtA220rndJ9rlFyuIpW9bLx3VbvMEV66i
5rlJCpBanJtL6W4bcOStoNBRts5IAjzWQJTP9xh8kRTZDj94HG4Ud3Y0F4wp5tuZQin9aAmRGN8Ri
nmxwqj4K2AedWncDcfJnbYUO+pj83RlLIV83Vc/wjwafr/HmLSJKxO2tbFMlyK8w+GzokVKDQX8Yl
VgzPvvpGFN/PEjHxbxhUwTUXoN9OX3veCrdZfeuLeb936VjAEY2dO4qe4n7V+8suIGWPYczcUYmuC
QroUCrfeA==;
Received: from mx08-00252a01.pphosted.com ([91.207.212.211])
by merlin.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux))
id 1g1ooA-0001aR-1H
for linux-arm-kernel@lists.infradead.org; Mon, 17 Sep 2018 08:23:06 +0000
Received: from pps.filterd (m0102629.ppops.net [127.0.0.1])
by mx08-00252a01.pphosted.com (8.16.0.23/8.16.0.23) with SMTP id
w8H8MTQR002592
for <linux-arm-kernel@lists.infradead.org>; Mon, 17 Sep 2018 09:22:44 +0100
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=raspberrypi.org;
h=from : to :
subject : date : message-id : in-reply-to : references; s=pp;
bh=ibdA85hf8c1CV6AjnoansL0OLKCQv7xqz6Dd4T0WwYE=;
b=GtNw2X7QyIdzLVw/dWm9pE7hxGpCS4f3A39/M126HfBvf3b/h8TyqiZ5r1xXNu1o9Wd3
a2PR3ZAYL9vJWqRw6GR+hqIrLbBPmuIUnKjv8ZSuL5nSma4EaGZ4SA/pkRVoZxtzYHra
rerPDiIpuY/ZJzkrl5gRela6dKKMafJ9WjDHfRBe3MvraBmSmcjNbl1pwZrD9SxlL/QW
kekUM8ISQzaZK1yS9nEOJT4jgoDgQjg67qTdqfASV0IxT+hhlwHX/oj97E2XJuVGMchY
B2tw7aEpcV+/B3prEEpXPg8I4gulq4au2IOL1G+ZjuMFtB3mnxuhJZTvOTlVOORC1tbY Nw==
Received: from mail-wr1-f71.google.com (mail-wr1-f71.google.com
[209.85.221.71])
by mx08-00252a01.pphosted.com with ESMTP id 2mgxu78uf3-1
(version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=OK)
for <linux-arm-kernel@lists.infradead.org>; Mon, 17 Sep 2018 09:22:44 +0100
Received: by mail-wr1-f71.google.com with SMTP id u12-v6so22608270wrc.1
for <linux-arm-kernel@lists.infradead.org>;
Mon, 17 Sep 2018 01:22:44 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=raspberrypi.org; s=google;
h=from:to:subject:date:message-id:in-reply-to:references;
bh=ibdA85hf8c1CV6AjnoansL0OLKCQv7xqz6Dd4T0WwYE=;
b=Ewr6H6F8danbpfF2j56EFM3zyem/V1DjZTwpShb9UOMB0mer0DV08yzmFnZxhT+OOS
iqoecQdIpCRdwPKRDBo1CPy9uJQSgSactKa+YAxnGQ3bAn8TvBe1SxqnObHXRrr9Wdex
vzH2VGHbyGIW4tRzrTTiy4+lWlzyzezOWUWOdGfvLyt+3olku3ExUQ1UtyJQFXgOIE1R
gXVZBPyr7+K/To7iaDyFtqE0HKSZ1zXT2JB5RwTSe7gbppZL/cMQbodQuEeCtTJN2Mk3
zfn2WL7jhFw2HMZBcR9hYfm37jh9HUSDndHoMuuAtumDBy6dr9jC/ixxOwJOJIpCgaN+
QVgA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20161025;
h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to
:references;
bh=ibdA85hf8c1CV6AjnoansL0OLKCQv7xqz6Dd4T0WwYE=;
b=hylNUUSKnRzE949ctU309ZwJfktn+WfvEgLQRIDt5xeqAZoZdx14jr9qf4/8FwGgK1
KNXH04/CM9pCLsnsLTBwXsZUKGObYp+zPhwGqPG2Sn4w6GRZLnZfSxqJFtToDvnicem+
+WjrwVDTrfO2GxBk7Wd5YepQQner7x41sdIXZwztEYG9PiRaBQu6XTUq/RqreaF4Ep3E
n7LHVlGVhd8ddG/cRHR5UmyZS/QMzp39y7R8HoA8pT69lIysf8wjq3n4j+ZILtxBhbz0
WC5ke8PdnUvBNBkrS0WiqyW+YFkzjGy9rgJsW1/fW8S5YE98OwM9R1e/8skJk7yeXuj4
+XzQ==
X-Gm-Message-State: APzg51CndvGPCiDwRG1VW95iu6AVszC736A5IE7L/fnOGMl2pWRj7/Fm
1a3HQ+l8htKBn3H5iyJlVsCKEev/tJDKXQKvW0QAq7QzJOvGY65OOWI9FtwM61BlqiwUbZVyRo7
8qx9VkB7JEDmE/hFbCckOPQoLp3jICDMdKbU=
X-Received: by 2002:adf:d110:: with SMTP id
a16-v6mr18039010wri.17.1537172563663;
Mon, 17 Sep 2018 01:22:43 -0700 (PDT)
X-Google-Smtp-Source:
ANB0VdZFtXkQhEgNJzup0M4370Voxs3V0q2pn+S3MhlOPzoOK4M7r4b5z74IaruMtYvv09TFVUAizg==
X-Received: by 2002:adf:d110:: with SMTP id
a16-v6mr18038988wri.17.1537172563384;
Mon, 17 Sep 2018 01:22:43 -0700 (PDT)
Received: from buildbot.pitowers.org ([2a00:2381:fdf7:14:14e2:e2a0:5538:c448])
by smtp.gmail.com with ESMTPSA id
198-v6sm7938315wmm.0.2018.09.17.01.22.42
(version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128);
Mon, 17 Sep 2018 01:22:42 -0700 (PDT)
From: Phil Elwell <phil@raspberrypi.org>
To: Rob Herring <robh+dt@kernel.org>, Stefan Wahren <stefan.wahren@i2se.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Phil Elwell <phil@raspberrypi.org>, devicetree@vger.kernel.org,
linux-rpi-kernel@lists.infradead.org,
Russell King <linux@armlinux.org.uk>, Arnd Bergmann <arnd@arndb.de>,
linux-arm-kernel@lists.infradead.org,
bcm-kernel-feedback-list@broadcom.com, devel@driverdev.osuosl.org
Subject: [PATCH v3 3/4] ARM: dts: bcm283x: Correct vchiq compatible string
Date: Mon, 17 Sep 2018 09:22:23 +0100
Message-Id: <1537172544-104852-4-git-send-email-phil@raspberrypi.org>
X-Mailer: git-send-email 2.7.4
In-Reply-To: <1537172544-104852-1-git-send-email-phil@raspberrypi.org>
References: <1537172544-104852-1-git-send-email-phil@raspberrypi.org>
X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:, ,
definitions=2018-09-17_04:, , signatures=0
X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3
X-CRM114-CacheID: sfid-20180917_042302_770260_E7C4CFD2
X-CRM114-Status: GOOD ( 22.09 )
X-BeenThere: linux-arm-kernel@lists.infradead.org
X-Mailman-Version: 2.1.21
Precedence: list
List-Id: <linux-arm-kernel.lists.infradead.org>
List-Unsubscribe:
<http://lists.infradead.org/mailman/options/linux-arm-kernel>,
<mailto:linux-arm-kernel-request@lists.infradead.org?subject=unsubscribe>
List-Archive: <http://lists.infradead.org/pipermail/linux-arm-kernel/>
List-Post: <mailto:linux-arm-kernel@lists.infradead.org>
List-Help: <mailto:linux-arm-kernel-request@lists.infradead.org?subject=help>
List-Subscribe:
<http://lists.infradead.org/mailman/listinfo/linux-arm-kernel>,
<mailto:linux-arm-kernel-request@lists.infradead.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Sender: "linux-arm-kernel" <linux-arm-kernel-bounces@lists.infradead.org>
Errors-To:
linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org
X-Virus-Scanned: ClamAV using ClamSMTP
To allow VCHIQ to determine the correct cache line size, use the new
"brcm,bcm2836-vchiq" compatible string on BCM2836 and BCM2837.
Signed-off-by: Phil Elwell <phil@raspberrypi.org>
Acked-by: Stefan Wahren <stefan.wahren@i2se.com>
---
arch/arm/boot/dts/bcm2835-rpi.dtsi | 2 +-
arch/arm/boot/dts/bcm2836-rpi-2-b.dts | 2 +-
arch/arm/boot/dts/bcm2836-rpi.dtsi | 6 ++++++
arch/arm/boot/dts/bcm2837-rpi-3-b-plus.dts | 2 +-
arch/arm/boot/dts/bcm2837-rpi-3-b.dts | 2 +-
arch/arm/boot/dts/bcm2837-rpi-cm3.dtsi | 2 +-
6 files changed, 11 insertions(+), 5 deletions(-)
create mode 100644 arch/arm/boot/dts/bcm2836-rpi.dtsi
diff --git a/arch/arm/boot/dts/bcm2835-rpi.dtsi b/arch/arm/boot/dts/bcm2835-rpi.dtsi
index cb2d6d7..215d8cc 100644
--- a/arch/arm/boot/dts/bcm2835-rpi.dtsi
+++ b/arch/arm/boot/dts/bcm2835-rpi.dtsi
@@ -30,7 +30,7 @@
#power-domain-cells = <1>;
};
- mailbox@7e00b840 {
+ vchiq: mailbox@7e00b840 {
compatible = "brcm,bcm2835-vchiq";
reg = <0x7e00b840 0xf>;
interrupts = <0 2>;
diff --git a/arch/arm/boot/dts/bcm2836-rpi-2-b.dts b/arch/arm/boot/dts/bcm2836-rpi-2-b.dts
index 2fef70a..ac4408b 100644
--- a/arch/arm/boot/dts/bcm2836-rpi-2-b.dts
+++ b/arch/arm/boot/dts/bcm2836-rpi-2-b.dts
@@ -1,7 +1,7 @@
// SPDX-License-Identifier: GPL-2.0
/dts-v1/;
#include "bcm2836.dtsi"
-#include "bcm2835-rpi.dtsi"
+#include "bcm2836-rpi.dtsi"
#include "bcm283x-rpi-smsc9514.dtsi"
#include "bcm283x-rpi-usb-host.dtsi"
diff --git a/arch/arm/boot/dts/bcm2836-rpi.dtsi b/arch/arm/boot/dts/bcm2836-rpi.dtsi
new file mode 100644
index 0000000..c4c858b
--- /dev/null
+++ b/arch/arm/boot/dts/bcm2836-rpi.dtsi
@@ -0,0 +1,6 @@
+// SPDX-License-Identifier: GPL-2.0
+#include "bcm2835-rpi.dtsi"
+
+&vchiq {
+ compatible = "brcm,bcm2836-vchiq", "brcm,bcm2835-vchiq";
+};
diff --git a/arch/arm/boot/dts/bcm2837-rpi-3-b-plus.dts b/arch/arm/boot/dts/bcm2837-rpi-3-b-plus.dts
index 4adb85e..eca36e3 100644
--- a/arch/arm/boot/dts/bcm2837-rpi-3-b-plus.dts
+++ b/arch/arm/boot/dts/bcm2837-rpi-3-b-plus.dts
@@ -1,7 +1,7 @@
// SPDX-License-Identifier: GPL-2.0
/dts-v1/;
#include "bcm2837.dtsi"
-#include "bcm2835-rpi.dtsi"
+#include "bcm2836-rpi.dtsi"
#include "bcm283x-rpi-lan7515.dtsi"
#include "bcm283x-rpi-usb-host.dtsi"
diff --git a/arch/arm/boot/dts/bcm2837-rpi-3-b.dts b/arch/arm/boot/dts/bcm2837-rpi-3-b.dts
index c318bcb..a0ba0f6 100644
--- a/arch/arm/boot/dts/bcm2837-rpi-3-b.dts
+++ b/arch/arm/boot/dts/bcm2837-rpi-3-b.dts
@@ -1,7 +1,7 @@
// SPDX-License-Identifier: GPL-2.0
/dts-v1/;
#include "bcm2837.dtsi"
-#include "bcm2835-rpi.dtsi"
+#include "bcm2836-rpi.dtsi"
#include "bcm283x-rpi-smsc9514.dtsi"
#include "bcm283x-rpi-usb-host.dtsi"
diff --git a/arch/arm/boot/dts/bcm2837-rpi-cm3.dtsi b/arch/arm/boot/dts/bcm2837-rpi-cm3.dtsi
index 7b7ab6a..4a89a18 100644
--- a/arch/arm/boot/dts/bcm2837-rpi-cm3.dtsi
+++ b/arch/arm/boot/dts/bcm2837-rpi-cm3.dtsi
@@ -1,7 +1,7 @@
// SPDX-License-Identifier: GPL-2.0
/dts-v1/;
#include "bcm2837.dtsi"
-#include "bcm2835-rpi.dtsi"
+#include "bcm2836-rpi.dtsi"
/ {
memory {
From patchwork Mon Sep 17 08:22:24 2018
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
X-Patchwork-Submitter: Phil Elwell <phil@raspberrypi.org>
X-Patchwork-Id: 10602203
Return-Path:
<linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org>
Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org
[172.30.200.125])
by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 8BB93161F
for <patchwork-linux-arm@patchwork.kernel.org>;
Mon, 17 Sep 2018 08:42:23 +0000 (UTC)
Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1])
by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7A55A29656
for <patchwork-linux-arm@patchwork.kernel.org>;
Mon, 17 Sep 2018 08:42:23 +0000 (UTC)
Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486)
id 6DE622965F; Mon, 17 Sep 2018 08:42:23 +0000 (UTC)
X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on
pdx-wl-mail.web.codeaurora.org
X-Spam-Level:
X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00,DKIM_SIGNED,
DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1
Received: from bombadil.infradead.org (bombadil.infradead.org
[198.137.202.133])
(using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 5FB1B2965B
for <patchwork-linux-arm@patchwork.kernel.org>;
Mon, 17 Sep 2018 08:42:22 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
d=lists.infradead.org; s=bombadil.20170209; h=Sender:
Content-Transfer-Encoding:Content-Type:MIME-Version:List-Subscribe:List-Help:
List-Post:List-Archive:List-Unsubscribe:List-Id:References:In-Reply-To:
Message-Id:Date:Subject:To:From:Reply-To:Cc:Content-ID:Content-Description:
Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:
List-Owner; bh=GuNa2jLaGytz4ltfeP+rSU0xZrseSNcWWmSj86ZTl7w=; b=i1naZIjCR6DgCG
1T5cmZMM6Dkok0WN1avKEjHIKv18FXg4nMVuJeEEzdq5Dx4du3mbMHBWS9oC+QHZy9bTpHQRgiS0G
Q6fvfZ7PYJUVWOzEgbkdyOL0OMiOVsYTJsMXoeii0MFMvmzFpelJ2KgEqJ/Ly+PRHPmHQ3WP9s7N5
xE4orUgiIcIHSbMkCm42twuXZMgaMgQktA+jlnAaslK7PJtzMC1PHx2uCTbZdIVNTJFqkwgjqxmSW
RH4f8jSTGWYwOlv5CgspS2YU753VETDvD0LTGDSrn737lsC94uI99f6ciaMZaUcS4SuRzuvjSvKPA
pZ2TrSAmQre1Rp/jVeOw==;
Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org)
by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux))
id 1g1p6f-00060f-0R; Mon, 17 Sep 2018 08:42:09 +0000
Received: from casper.infradead.org ([2001:8b0:10b:1236::1])
by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux))
id 1g1p6b-0005u0-RH
for linux-arm-kernel@bombadil.infradead.org; Mon, 17 Sep 2018 08:42:05 +0000
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
d=infradead.org; s=casper.20170209; h=References:In-Reply-To:Message-Id:Date:
Subject:To:From:Sender:Reply-To:Cc:MIME-Version:Content-Type:
Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date:
Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id:
List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive;
bh=QMjgiTHZdBCZgWe6tYJjcntUGfqPQLNuRPhn6Dczv+g=; b=UJ3cMzmNQRhXaXlxWFwla6An2
CWzMn1wzzr/CyRZ2G8YLZdvUEGpVRlTqAtk/xGbT7xO80oWONflxUNqlNTxj4v3QZkEMtsr5eg0bD
bnEnzF3OS0dexb5Aro0bZajhgrMlaIaa5FBVndBgK1KeW4vEiE4D10APgXJMZ4gzO5PvO3pba7J0g
XNDk7JzB7D/dSQXmKkb+EuUwalT2v/YJzFtIc+T3vR4/wvxhXFZmJL2dmzQMduHoVJtsIFvC1HfzF
5GnY5y85CTU2Fx2s4JNOHe2vAGXI9lnUPf2szvyFhGQIVH7QC9y4zOsbG0iP36VEcuhbGnA3I5K7S
8Kc2knjrQ==;
Received: from mx07-00252a01.pphosted.com ([62.209.51.214])
by casper.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux))
id 1g1oo4-0004nO-7f
for linux-arm-kernel@lists.infradead.org; Mon, 17 Sep 2018 08:22:58 +0000
Received: from pps.filterd (m0102628.ppops.net [127.0.0.1])
by mx07-00252a01.pphosted.com (8.16.0.23/8.16.0.23) with SMTP id
w8H8MUCZ024134
for <linux-arm-kernel@lists.infradead.org>; Mon, 17 Sep 2018 09:22:45 +0100
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=raspberrypi.org;
h=from : to :
subject : date : message-id : in-reply-to : references; s=pp;
bh=QMjgiTHZdBCZgWe6tYJjcntUGfqPQLNuRPhn6Dczv+g=;
b=kZDNcIT02Qz8gHVo/pKHHsMKpNIeLNzW7d/g6n+A4XN0KAnqNvf2mO96pMHKNygRT76b
cq81PbSI1ssh2L6Bd86zcSWNDq3UuoZl93qtK6YY8fqevti7XVKKtwh4qQ561BL8oE6W
gorwuXGsxEpeer6/+1/r0Ookzhz4EiQkGcd/l3IP+T4XkHJgX6tZ/GTSRbDXzuxZ7WxL
7Kh+zMjHW5FAV2xmyYnFEVvI5DFnD34QM4lLrw/v6fLDp1ZvcLH2psBo8wv9fd01ZnMp
3gVnEu8QX+NWIq+9qJ6o8MajSNhGWU4WmTD2fiqfmxFBnCTWp5Y2ZfphwVsflhlnThtE Jw==
Received: from mail-wr1-f70.google.com (mail-wr1-f70.google.com
[209.85.221.70])
by mx07-00252a01.pphosted.com with ESMTP id 2mgw8f0vac-1
(version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=OK)
for <linux-arm-kernel@lists.infradead.org>; Mon, 17 Sep 2018 09:22:45 +0100
Received: by mail-wr1-f70.google.com with SMTP id j22-v6so22020561wre.7
for <linux-arm-kernel@lists.infradead.org>;
Mon, 17 Sep 2018 01:22:45 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=raspberrypi.org; s=google;
h=from:to:subject:date:message-id:in-reply-to:references;
bh=QMjgiTHZdBCZgWe6tYJjcntUGfqPQLNuRPhn6Dczv+g=;
b=elxMUa+c3RtqQfnv+0aAH+u3stbGHUflCzNxSDLQUfmD/iHnq9vSqSRX+7+TLNBhXc
iPDm6AigQoDgevY1qgR0cUf1kufwlFKka3QyyWdEH/eEZHs6b3W+U9NtjyUReMMOZh3Q
gFrMrgzwIryQOKgcBg41hFqqv6lUEqVuTx3oC0n7U66JoJ1TRjY8muSPp8KWfB+Tsbtv
XVDBeKa5HGzRKlxSI3/RSvmivz+7aUQW6wNy0+gZd3+COdPiyiRhbtT2Xwx98JZY12HT
WlWqHTLkcG6jAKJP2dnqgvYGZ/eennHF34Tn37xHLjy4cahYo/ngTwQgPprJIaoIPcL+
X/Dg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20161025;
h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to
:references;
bh=QMjgiTHZdBCZgWe6tYJjcntUGfqPQLNuRPhn6Dczv+g=;
b=fVU6VgVpx/HstvLa9bPQVfHGZqO1SgQW8pSfbPxol5HYqweh3jT/ykuYXG8BAGW6Ig
Mdhu3RzBV4wPReCMEgte6BWd94TWyWKxGq6l6xrOi3LXbUMPtIqox3kv3PfLLVxk3SMv
sHWyp/kAkue+K5Ye6FnfgpJzJmCaJAvJ1UQpLPzF+5KG7GFYmuwAe65l68b8xBldLvz+
CvnQ71gdsZIZ7CUzPRBN9OZhlZJWZXMPb3LdD6Q482+/PVWLFANU1O5l2/h50Y/dV+a1
YalREMpfnz+tsZcpGEfzdxCpboHeDv/G6q+VotAhcrihrAMNK9BJZ16gTRMcwcYgPQWw
qRSg==
X-Gm-Message-State: APzg51DXrb2imPBCoJ+q/BYRCyqhMqStk08VprXg9IQ1KTzmptp77XVd
R/mMPJ35LsOos7CoFmh/yWMJEB3GLYTLSiMzQFz8+7GxMs7H9M8ocW2aOTth0aTDS70XXH/nioS
kW34F6tKDeWUp44rQD8ZgUpyJVb2hPfBbovQ=
X-Received: by 2002:adf:d20a:: with SMTP id
g10-v6mr18280267wri.66.1537172564529;
Mon, 17 Sep 2018 01:22:44 -0700 (PDT)
X-Google-Smtp-Source:
ANB0VdY6Rp3hgeCMs9pw3a4a2+uvxxamVoyGcr3pIn6rx5kgmM+Aufcx5tRocSXQJqw45FaPg01X8g==
X-Received: by 2002:adf:d20a:: with SMTP id
g10-v6mr18280254wri.66.1537172564348;
Mon, 17 Sep 2018 01:22:44 -0700 (PDT)
Received: from buildbot.pitowers.org ([2a00:2381:fdf7:14:14e2:e2a0:5538:c448])
by smtp.gmail.com with ESMTPSA id
198-v6sm7938315wmm.0.2018.09.17.01.22.43
(version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128);
Mon, 17 Sep 2018 01:22:43 -0700 (PDT)
From: Phil Elwell <phil@raspberrypi.org>
To: Rob Herring <robh+dt@kernel.org>, Stefan Wahren <stefan.wahren@i2se.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Phil Elwell <phil@raspberrypi.org>, devicetree@vger.kernel.org,
linux-rpi-kernel@lists.infradead.org,
Russell King <linux@armlinux.org.uk>, Arnd Bergmann <arnd@arndb.de>,
linux-arm-kernel@lists.infradead.org,
bcm-kernel-feedback-list@broadcom.com, devel@driverdev.osuosl.org
Subject: [PATCH v3 4/4] ARM: dts: bcm283x: Correct mailbox register sizes
Date: Mon, 17 Sep 2018 09:22:24 +0100
Message-Id: <1537172544-104852-5-git-send-email-phil@raspberrypi.org>
X-Mailer: git-send-email 2.7.4
In-Reply-To: <1537172544-104852-1-git-send-email-phil@raspberrypi.org>
References: <1537172544-104852-1-git-send-email-phil@raspberrypi.org>
X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:, ,
definitions=2018-09-17_04:, , signatures=0
X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3
X-CRM114-CacheID: sfid-20180917_092256_305871_71340799
X-CRM114-Status: GOOD ( 19.05 )
X-BeenThere: linux-arm-kernel@lists.infradead.org
X-Mailman-Version: 2.1.21
Precedence: list
List-Id: <linux-arm-kernel.lists.infradead.org>
List-Unsubscribe:
<http://lists.infradead.org/mailman/options/linux-arm-kernel>,
<mailto:linux-arm-kernel-request@lists.infradead.org?subject=unsubscribe>
List-Archive: <http://lists.infradead.org/pipermail/linux-arm-kernel/>
List-Post: <mailto:linux-arm-kernel@lists.infradead.org>
List-Help: <mailto:linux-arm-kernel-request@lists.infradead.org?subject=help>
List-Subscribe:
<http://lists.infradead.org/mailman/listinfo/linux-arm-kernel>,
<mailto:linux-arm-kernel-request@lists.infradead.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Sender: "linux-arm-kernel" <linux-arm-kernel-bounces@lists.infradead.org>
Errors-To:
linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org
X-Virus-Scanned: ClamAV using ClamSMTP
The size field in a Device Tree "reg" property is encoded in bytes, not
words.
Fixes: 614fa22119d6 ("ARM: dts: bcm2835: Add VCHIQ node to the Raspberry Pi boards. (v3)")
Signed-off-by: Phil Elwell <phil@raspberrypi.org>
Acked-by: Stefan Wahren <stefan.wahren@i2se.com>
---
arch/arm/boot/dts/bcm2835-rpi.dtsi | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/arm/boot/dts/bcm2835-rpi.dtsi b/arch/arm/boot/dts/bcm2835-rpi.dtsi
index 215d8cc..29f970f 100644
--- a/arch/arm/boot/dts/bcm2835-rpi.dtsi
+++ b/arch/arm/boot/dts/bcm2835-rpi.dtsi
@@ -32,7 +32,7 @@
vchiq: mailbox@7e00b840 {
compatible = "brcm,bcm2835-vchiq";
- reg = <0x7e00b840 0xf>;
+ reg = <0x7e00b840 0x3c>;
interrupts = <0 2>;
};
};

View file

@ -0,0 +1,45 @@
From 6ef5bd6cfd5da9fe67aea031fd0a66ff77d64ad6 Mon Sep 17 00:00:00 2001
From: Stefan Wahren <stefan.wahren@i2se.com>
Date: Sat, 1 Sep 2018 20:16:22 +0200
Subject: ARM: dts: bcm283x-rpi-lan7515: Enable Ethernet LEDs
Since the LAN7515 on Raspberry Pi 3B+ doesn't have an EEPROM and the OTP
is empty, we need to enable the Ethernet LEDs via Device Tree.
Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
---
arch/arm/boot/dts/bcm283x-rpi-lan7515.dtsi | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/arch/arm/boot/dts/bcm283x-rpi-lan7515.dtsi b/arch/arm/boot/dts/bcm283x-rpi-lan7515.dtsi
index 9403da0990d0..70bece63f9a7 100644
--- a/arch/arm/boot/dts/bcm283x-rpi-lan7515.dtsi
+++ b/arch/arm/boot/dts/bcm283x-rpi-lan7515.dtsi
@@ -1,4 +1,6 @@
// SPDX-License-Identifier: GPL-2.0
+#include <dt-bindings/net/microchip-lan78xx.h>
+
/ {
aliases {
ethernet0 = &ethernet;
@@ -21,6 +23,18 @@
ethernet: ethernet@1 {
compatible = "usb424,7800";
reg = <1>;
+
+ mdio {
+ #address-cells = <0x1>;
+ #size-cells = <0x0>;
+ eth_phy: ethernet-phy@1 {
+ reg = <1>;
+ microchip,led-modes = <
+ LAN78XX_LINK_1000_ACTIVITY
+ LAN78XX_LINK_10_100_ACTIVITY
+ >;
+ };
+ };
};
};
};
--
cgit 1.2-0.3.lf.el7

View file

@ -0,0 +1,43 @@
From 554da3868eb1d7174710c18b4ddd6ff01f6d612c Mon Sep 17 00:00:00 2001
From: Hans de Goede <hdegoede@redhat.com>
Date: Fri, 23 Nov 2018 10:11:48 +0100
Subject: brcmfmac: Call brcmf_dmi_probe before brcmf_of_probe
ARM systems with UEFI may have both devicetree (of) and DMI data in this
case we end up setting brcmf_mp_device.board_type twice.
In this case we should prefer the devicetree data, because:
1) The devicerree data is more reliable
2) Some ARM systems (e.g. the Raspberry Pi 3 models) support both UEFI and
classic uboot booting, the devicetree data is always there, so using it
makes sure we ask for the same nvram file independent of how we booted.
This commit moves the brcmf_dmi_probe call to before the brcmf_of_probe
call, so that the latter can override the value of the first if both are
set.
Fixes: bd1e82bb420a ("brcmfmac: Set board_type from DMI on x86 based ...")
Cc: Peter Robinson <pbrobinson@gmail.com>
Tested-and-reported-by: Peter Robinson <pbrobinson@gmail.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
---
drivers/net/wireless/broadcom/brcm80211/brcmfmac/common.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/common.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/common.c
index e738112ed87c..1f1e95a15a17 100644
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/common.c
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/common.c
@@ -449,8 +449,8 @@ struct brcmf_mp_device *brcmf_get_module_param(struct device *dev,
}
if (!found) {
/* No platform data for this device, try OF and DMI data */
- brcmf_of_probe(dev, bus_type, settings);
brcmf_dmi_probe(settings, chip, chiprev);
+ brcmf_of_probe(dev, bus_type, settings);
}
return settings;
}
--
cgit 1.2-0.3.lf.el7

File diff suppressed because it is too large Load diff

1
build_configs.sh Symbolic link
View file

@ -0,0 +1 @@
configs/build_configs.sh

View file

@ -1,166 +0,0 @@
#!/usr/bin/python3
#
# check-kabi - Red Hat kABI reference checking tool
#
# We use this script to check against reference Module.kabi files.
#
# Author: Jon Masters <jcm@redhat.com>
# Copyright (C) 2007-2009 Red Hat, Inc.
#
# This software may be freely redistributed under the terms of the GNU
# General Public License (GPL).
# Changelog:
#
# 2018/06/01 - Update for python3 by Petr Oros.
# 2009/08/15 - Updated for use in RHEL6.
# 2007/06/13 - Initial rewrite in python by Jon Masters.
__author__ = "Jon Masters <jcm@redhat.com>"
__version__ = "2.0"
__date__ = "2009/08/15"
__copyright__ = "Copyright (C) 2007-2009 Red Hat, Inc"
__license__ = "GPL"
import getopt
import string
import sys
true = 1
false = 0
def load_symvers(symvers, filename):
"""Load a Module.symvers file."""
symvers_file = open(filename, "r")
while true:
in_line = symvers_file.readline()
if in_line == "":
break
if in_line == "\n":
continue
checksum, symbol, directory, type, *ns = in_line.split()
ns = ns[0] if ns else None
symvers[symbol] = in_line[0:-1]
def load_kabi(kabi, filename):
"""Load a Module.kabi file."""
kabi_file = open(filename, "r")
while true:
in_line = kabi_file.readline()
if in_line == "":
break
if in_line == "\n":
continue
checksum, symbol, directory, type, *ns = in_line.split()
ns = ns[0] if ns else None
kabi[symbol] = in_line[0:-1]
def check_kabi(symvers, kabi):
"""Check Module.kabi and Module.symvers files."""
fail = 0
warn = 0
changed_symbols = []
moved_symbols = []
ns_symbols = []
for symbol in kabi:
abi_hash, abi_sym, abi_dir, abi_type, *abi_ns = kabi[symbol].split()
abi_ns = abi_ns[0] if abi_ns else None
if symbol in symvers:
sym_hash, sym_sym, sym_dir, sym_type, *sym_ns = symvers[symbol].split()
sym_ns = sym_ns[0] if sym_ns else None
if abi_hash != sym_hash:
fail = 1
changed_symbols.append(symbol)
if abi_dir != sym_dir:
warn = 1
moved_symbols.append(symbol)
if abi_ns != sym_ns:
warn = 1
ns_symbols.append(symbol)
else:
fail = 1
changed_symbols.append(symbol)
if fail:
print("*** ERROR - ABI BREAKAGE WAS DETECTED ***")
print("")
print("The following symbols have been changed (this will cause an ABI breakage):")
print("")
for symbol in changed_symbols:
print(symbol)
print("")
if warn:
print("*** WARNING - ABI SYMBOLS MOVED ***")
if moved_symbols:
print("")
print("The following symbols moved (typically caused by moving a symbol from being")
print("provided by the kernel vmlinux out to a loadable module):")
print("")
for symbol in moved_symbols:
print(symbol)
print("")
if ns_symbols:
print("")
print("The following symbols changed symbol namespaces:")
print("")
for symbol in ns_symbols:
print(symbol)
print("")
"""Halt the build, if we got errors and/or warnings. In either case,
double-checkig is required to avoid introducing / concealing
KABI inconsistencies."""
if fail or warn:
sys.exit(1)
sys.exit(0)
def usage():
print("""
check-kabi: check Module.kabi and Module.symvers files.
check-kabi [ -k Module.kabi ] [ -s Module.symvers ]
""")
if __name__ == "__main__":
symvers_file = ""
kabi_file = ""
opts, args = getopt.getopt(sys.argv[1:], 'hk:s:')
for o, v in opts:
if o == "-s":
symvers_file = v
if o == "-h":
usage()
sys.exit(0)
if o == "-k":
kabi_file = v
if (symvers_file == "") or (kabi_file == ""):
usage()
sys.exit(1)
symvers = {}
kabi = {}
load_symvers(symvers, symvers_file)
load_kabi(kabi, kabi_file)
check_kabi(symvers, kabi)

22
check_configs.awk Executable file
View file

@ -0,0 +1,22 @@
#!/usr/bin/awk -f
/is not set/ {
split ($0, a, "#");
split(a[2], b);
if (NR==FNR) {
configs[b[1]]="is not set";
} else {
if (configs[b[1]] != "" && configs[b[1]] != "is not set")
print "Found # "b[1] " is not set, after generation, had " b[1] " " configs[b[1]] " in Fedora tree";
}
}
/=/ {
split ($0, a, "=");
if (NR==FNR) {
configs[a[1]]=a[2];
} else {
if (configs[a[1]] != "" && configs[a[1]] != a[2])
print "Found "a[1]"="configs[a[1]]" after generation, had " a[1]"="a[2]" in Fedora tree";
}
}

1
config_generation Symbolic link
View file

@ -0,0 +1 @@
configs/config_generation

137
configs/build_configs.sh Executable file
View file

@ -0,0 +1,137 @@
#!/bin/bash
#
# This script merges together the hierarchy of CONFIG_* files under generic
# and debug to form the necessary $PACKAGE_NAME<version>-<arch>-<variant>.config
# files for building RHEL kernels, based on the contents of a control file
PACKAGE_NAME="${1:-kernel}" # defines the package name used
KVERREL="${2:-}"
SUBARCH="${3:-}" # defines a specific arch
SCRIPT="$(readlink -f $0)"
OUTPUT_DIR="$PWD"
SCRIPT_DIR="$(dirname $SCRIPT)"
LANG=en_US.UTF-8
# to handle this script being a symlink
cd $SCRIPT_DIR
set errexit
set nounset
control_file="config_generation"
cleanup()
{
rm -f config-*
}
die()
{
echo "$1"
cleanup
exit 1
}
function combine_config_layer()
{
dir=$1
file="config-$(echo $dir | sed -e 's|/|-|g')"
if [ $(ls $dir/ | grep -c "^CONFIG_") -eq 0 ]; then
touch $file
return
fi
cat $dir/CONFIG_* > $file
}
function merge_configs()
{
archvar=$1
arch=$(echo "$archvar" | cut -f1 -d"-")
configs=$2
order=$3
name=$OUTPUT_DIR/$PACKAGE_NAME-$archvar.config
echo -n "Building $name ... "
touch config-merging config-merged
# apply based on order
skip_if_missing=""
for o in $order
do
for config in $(echo $configs | sed -e 's/:/ /g')
do
cfile="config-$o-$config"
test -n "$skip_if_missing" && test ! -e $cfile && continue
perl merge.pl $cfile config-merging > config-merged
if [ ! $? -eq 0 ]; then
die "Failed to merge $cfile"
fi
mv config-merged config-merging
done
# first configs in $order is baseline, all files should be
# there. second pass is overrides and can be missing.
skip_if_missing="1"
done
if [ "x$arch" == "xaarch64" ]; then
echo "# arm64" > $name
elif [ "x$arch" == "xppc64le" ]; then
echo "# powerpc" > $name
elif [ "x$arch" == "xs390x" ]; then
echo "# s390" > $name
elif [ "x$arch" == "xarmv7hl" ]; then
echo "# arm" > $name
elif [ "x$arch" == "xi686" ]; then
echo "# i386" > $name
else
echo "# $arch" > $name
fi
sort config-merging >> $name
rm -f config-merged config-merging
echo "done"
}
while read line
do
if [ $(echo "$line" | grep -c "^#") -ne 0 ]; then
continue
elif [ $(echo "$line" | grep -c "^$") -ne 0 ]; then
continue
elif [ $(echo "$line" | grep -c "^ORDER") -ne 0 ]; then
order=$(echo "$line" | cut -f2 -d"=")
for o in $order
do
glist=$(find $o -type d)
for d in $glist
do
combine_config_layer $d
done
done
else
arch=$(echo "$line" | cut -f1 -d"=")
configs=$(echo "$line" | cut -f2 -d"=")
if [ -n "$SUBARCH" -a "$SUBARCH" != "$arch" ]; then
continue
fi
merge_configs $arch $configs "$order"
fi
done < $control_file
# A passed in kernel version implies copy to final location
# otherwise defer to another script
if test -n "$KVERREL"
then
for i in kernel-*.config
do
NEW="$(echo $i | sed "s/$PACKAGE_NAME-$SUBARCH/$PACKAGE_NAME-$KVERREL-$SUBARCH/")"
mv $i $NEW
done
fi
cleanup

35
configs/config_generation Normal file
View file

@ -0,0 +1,35 @@
# config-variant=config:config:config
# kernel.config files are build on the fly based on this config,
# the first arg is arch and variant, the second is a hierarchy of
# config options, lowest priority to highest
# tells the build_configs.sh which order to build the configs.
# this is useful when providing a separate overrides directory.
# do not use quotes and space separate the directories.
ORDER=fedora
# x86_64
x86_64=generic:generic-x86:generic-x86-x86_64
x86_64-debug=generic:generic-x86:generic-x86-x86_64:debug:debug-x86:debug-x86-x86_64
# i686
i686=generic:generic-x86:generic-x86-i686
i686-debug=generic:generic-x86:generic-x86-i686:debug:debug-x86
# ppc64le
ppc64le=generic:generic-powerpc
ppc64le-debug=generic:generic-powerpc:debug
# s390x
s390x=generic:generic-s390x
s390x-debug=generic:generic-s390x:debug
# aarch64
aarch64=generic:generic-arm:generic-arm-aarch64
aarch64-debug=generic:generic-arm:generic-arm-aarch64:debug:debug-arm
# arm
armv7hl=generic:generic-arm:generic-arm-armv7:generic-arm-armv7-armv7
armv7hl-debug=generic:generic-arm:generic-arm-armv7:generic-arm-armv7-armv7:debug:debug-arm
armv7hl-lpae=generic:generic-arm:generic-arm-armv7:generic-arm-armv7-lpae
armv7hl-lpae-debug=generic:generic-arm:generic-arm-armv7:generic-arm-armv7-lpae:debug:debug-arm

View file

@ -0,0 +1 @@
CONFIG_ACPI_DEBUG=y

View file

@ -0,0 +1 @@
CONFIG_ARM_PTDUMP_DEBUGFS=y

View file

@ -0,0 +1 @@
CONFIG_ATH_DEBUG=y

View file

@ -0,0 +1 @@
CONFIG_B43LEGACY_DEBUG=y

View file

@ -0,0 +1 @@
CONFIG_B43_DEBUG=y

View file

@ -0,0 +1 @@
CONFIG_BLK_DEV_NULL_BLK_FAULT_INJECTION=y

View file

@ -0,0 +1 @@
CONFIG_BPF_KPROBE_OVERRIDE=y

View file

@ -0,0 +1 @@
CONFIG_CAN_DEBUG_DEVICES=y

View file

@ -0,0 +1 @@
CONFIG_CARL9170_DEBUGFS=y

View file

@ -0,0 +1 @@
CONFIG_CEPH_LIB_PRETTYDEBUG=y

View file

@ -0,0 +1 @@
CONFIG_DEBUG_ATOMIC_SLEEP=y

View file

@ -0,0 +1 @@
CONFIG_DEBUG_CREDENTIALS=y

View file

@ -0,0 +1 @@
CONFIG_DEBUG_FORCE_WEAK_PER_CPU=y

View file

@ -0,0 +1 @@
CONFIG_DEBUG_KMEMLEAK=y

View file

@ -0,0 +1 @@
CONFIG_DEBUG_KMEMLEAK_DEFAULT_OFF=y

View file

@ -0,0 +1 @@
CONFIG_DEBUG_KMEMLEAK_EARLY_LOG_SIZE=4096

View file

@ -0,0 +1 @@
CONFIG_DEBUG_LOCK_ALLOC=y

View file

@ -0,0 +1 @@
CONFIG_DEBUG_MISC=y

View file

@ -0,0 +1 @@
CONFIG_DEBUG_MUTEXES=y

View file

@ -0,0 +1 @@
CONFIG_DEBUG_NOTIFIERS=y

View file

@ -0,0 +1 @@
CONFIG_DEBUG_OBJECTS=y

View file

@ -0,0 +1 @@
CONFIG_DEBUG_OBJECTS_FREE=y

View file

@ -0,0 +1 @@
CONFIG_DEBUG_OBJECTS_PERCPU_COUNTER=y

View file

@ -0,0 +1 @@
CONFIG_DEBUG_OBJECTS_RCU_HEAD=y

View file

@ -0,0 +1 @@
CONFIG_DEBUG_OBJECTS_TIMERS=y

View file

@ -0,0 +1 @@
CONFIG_DEBUG_OBJECTS_WORK=y

View file

@ -0,0 +1 @@
CONFIG_DEBUG_PERF_USE_VMALLOC=y

View file

@ -0,0 +1 @@
CONFIG_DEBUG_PER_CPU_MAPS=y

View file

@ -0,0 +1 @@
CONFIG_DEBUG_RT_MUTEXES=y

View file

@ -0,0 +1 @@
CONFIG_DEBUG_RWSEMS=y

View file

@ -0,0 +1 @@
CONFIG_DEBUG_SG=y

View file

@ -0,0 +1 @@
CONFIG_DEBUG_SPINLOCK=y

View file

@ -0,0 +1 @@
CONFIG_DEBUG_STACK_USAGE=y

Some files were not shown because too many files have changed in this diff Show more