perf update
This commit is contained in:
@@ -83,10 +83,10 @@ diff -Nurp linux-4.2.2/Makefile linux-4.2.2-3rd/Makefile
|
||||
net-y := net/
|
||||
libs-y := lib/
|
||||
core-y := usr/
|
||||
diff -Nurp linux-4.6/scripts/kconfig/Makefile linux-4.6-3rd/scripts/kconfig/Makefile
|
||||
--- linux-4.6/scripts/kconfig/Makefile
|
||||
+++ linux-4.6-3rd/scripts/kconfig/Makefile
|
||||
@@ -18,26 +18,26 @@ endif
|
||||
diff -Nurp linux-4.9/scripts/kconfig/Makefile linux-4.9-3rd/scripts/kconfig/Makefile
|
||||
--- linux-4.9/scripts/kconfig/Makefile
|
||||
+++ linux-4.9-3rd/scripts/kconfig/Makefile
|
||||
@@ -18,28 +18,28 @@ endif
|
||||
# We need this, in case the user has it in its environment
|
||||
unexport CONFIG_
|
||||
|
||||
@@ -113,6 +113,8 @@ diff -Nurp linux-4.6/scripts/kconfig/Makefile linux-4.6-3rd/scripts/kconfig/Make
|
||||
-silentoldconfig: $(obj)/conf
|
||||
+silentoldconfig: $(obj)/conf 3rdparty/Makefile
|
||||
$(Q)mkdir -p include/config include/generated
|
||||
$(Q)test -e include/generated/autoksyms.h || \
|
||||
touch include/generated/autoksyms.h
|
||||
$< $(silent) --$@ $(Kconfig)
|
||||
|
||||
-localyesconfig localmodconfig: $(obj)/streamline_config.pl $(obj)/conf
|
||||
@@ -120,7 +122,7 @@ diff -Nurp linux-4.6/scripts/kconfig/Makefile linux-4.6-3rd/scripts/kconfig/Make
|
||||
$(Q)mkdir -p include/config include/generated
|
||||
$(Q)perl $< --$@ $(srctree) $(Kconfig) > .tmp.config
|
||||
$(Q)if [ -f .config ]; then \
|
||||
@@ -80,7 +80,7 @@ simple-targets := oldconfig allnoconfig
|
||||
@@ -82,7 +82,7 @@ simple-targets := oldconfig allnoconfig
|
||||
alldefconfig randconfig listnewconfig olddefconfig
|
||||
PHONY += $(simple-targets)
|
||||
|
||||
@@ -129,7 +131,7 @@ diff -Nurp linux-4.6/scripts/kconfig/Makefile linux-4.6-3rd/scripts/kconfig/Make
|
||||
$< $(silent) --$@ $(Kconfig)
|
||||
|
||||
PHONY += oldnoconfig savedefconfig defconfig
|
||||
@@ -88,12 +88,12 @@ PHONY += oldnoconfig savedefconfig defco
|
||||
@@ -90,12 +90,12 @@ PHONY += oldnoconfig savedefconfig defco
|
||||
# oldnoconfig is an alias of olddefconfig, because people already are dependent
|
||||
# on its behavior (sets new symbols to their default value but not 'n') with the
|
||||
# counter-intuitive name.
|
||||
@@ -145,7 +147,7 @@ diff -Nurp linux-4.6/scripts/kconfig/Makefile linux-4.6-3rd/scripts/kconfig/Make
|
||||
ifeq ($(KBUILD_DEFCONFIG),)
|
||||
$< $(silent) --defconfig $(Kconfig)
|
||||
else
|
||||
@@ -106,26 +106,26 @@ else
|
||||
@@ -108,26 +108,26 @@ else
|
||||
endif
|
||||
endif
|
||||
|
||||
@@ -177,7 +179,7 @@ diff -Nurp linux-4.6/scripts/kconfig/Makefile linux-4.6-3rd/scripts/kconfig/Make
|
||||
$(Q)$(MAKE) -f $(srctree)/Makefile allnoconfig tiny.config
|
||||
|
||||
# Help text used by make help
|
||||
@@ -188,6 +188,9 @@ gconf-objs := gconf.o zconf.tab.o
|
||||
@@ -190,6 +190,9 @@ gconf-objs := gconf.o zconf.tab.o
|
||||
|
||||
hostprogs-y := conf nconf mconf kxgettext qconf gconf
|
||||
|
||||
|
||||
@@ -1,178 +0,0 @@
|
||||
|
||||
Fix building with kernel-4.7 series.
|
||||
|
||||
Signed-off-by: Thomas Backlund <tmb@mageia.org>
|
||||
|
||||
3rdparty/rtl8723bs/os_dep/ioctl_cfg80211.c | 32 ++++++++++++++---------------
|
||||
3rdparty/rtl8723bs/os_dep/wifi_regd.c | 6 ++---
|
||||
2 files changed, 19 insertions(+), 19 deletions(-)
|
||||
|
||||
diff -urp linux/3rdparty/rtl8723bs.orig/os_dep/ioctl_cfg80211.c linux/3rdparty/rtl8723bs/os_dep/ioctl_cfg80211.c
|
||||
--- linux/3rdparty/rtl8723bs.orig/os_dep/ioctl_cfg80211.c 2016-07-04 20:00:13.000000000 +0300
|
||||
+++ linux/3rdparty/rtl8723bs/os_dep/ioctl_cfg80211.c 2016-07-04 20:37:45.054379270 +0300
|
||||
@@ -44,7 +44,7 @@ static const u32 rtw_cipher_suites[] = {
|
||||
}
|
||||
|
||||
#define CHAN2G(_channel, _freq, _flags) { \
|
||||
- .band = IEEE80211_BAND_2GHZ, \
|
||||
+ .band = NL80211_BAND_2GHZ, \
|
||||
.center_freq = (_freq), \
|
||||
.hw_value = (_channel), \
|
||||
.flags = (_flags), \
|
||||
@@ -120,13 +120,13 @@ static void rtw_2g_rates_init(struct iee
|
||||
}
|
||||
|
||||
static struct ieee80211_supported_band *rtw_spt_band_alloc(
|
||||
- enum ieee80211_band band
|
||||
+ enum nl80211_band band
|
||||
)
|
||||
{
|
||||
struct ieee80211_supported_band *spt_band = NULL;
|
||||
int n_channels, n_bitrates;
|
||||
|
||||
- if (band == IEEE80211_BAND_2GHZ)
|
||||
+ if (band == NL80211_BAND_2GHZ)
|
||||
{
|
||||
n_channels = RTW_2G_CHANNELS_NUM;
|
||||
n_bitrates = RTW_G_RATES_NUM;
|
||||
@@ -150,7 +150,7 @@ static struct ieee80211_supported_band *
|
||||
spt_band->n_channels = n_channels;
|
||||
spt_band->n_bitrates = n_bitrates;
|
||||
|
||||
- if (band == IEEE80211_BAND_2GHZ)
|
||||
+ if (band == NL80211_BAND_2GHZ)
|
||||
{
|
||||
rtw_2g_channels_init(spt_band->channels);
|
||||
rtw_2g_rates_init(spt_band->bitrates);
|
||||
@@ -170,7 +170,7 @@ static void rtw_spt_band_free(struct iee
|
||||
if (!spt_band)
|
||||
return;
|
||||
|
||||
- if (spt_band->band == IEEE80211_BAND_2GHZ)
|
||||
+ if (spt_band->band == NL80211_BAND_2GHZ)
|
||||
{
|
||||
size = sizeof(struct ieee80211_supported_band)
|
||||
+ sizeof(struct ieee80211_channel)*RTW_2G_CHANNELS_NUM
|
||||
@@ -232,7 +232,7 @@ static int rtw_ieee80211_channel_to_freq
|
||||
{
|
||||
/* see 802.11 17.3.8.3.2 and Annex J
|
||||
* there are overlapping channel numbers in 5GHz and 2GHz bands */
|
||||
- if (band == IEEE80211_BAND_2GHZ) {
|
||||
+ if (band == NL80211_BAND_2GHZ) {
|
||||
if (chan == 14)
|
||||
return 2484;
|
||||
else if (chan < 14)
|
||||
@@ -336,7 +336,7 @@ struct cfg80211_bss *rtw_cfg80211_inform
|
||||
|
||||
|
||||
channel = pnetwork->network.Configuration.DSConfig;
|
||||
- freq = rtw_ieee80211_channel_to_frequency(channel, IEEE80211_BAND_2GHZ);
|
||||
+ freq = rtw_ieee80211_channel_to_frequency(channel, NL80211_BAND_2GHZ);
|
||||
|
||||
notify_channel = ieee80211_get_channel(wiphy, freq);
|
||||
|
||||
@@ -420,7 +420,7 @@ int rtw_cfg80211_check_bss(struct adapte
|
||||
if (!(pnetwork) || !(padapter->rtw_wdev))
|
||||
return false;
|
||||
|
||||
- freq = rtw_ieee80211_channel_to_frequency(pnetwork->Configuration.DSConfig, IEEE80211_BAND_2GHZ);
|
||||
+ freq = rtw_ieee80211_channel_to_frequency(pnetwork->Configuration.DSConfig, NL80211_BAND_2GHZ);
|
||||
|
||||
notify_channel = ieee80211_get_channel(padapter->rtw_wdev->wiphy, freq);
|
||||
bss = cfg80211_get_bss(padapter->rtw_wdev->wiphy, notify_channel,
|
||||
@@ -542,7 +542,7 @@ check_bss:
|
||||
u32 freq;
|
||||
u16 channel = cur_network->network.Configuration.DSConfig;
|
||||
|
||||
- freq = rtw_ieee80211_channel_to_frequency(channel, IEEE80211_BAND_2GHZ);
|
||||
+ freq = rtw_ieee80211_channel_to_frequency(channel, NL80211_BAND_2GHZ);
|
||||
|
||||
notify_channel = ieee80211_get_channel(wiphy, freq);
|
||||
|
||||
@@ -3064,7 +3064,7 @@ void rtw_cfg80211_rx_action(struct adapt
|
||||
else
|
||||
DBG_871X("RTW_Rx:category(%u), action(%u)\n", category, action);
|
||||
|
||||
- freq = rtw_ieee80211_channel_to_frequency(channel, IEEE80211_BAND_2GHZ);
|
||||
+ freq = rtw_ieee80211_channel_to_frequency(channel, NL80211_BAND_2GHZ);
|
||||
|
||||
rtw_cfg80211_rx_mgmt(adapter, freq, 0, frame, frame_len, GFP_ATOMIC);
|
||||
}
|
||||
@@ -3311,7 +3311,7 @@ static int cfg80211_rtw_sched_scan_stop(
|
||||
}
|
||||
#endif /* CONFIG_PNO_SUPPORT */
|
||||
|
||||
-static void rtw_cfg80211_init_ht_capab(struct ieee80211_sta_ht_cap *ht_cap, enum ieee80211_band band, u8 rf_type)
|
||||
+static void rtw_cfg80211_init_ht_capab(struct ieee80211_sta_ht_cap *ht_cap, enum nl80211_band band, u8 rf_type)
|
||||
{
|
||||
|
||||
#define MAX_BIT_RATE_40MHZ_MCS15 300 /* Mbps */
|
||||
@@ -3335,7 +3335,7 @@ static void rtw_cfg80211_init_ht_capab(s
|
||||
ht_cap->mcs.tx_params = IEEE80211_HT_MCS_TX_DEFINED;
|
||||
|
||||
/*
|
||||
- *hw->wiphy->bands[IEEE80211_BAND_2GHZ]
|
||||
+ *hw->wiphy->bands[NL80211_BAND_2GHZ]
|
||||
*base on ant_num
|
||||
*rx_mask: RX mask
|
||||
*if rx_ant = 1 rx_mask[0]= 0xff;==>MCS0-MCS7
|
||||
@@ -3379,9 +3379,9 @@ void rtw_cfg80211_init_wiphy(struct adap
|
||||
DBG_8192C("%s:rf_type =%d\n", __func__, rf_type);
|
||||
|
||||
{
|
||||
- bands = wiphy->bands[IEEE80211_BAND_2GHZ];
|
||||
+ bands = wiphy->bands[NL80211_BAND_2GHZ];
|
||||
if (bands)
|
||||
- rtw_cfg80211_init_ht_capab(&bands->ht_cap, IEEE80211_BAND_2GHZ, rf_type);
|
||||
+ rtw_cfg80211_init_ht_capab(&bands->ht_cap, NL80211_BAND_2GHZ, rf_type);
|
||||
}
|
||||
|
||||
/* init regulary domain */
|
||||
@@ -3417,7 +3417,7 @@ static void rtw_cfg80211_preinit_wiphy(s
|
||||
wiphy->n_cipher_suites = ARRAY_SIZE(rtw_cipher_suites);
|
||||
|
||||
/* if (padapter->registrypriv.wireless_mode & WIRELESS_11G) */
|
||||
- wiphy->bands[IEEE80211_BAND_2GHZ] = rtw_spt_band_alloc(IEEE80211_BAND_2GHZ);
|
||||
+ wiphy->bands[NL80211_BAND_2GHZ] = rtw_spt_band_alloc(NL80211_BAND_2GHZ);
|
||||
|
||||
wiphy->flags |= WIPHY_FLAG_HAS_REMAIN_ON_CHANNEL;
|
||||
wiphy->flags |= WIPHY_FLAG_OFFCHAN_TX | WIPHY_FLAG_HAVE_AP_SME;
|
||||
@@ -3564,7 +3564,7 @@ void rtw_wdev_free(struct wireless_dev *
|
||||
if (!wdev)
|
||||
return;
|
||||
|
||||
- rtw_spt_band_free(wdev->wiphy->bands[IEEE80211_BAND_2GHZ]);
|
||||
+ rtw_spt_band_free(wdev->wiphy->bands[NL80211_BAND_2GHZ]);
|
||||
|
||||
wiphy_free(wdev->wiphy);
|
||||
|
||||
diff -urp linux/3rdparty/rtl8723bs.orig/os_dep/wifi_regd.c linux/3rdparty/rtl8723bs/os_dep/wifi_regd.c
|
||||
--- linux/3rdparty/rtl8723bs.orig/os_dep/wifi_regd.c 2016-07-04 20:00:13.000000000 +0300
|
||||
+++ linux/3rdparty/rtl8723bs/os_dep/wifi_regd.c 2016-07-04 20:35:31.427278665 +0300
|
||||
@@ -105,7 +105,7 @@ static int rtw_ieee80211_channel_to_freq
|
||||
/* see 802.11 17.3.8.3.2 and Annex J
|
||||
* there are overlapping channel numbers in 5GHz and 2GHz bands */
|
||||
|
||||
- /* IEEE80211_BAND_2GHZ */
|
||||
+ /* NL80211_BAND_2GHZ */
|
||||
if (chan == 14)
|
||||
return 2484;
|
||||
else if (chan < 14)
|
||||
@@ -128,7 +128,7 @@ static void _rtw_reg_apply_flags(struct
|
||||
u32 freq;
|
||||
|
||||
/* all channels disable */
|
||||
- for (i = 0; i < IEEE80211_NUM_BANDS; i++) {
|
||||
+ for (i = 0; i < NUM_NL80211_BANDS; i++) {
|
||||
sband = wiphy->bands[i];
|
||||
|
||||
if (sband) {
|
||||
@@ -146,7 +146,7 @@ static void _rtw_reg_apply_flags(struct
|
||||
channel = channel_set[i].ChannelNum;
|
||||
freq =
|
||||
rtw_ieee80211_channel_to_frequency(channel,
|
||||
- IEEE80211_BAND_2GHZ);
|
||||
+ NL80211_BAND_2GHZ);
|
||||
|
||||
ch = ieee80211_get_channel(wiphy, freq);
|
||||
if (ch) {
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
-57
@@ -1,57 +0,0 @@
|
||||
From 12d868964f7352e8b18e755488f7265a93431de1 Mon Sep 17 00:00:00 2001
|
||||
From: Dmitry Tunin <hanipouspilot@gmail.com>
|
||||
Date: Tue, 12 Jul 2016 01:35:18 +0300
|
||||
Subject: [PATCH] Bluetooth: Add support of 13d3:3490 AR3012 device
|
||||
|
||||
T: Bus=01 Lev=01 Prnt=01 Port=07 Cnt=05 Dev#= 5 Spd=12 MxCh= 0
|
||||
D: Ver= 1.10 Cls=e0(wlcon) Sub=01 Prot=01 MxPS=64 #Cfgs= 1
|
||||
P: Vendor=13d3 ProdID=3490 Rev=00.01
|
||||
C: #Ifs= 2 Cfg#= 1 Atr=e0 MxPwr=100mA
|
||||
I: If#= 0 Alt= 0 #EPs= 3 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb
|
||||
I: If#= 1 Alt= 0 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb
|
||||
|
||||
BugLink: https://bugs.launchpad.net/bugs/1600623
|
||||
|
||||
Signed-off-by: Dmitry Tunin <hanipouspilot@gmail.com>
|
||||
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
|
||||
Cc: stable@vger.kernel.org
|
||||
---
|
||||
drivers/bluetooth/ath3k.c | 2 ++
|
||||
drivers/bluetooth/btusb.c | 1 +
|
||||
2 files changed, 3 insertions(+)
|
||||
|
||||
diff --git a/drivers/bluetooth/ath3k.c b/drivers/bluetooth/ath3k.c
|
||||
index 2589468..fadba88 100644
|
||||
--- a/drivers/bluetooth/ath3k.c
|
||||
+++ b/drivers/bluetooth/ath3k.c
|
||||
@@ -123,6 +123,7 @@ static const struct usb_device_id ath3k_table[] = {
|
||||
{ USB_DEVICE(0x13d3, 0x3472) },
|
||||
{ USB_DEVICE(0x13d3, 0x3474) },
|
||||
{ USB_DEVICE(0x13d3, 0x3487) },
|
||||
+ { USB_DEVICE(0x13d3, 0x3490) },
|
||||
|
||||
/* Atheros AR5BBU12 with sflash firmware */
|
||||
{ USB_DEVICE(0x0489, 0xE02C) },
|
||||
@@ -190,6 +191,7 @@ static const struct usb_device_id ath3k_blist_tbl[] = {
|
||||
{ USB_DEVICE(0x13d3, 0x3472), .driver_info = BTUSB_ATH3012 },
|
||||
{ USB_DEVICE(0x13d3, 0x3474), .driver_info = BTUSB_ATH3012 },
|
||||
{ USB_DEVICE(0x13d3, 0x3487), .driver_info = BTUSB_ATH3012 },
|
||||
+ { USB_DEVICE(0x13d3, 0x3490), .driver_info = BTUSB_ATH3012 },
|
||||
|
||||
/* Atheros AR5BBU22 with sflash firmware */
|
||||
{ USB_DEVICE(0x0489, 0xE036), .driver_info = BTUSB_ATH3012 },
|
||||
diff --git a/drivers/bluetooth/btusb.c b/drivers/bluetooth/btusb.c
|
||||
index f2e8fd7..811f9b9 100644
|
||||
--- a/drivers/bluetooth/btusb.c
|
||||
+++ b/drivers/bluetooth/btusb.c
|
||||
@@ -237,6 +237,7 @@ static const struct usb_device_id blacklist_table[] = {
|
||||
{ USB_DEVICE(0x13d3, 0x3472), .driver_info = BTUSB_ATH3012 },
|
||||
{ USB_DEVICE(0x13d3, 0x3474), .driver_info = BTUSB_ATH3012 },
|
||||
{ USB_DEVICE(0x13d3, 0x3487), .driver_info = BTUSB_ATH3012 },
|
||||
+ { USB_DEVICE(0x13d3, 0x3490), .driver_info = BTUSB_ATH3012 },
|
||||
|
||||
/* Atheros AR5BBU12 with sflash firmware */
|
||||
{ USB_DEVICE(0x0489, 0xe02c), .driver_info = BTUSB_IGNORE },
|
||||
--
|
||||
2.9.2
|
||||
|
||||
-116
@@ -1,116 +0,0 @@
|
||||
From 67f8ecc550b5bda03335f845dc869b8501d25fd0 Mon Sep 17 00:00:00 2001
|
||||
From: Roderick Colenbrander <roderick.colenbrander@sony.com>
|
||||
Date: Wed, 18 May 2016 13:11:09 -0700
|
||||
Subject: [PATCH] HID: uhid: fix timeout when probe races with IO
|
||||
|
||||
Many devices use userspace bluetooth stacks like BlueZ or Bluedroid in combination
|
||||
with uhid. If any of these stacks is used with a HID device for which the driver
|
||||
performs a HID request as part .probe (or technically another HID operation),
|
||||
this results in a deadlock situation. The deadlock results in a 5 second timeout
|
||||
for I/O operations in HID drivers, so isn't fatal, but none of the I/O operations
|
||||
have a chance of succeeding.
|
||||
|
||||
The root cause for the problem is that uhid only allows for one request to be
|
||||
processed at a time per uhid instance and locks out other operations. This means
|
||||
that if a user space is creating a new HID device through 'UHID_CREATE', which
|
||||
ultimately triggers '.probe' through the HID layer. Then any HID request e.g. a
|
||||
read for calibration data would trigger a HID operation on uhid again, but it
|
||||
won't go out to userspace, because it is still stuck in UHID_CREATE.
|
||||
In addition bluetooth stacks are typically single threaded, so they wouldn't be
|
||||
able to handle any requests while waiting on uhid.
|
||||
|
||||
Lucikly the UHID spec is somewhat flexible and allows for fixing the issue,
|
||||
without breaking user space. The idea which the patch implements as discussed
|
||||
with David Herrmann is to decouple adding of a hid device (which triggers .probe)
|
||||
from UHID_CREATE. The work will kick off roughly once UHID_CREATE completed (or
|
||||
else will wait a tiny bit of time in .probe for a lock). A HID driver has to call
|
||||
HID to call 'hid_hw_start()' as part of .probe once it is ready for I/O, which
|
||||
triggers UHID_START to user space. Any HID operations should function now within
|
||||
.probe and won't deadlock because userspace is stuck on UHID_CREATE.
|
||||
|
||||
We verified this patch on Bluedroid with Android 6.0 and on desktop Linux with
|
||||
BlueZ stacks. Prior to the patch they had the deadlock issue.
|
||||
|
||||
[jkosina@suse.cz: reword subject]
|
||||
Signed-off-by: Roderick Colenbrander <roderick.colenbrander@sony.com>
|
||||
Cc: stable@vger.kernel.org
|
||||
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
|
||||
---
|
||||
drivers/hid/uhid.c | 33 ++++++++++++++++++++++++---------
|
||||
1 file changed, 24 insertions(+), 9 deletions(-)
|
||||
|
||||
diff --git a/drivers/hid/uhid.c b/drivers/hid/uhid.c
|
||||
index 16b6f11..99ec3ff 100644
|
||||
--- a/drivers/hid/uhid.c
|
||||
+++ b/drivers/hid/uhid.c
|
||||
@@ -51,10 +51,26 @@ struct uhid_device {
|
||||
u32 report_id;
|
||||
u32 report_type;
|
||||
struct uhid_event report_buf;
|
||||
+ struct work_struct worker;
|
||||
};
|
||||
|
||||
static struct miscdevice uhid_misc;
|
||||
|
||||
+static void uhid_device_add_worker(struct work_struct *work)
|
||||
+{
|
||||
+ struct uhid_device *uhid = container_of(work, struct uhid_device, worker);
|
||||
+ int ret;
|
||||
+
|
||||
+ ret = hid_add_device(uhid->hid);
|
||||
+ if (ret) {
|
||||
+ hid_err(uhid->hid, "Cannot register HID device: error %d\n", ret);
|
||||
+
|
||||
+ hid_destroy_device(uhid->hid);
|
||||
+ uhid->hid = NULL;
|
||||
+ uhid->running = false;
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
static void uhid_queue(struct uhid_device *uhid, struct uhid_event *ev)
|
||||
{
|
||||
__u8 newhead;
|
||||
@@ -498,18 +514,14 @@ static int uhid_dev_create2(struct uhid_device *uhid,
|
||||
uhid->hid = hid;
|
||||
uhid->running = true;
|
||||
|
||||
- ret = hid_add_device(hid);
|
||||
- if (ret) {
|
||||
- hid_err(hid, "Cannot register HID device\n");
|
||||
- goto err_hid;
|
||||
- }
|
||||
+ /* Adding of a HID device is done through a worker, to allow HID drivers
|
||||
+ * which use feature requests during .probe to work, without they would
|
||||
+ * be blocked on devlock, which is held by uhid_char_write.
|
||||
+ */
|
||||
+ schedule_work(&uhid->worker);
|
||||
|
||||
return 0;
|
||||
|
||||
-err_hid:
|
||||
- hid_destroy_device(hid);
|
||||
- uhid->hid = NULL;
|
||||
- uhid->running = false;
|
||||
err_free:
|
||||
kfree(uhid->rd_data);
|
||||
uhid->rd_data = NULL;
|
||||
@@ -550,6 +562,8 @@ static int uhid_dev_destroy(struct uhid_device *uhid)
|
||||
uhid->running = false;
|
||||
wake_up_interruptible(&uhid->report_wait);
|
||||
|
||||
+ cancel_work_sync(&uhid->worker);
|
||||
+
|
||||
hid_destroy_device(uhid->hid);
|
||||
kfree(uhid->rd_data);
|
||||
|
||||
@@ -612,6 +626,7 @@ static int uhid_char_open(struct inode *inode, struct file *file)
|
||||
init_waitqueue_head(&uhid->waitq);
|
||||
init_waitqueue_head(&uhid->report_wait);
|
||||
uhid->running = false;
|
||||
+ INIT_WORK(&uhid->worker, uhid_device_add_worker);
|
||||
|
||||
file->private_data = uhid;
|
||||
nonseekable_open(inode, file);
|
||||
--
|
||||
2.9.2
|
||||
|
||||
-75
@@ -1,75 +0,0 @@
|
||||
From da7d3abe1c9e5ebac2cf86f97e9e89888a5e2094 Mon Sep 17 00:00:00 2001
|
||||
From: Andreas Herrmann <aherrmann@suse.com>
|
||||
Date: Fri, 22 Jul 2016 17:14:11 +0200
|
||||
Subject: [PATCH] Revert "cpufreq: pcc-cpufreq: update default value of
|
||||
cpuinfo_transition_latency"
|
||||
|
||||
This reverts commit 790d849bf811a8ab5d4cd2cce0f6fda92f6aebf2.
|
||||
|
||||
Using a v4.7-rc7 kernel on a HP ProLiant triggered following messages
|
||||
|
||||
pcc-cpufreq: (v1.10.00) driver loaded with frequency limits: 1200 MHz, 2800 MHz
|
||||
cpufreq: ondemand governor failed, too long transition latency of HW, fallback to performance governor
|
||||
|
||||
The last line was shown for each CPU in the system.
|
||||
Testing v4.5 (where commit 790d849b was integrated) triggered
|
||||
similar messages. Same behaviour on a 2nd HP Proliant system.
|
||||
|
||||
So commit 790d849bf (cpufreq: pcc-cpufreq: update default value of
|
||||
cpuinfo_transition_latency) causes the system to use performance
|
||||
governor which, I guess, was not the intention of the patch.
|
||||
|
||||
Enabling debug output in pcc-cpufreq provides following verbose output:
|
||||
|
||||
pcc-cpufreq: (v1.10.00) driver loaded with frequency limits: 1200 MHz, 2800 MHz
|
||||
pcc_get_offset: for CPU 0: pcc_cpu_data input_offset: 0x44, pcc_cpu_data output_offset: 0x48
|
||||
init: policy->max is 2800000, policy->min is 1200000
|
||||
get: get_freq for CPU 0
|
||||
get: SUCCESS: (virtual) output_offset for cpu 0 is 0xffffc9000d7c0048, contains a value of: 0xff06. Speed is: 168000 MHz
|
||||
cpufreq: ondemand governor failed, too long transition latency of HW, fallback to performance governor
|
||||
target: CPU 0 should go to target freq: 2800000 (virtual) input_offset is 0xffffc9000d7c0044
|
||||
target: was SUCCESSFUL for cpu 0
|
||||
|
||||
I am asking to revert 790d849bf to re-enable usage of ondemand
|
||||
governor with pcc-cpufreq.
|
||||
|
||||
Fixes: 790d849bf (cpufreq: pcc-cpufreq: update default value of cpuinfo_transition_latency)
|
||||
CC: <stable@vger.kernel.org> # 4.5+
|
||||
Signed-off-by: Andreas Herrmann <aherrmann@suse.com>
|
||||
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
|
||||
---
|
||||
Documentation/cpu-freq/pcc-cpufreq.txt | 4 ++--
|
||||
drivers/cpufreq/pcc-cpufreq.c | 2 --
|
||||
2 files changed, 2 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/Documentation/cpu-freq/pcc-cpufreq.txt b/Documentation/cpu-freq/pcc-cpufreq.txt
|
||||
index 0a94224..9e3c3b3 100644
|
||||
--- a/Documentation/cpu-freq/pcc-cpufreq.txt
|
||||
+++ b/Documentation/cpu-freq/pcc-cpufreq.txt
|
||||
@@ -159,8 +159,8 @@ to be strictly associated with a P-state.
|
||||
|
||||
2.2 cpuinfo_transition_latency:
|
||||
-------------------------------
|
||||
-The cpuinfo_transition_latency field is CPUFREQ_ETERNAL. The PCC specification
|
||||
-does not include a field to expose this value currently.
|
||||
+The cpuinfo_transition_latency field is 0. The PCC specification does
|
||||
+not include a field to expose this value currently.
|
||||
|
||||
2.3 cpuinfo_cur_freq:
|
||||
---------------------
|
||||
diff --git a/drivers/cpufreq/pcc-cpufreq.c b/drivers/cpufreq/pcc-cpufreq.c
|
||||
index a7ecb9a..3f0ce2a 100644
|
||||
--- a/drivers/cpufreq/pcc-cpufreq.c
|
||||
+++ b/drivers/cpufreq/pcc-cpufreq.c
|
||||
@@ -555,8 +555,6 @@ static int pcc_cpufreq_cpu_init(struct cpufreq_policy *policy)
|
||||
policy->min = policy->cpuinfo.min_freq =
|
||||
ioread32(&pcch_hdr->minimum_frequency) * 1000;
|
||||
|
||||
- policy->cpuinfo.transition_latency = CPUFREQ_ETERNAL;
|
||||
-
|
||||
pr_debug("init: policy->max is %d, policy->min is %d\n",
|
||||
policy->max, policy->min);
|
||||
out:
|
||||
--
|
||||
2.9.2
|
||||
|
||||
-70
@@ -1,70 +0,0 @@
|
||||
From ca45663819accf038291dbe2d67ed66dc48d714c Mon Sep 17 00:00:00 2001
|
||||
From: Thomas Backlund <tmb@mageia.org>
|
||||
Date: Sun, 29 Nov 2015 14:44:22 +0200
|
||||
Subject: [PATCH] Revert "x86/mm/mtrr: Remove kernel internal MTRR interfaces:
|
||||
unexport mtrr_add() and mtrr_del()"
|
||||
|
||||
This reverts commit 2baa891e42d84159b693eadd44f6fe1486285bdc.
|
||||
|
||||
It currently breaks nvidia304 driver.
|
||||
|
||||
Signed-of-by: Thomas Backlund <tmb@mageia.org>
|
||||
---
|
||||
Documentation/x86/mtrr.txt | 20 ++++----------------
|
||||
arch/x86/kernel/cpu/mtrr/main.c | 2 ++
|
||||
2 files changed, 6 insertions(+), 16 deletions(-)
|
||||
|
||||
diff --git a/Documentation/x86/mtrr.txt b/Documentation/x86/mtrr.txt
|
||||
index dc3e703..860bc3a 100644
|
||||
--- a/Documentation/x86/mtrr.txt
|
||||
+++ b/Documentation/x86/mtrr.txt
|
||||
@@ -6,22 +6,10 @@ Luis R. Rodriguez <mcgrof@do-not-panic.com> - April 9, 2015
|
||||
===============================================================================
|
||||
Phasing out MTRR use
|
||||
|
||||
-MTRR use is replaced on modern x86 hardware with PAT. Direct MTRR use by
|
||||
-drivers on Linux is now completely phased out, device drivers should use
|
||||
-arch_phys_wc_add() in combination with ioremap_wc() to make MTRR effective on
|
||||
-non-PAT systems while a no-op but equally effective on PAT enabled systems.
|
||||
-
|
||||
-Even if Linux does not use MTRRs directly, some x86 platform firmware may still
|
||||
-set up MTRRs early before booting the OS. They do this as some platform
|
||||
-firmware may still have implemented access to MTRRs which would be controlled
|
||||
-and handled by the platform firmware directly. An example of platform use of
|
||||
-MTRRs is through the use of SMI handlers, one case could be for fan control,
|
||||
-the platform code would need uncachable access to some of its fan control
|
||||
-registers. Such platform access does not need any Operating System MTRR code in
|
||||
-place other than mtrr_type_lookup() to ensure any OS specific mapping requests
|
||||
-are aligned with platform MTRR setup. If MTRRs are only set up by the platform
|
||||
-firmware code though and the OS does not make any specific MTRR mapping
|
||||
-requests mtrr_type_lookup() should always return MTRR_TYPE_INVALID.
|
||||
+MTRR use is replaced on modern x86 hardware with PAT. Over time the only type
|
||||
+of effective MTRR that is expected to be supported will be for write-combining.
|
||||
+As MTRR use is phased out device drivers should use arch_phys_wc_add() to make
|
||||
+MTRR effective on non-PAT systems while a no-op on PAT enabled systems.
|
||||
|
||||
For details refer to Documentation/x86/pat.txt.
|
||||
|
||||
diff --git a/arch/x86/kernel/cpu/mtrr/main.c b/arch/x86/kernel/cpu/mtrr/main.c
|
||||
index f891b47..e7ed0d8 100644
|
||||
--- a/arch/x86/kernel/cpu/mtrr/main.c
|
||||
+++ b/arch/x86/kernel/cpu/mtrr/main.c
|
||||
@@ -448,6 +448,7 @@ int mtrr_add(unsigned long base, unsigned long size, unsigned int type,
|
||||
return mtrr_add_page(base >> PAGE_SHIFT, size >> PAGE_SHIFT, type,
|
||||
increment);
|
||||
}
|
||||
+EXPORT_SYMBOL(mtrr_add);
|
||||
|
||||
/**
|
||||
* mtrr_del_page - delete a memory type region
|
||||
@@ -536,6 +537,7 @@ int mtrr_del(int reg, unsigned long base, unsigned long size)
|
||||
return -EINVAL;
|
||||
return mtrr_del_page(reg, base >> PAGE_SHIFT, size >> PAGE_SHIFT);
|
||||
}
|
||||
+EXPORT_SYMBOL(mtrr_del);
|
||||
|
||||
/**
|
||||
* arch_phys_wc_add - add a WC MTRR and handle errors if PAT is unavailable
|
||||
--
|
||||
2.3.10
|
||||
|
||||
+192
@@ -0,0 +1,192 @@
|
||||
From 760235cd6ca8ae0d7509055d75a0f1d8b3c60668 Mon Sep 17 00:00:00 2001
|
||||
From: Lv Zheng <lv.zheng@intel.com>
|
||||
Date: Wed, 30 Nov 2016 15:21:12 +0800
|
||||
Subject: [PATCH] ACPICA: Events: Fix acpi_ev_initialize_region() return value
|
||||
|
||||
ACPICA commit 543342ab7a676f4eb0c9f100d349388a84dff0e8
|
||||
|
||||
This patch changes acpi_ev_initialize_region(), stop returning AE_NOT_EXIST
|
||||
from it so that, not only in acpi_ds_load2_end_op(), but all places invoking
|
||||
this function won't emit exceptions. The exception can be seen in
|
||||
acpi_ds_initialize_objects() when certain table loading mode is chosen.
|
||||
|
||||
This patch also removes useless acpi_ns_locked from acpi_ev_initialize_region()
|
||||
as this function will always be invoked with interpreter lock held now, and
|
||||
the lock granularity has been tuned to lock around _REG execution, thus it
|
||||
is now handled by acpi_ex_exit_interpreter(). Lv Zheng.
|
||||
|
||||
Link: https://github.com/acpica/acpica/commit/543342ab
|
||||
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
|
||||
Signed-off-by: Bob Moore <robert.moore@intel.com>
|
||||
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
|
||||
---
|
||||
drivers/acpi/acpica/acevents.h | 4 +--
|
||||
drivers/acpi/acpica/dsopcode.c | 2 +-
|
||||
drivers/acpi/acpica/dswload2.c | 13 +---------
|
||||
drivers/acpi/acpica/evrgnini.c | 59 +++++++++++++++++-------------------------
|
||||
4 files changed, 27 insertions(+), 51 deletions(-)
|
||||
|
||||
diff --git a/drivers/acpi/acpica/acevents.h b/drivers/acpi/acpica/acevents.h
|
||||
index 92fa47c..8a0049d 100644
|
||||
--- a/drivers/acpi/acpica/acevents.h
|
||||
+++ b/drivers/acpi/acpica/acevents.h
|
||||
@@ -243,9 +243,7 @@ acpi_ev_default_region_setup(acpi_handle handle,
|
||||
u32 function,
|
||||
void *handler_context, void **region_context);
|
||||
|
||||
-acpi_status
|
||||
-acpi_ev_initialize_region(union acpi_operand_object *region_obj,
|
||||
- u8 acpi_ns_locked);
|
||||
+acpi_status acpi_ev_initialize_region(union acpi_operand_object *region_obj);
|
||||
|
||||
/*
|
||||
* evsci - SCI (System Control Interrupt) handling/dispatch
|
||||
diff --git a/drivers/acpi/acpica/dsopcode.c b/drivers/acpi/acpica/dsopcode.c
|
||||
index 4cc9d98..77fd7c8 100644
|
||||
--- a/drivers/acpi/acpica/dsopcode.c
|
||||
+++ b/drivers/acpi/acpica/dsopcode.c
|
||||
@@ -84,7 +84,7 @@ acpi_status acpi_ds_initialize_region(acpi_handle obj_handle)
|
||||
|
||||
/* Namespace is NOT locked */
|
||||
|
||||
- status = acpi_ev_initialize_region(obj_desc, FALSE);
|
||||
+ status = acpi_ev_initialize_region(obj_desc);
|
||||
return (status);
|
||||
}
|
||||
|
||||
diff --git a/drivers/acpi/acpica/dswload2.c b/drivers/acpi/acpica/dswload2.c
|
||||
index e362182..651f35a 100644
|
||||
--- a/drivers/acpi/acpica/dswload2.c
|
||||
+++ b/drivers/acpi/acpica/dswload2.c
|
||||
@@ -609,18 +609,7 @@ acpi_status acpi_ds_load2_end_op(struct acpi_walk_state *walk_state)
|
||||
|
||||
status =
|
||||
acpi_ev_initialize_region
|
||||
- (acpi_ns_get_attached_object(node), FALSE);
|
||||
-
|
||||
- if (ACPI_FAILURE(status)) {
|
||||
- /*
|
||||
- * If AE_NOT_EXIST is returned, it is not fatal
|
||||
- * because many regions get created before a handler
|
||||
- * is installed for said region.
|
||||
- */
|
||||
- if (AE_NOT_EXIST == status) {
|
||||
- status = AE_OK;
|
||||
- }
|
||||
- }
|
||||
+ (acpi_ns_get_attached_object(node));
|
||||
break;
|
||||
|
||||
case AML_NAME_OP:
|
||||
diff --git a/drivers/acpi/acpica/evrgnini.c b/drivers/acpi/acpica/evrgnini.c
|
||||
index 75ddd16..a909225 100644
|
||||
--- a/drivers/acpi/acpica/evrgnini.c
|
||||
+++ b/drivers/acpi/acpica/evrgnini.c
|
||||
@@ -479,7 +479,6 @@ acpi_ev_default_region_setup(acpi_handle handle,
|
||||
* FUNCTION: acpi_ev_initialize_region
|
||||
*
|
||||
* PARAMETERS: region_obj - Region we are initializing
|
||||
- * acpi_ns_locked - Is namespace locked?
|
||||
*
|
||||
* RETURN: Status
|
||||
*
|
||||
@@ -497,19 +496,28 @@ acpi_ev_default_region_setup(acpi_handle handle,
|
||||
* MUTEX: Interpreter should be unlocked, because we may run the _REG
|
||||
* method for this region.
|
||||
*
|
||||
+ * NOTE: Possible incompliance:
|
||||
+ * There is a behavior conflict in automatic _REG execution:
|
||||
+ * 1. When the interpreter is evaluating a method, we can only
|
||||
+ * automatically run _REG for the following case:
|
||||
+ * operation_region (OPR1, 0x80, 0x1000010, 0x4)
|
||||
+ * 2. When the interpreter is loading a table, we can also
|
||||
+ * automatically run _REG for the following case:
|
||||
+ * operation_region (OPR1, 0x80, 0x1000010, 0x4)
|
||||
+ * Though this may not be compliant to the de-facto standard, the
|
||||
+ * logic is kept in order not to trigger regressions. And keeping
|
||||
+ * this logic should be taken care by the caller of this function.
|
||||
+ *
|
||||
******************************************************************************/
|
||||
|
||||
-acpi_status
|
||||
-acpi_ev_initialize_region(union acpi_operand_object *region_obj,
|
||||
- u8 acpi_ns_locked)
|
||||
+acpi_status acpi_ev_initialize_region(union acpi_operand_object *region_obj)
|
||||
{
|
||||
union acpi_operand_object *handler_obj;
|
||||
union acpi_operand_object *obj_desc;
|
||||
acpi_adr_space_type space_id;
|
||||
struct acpi_namespace_node *node;
|
||||
- acpi_status status;
|
||||
|
||||
- ACPI_FUNCTION_TRACE_U32(ev_initialize_region, acpi_ns_locked);
|
||||
+ ACPI_FUNCTION_TRACE(ev_initialize_region);
|
||||
|
||||
if (!region_obj) {
|
||||
return_ACPI_STATUS(AE_BAD_PARAMETER);
|
||||
@@ -580,39 +588,17 @@ acpi_ev_initialize_region(union acpi_operand_object *region_obj,
|
||||
handler_obj, region_obj,
|
||||
obj_desc));
|
||||
|
||||
- status =
|
||||
- acpi_ev_attach_region(handler_obj,
|
||||
- region_obj,
|
||||
- acpi_ns_locked);
|
||||
+ (void)acpi_ev_attach_region(handler_obj,
|
||||
+ region_obj, FALSE);
|
||||
|
||||
/*
|
||||
* Tell all users that this region is usable by
|
||||
* running the _REG method
|
||||
*/
|
||||
- if (acpi_ns_locked) {
|
||||
- status =
|
||||
- acpi_ut_release_mutex
|
||||
- (ACPI_MTX_NAMESPACE);
|
||||
- if (ACPI_FAILURE(status)) {
|
||||
- return_ACPI_STATUS(status);
|
||||
- }
|
||||
- }
|
||||
-
|
||||
acpi_ex_exit_interpreter();
|
||||
- status =
|
||||
- acpi_ev_execute_reg_method(region_obj,
|
||||
- ACPI_REG_CONNECT);
|
||||
+ (void)acpi_ev_execute_reg_method(region_obj,
|
||||
+ ACPI_REG_CONNECT);
|
||||
acpi_ex_enter_interpreter();
|
||||
-
|
||||
- if (acpi_ns_locked) {
|
||||
- status =
|
||||
- acpi_ut_acquire_mutex
|
||||
- (ACPI_MTX_NAMESPACE);
|
||||
- if (ACPI_FAILURE(status)) {
|
||||
- return_ACPI_STATUS(status);
|
||||
- }
|
||||
- }
|
||||
-
|
||||
return_ACPI_STATUS(AE_OK);
|
||||
}
|
||||
}
|
||||
@@ -622,12 +608,15 @@ acpi_ev_initialize_region(union acpi_operand_object *region_obj,
|
||||
node = node->parent;
|
||||
}
|
||||
|
||||
- /* If we get here, there is no handler for this region */
|
||||
-
|
||||
+ /*
|
||||
+ * If we get here, there is no handler for this region. This is not
|
||||
+ * fatal because many regions get created before a handler is installed
|
||||
+ * for said region.
|
||||
+ */
|
||||
ACPI_DEBUG_PRINT((ACPI_DB_OPREGION,
|
||||
"No handler for RegionType %s(%X) (RegionObj %p)\n",
|
||||
acpi_ut_get_region_name(space_id), space_id,
|
||||
region_obj));
|
||||
|
||||
- return_ACPI_STATUS(AE_NOT_EXIST);
|
||||
+ return_ACPI_STATUS(AE_OK);
|
||||
}
|
||||
--
|
||||
2.10.2
|
||||
|
||||
@@ -0,0 +1,39 @@
|
||||
From 7020bcb82838006e23d058ff07b063b393ed3f10 Mon Sep 17 00:00:00 2001
|
||||
From: Zhang Rui <rui.zhang@intel.com>
|
||||
Date: Tue, 29 Nov 2016 23:19:46 +0100
|
||||
Subject: [PATCH] ACPI: do not warn if _BQC does not exist
|
||||
|
||||
Starting from ACPI spec 3.0, it's only clarified that _BCM control
|
||||
method is required if _BCL is implemented. There is no word
|
||||
saying _BQC is required.
|
||||
|
||||
And in ACPI spec 6.1 B.5.4, for _BQC, it is explicitly stated that
|
||||
"This optional method returns the current brightness level of a
|
||||
built-in display output device. If present, it must be set by
|
||||
the platform for initial brightness."
|
||||
|
||||
Thus remove the obsolete warning message.
|
||||
|
||||
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
|
||||
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
|
||||
---
|
||||
drivers/acpi/scan.c | 3 ---
|
||||
1 file changed, 3 deletions(-)
|
||||
|
||||
diff --git a/drivers/acpi/scan.c b/drivers/acpi/scan.c
|
||||
index 3d1856f..07aa2e6 100644
|
||||
--- a/drivers/acpi/scan.c
|
||||
+++ b/drivers/acpi/scan.c
|
||||
@@ -1119,9 +1119,6 @@ acpi_backlight_cap_match(acpi_handle handle, u32 level, void *context,
|
||||
ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Found generic backlight "
|
||||
"support\n"));
|
||||
*cap |= ACPI_VIDEO_BACKLIGHT;
|
||||
- if (!acpi_has_method(handle, "_BQC"))
|
||||
- printk(KERN_WARNING FW_BUG PREFIX "No _BQC method, "
|
||||
- "cannot determine initial brightness\n");
|
||||
/* We have backlight support, no need to scan further */
|
||||
return AE_CTRL_TERMINATE;
|
||||
}
|
||||
--
|
||||
2.10.2
|
||||
|
||||
@@ -1,37 +0,0 @@
|
||||
From 56e74338a535cbcc2f2da08b1ea1a92920194364 Mon Sep 17 00:00:00 2001
|
||||
From: Alexandra Yates <alexandra.yates@linux.intel.com>
|
||||
Date: Tue, 3 Nov 2015 14:14:18 -0800
|
||||
Subject: [PATCH] ahci: add new Intel device IDs
|
||||
|
||||
Adding Intel codename Lewisburg platform device IDs for SATA.
|
||||
|
||||
Signed-off-by: Alexandra Yates <alexandra.yates@linux.intel.com>
|
||||
Signed-off-by: Tejun Heo <tj@kernel.org>
|
||||
---
|
||||
drivers/ata/ahci.c | 10 ++++++++++
|
||||
1 file changed, 10 insertions(+)
|
||||
|
||||
diff --git a/drivers/ata/ahci.c b/drivers/ata/ahci.c
|
||||
index ff343c4..ff02bb4 100644
|
||||
--- a/drivers/ata/ahci.c
|
||||
+++ b/drivers/ata/ahci.c
|
||||
@@ -314,6 +314,16 @@ static const struct pci_device_id ahci_pci_tbl[] = {
|
||||
{ PCI_VDEVICE(INTEL, 0x1f37), board_ahci_avn }, /* Avoton RAID */
|
||||
{ PCI_VDEVICE(INTEL, 0x1f3e), board_ahci_avn }, /* Avoton RAID */
|
||||
{ PCI_VDEVICE(INTEL, 0x1f3f), board_ahci_avn }, /* Avoton RAID */
|
||||
+ { PCI_VDEVICE(INTEL, 0xa182), board_ahci }, /* Lewisburg AHCI*/
|
||||
+ { PCI_VDEVICE(INTEL, 0xa202), board_ahci }, /* Lewisburg AHCI*/
|
||||
+ { PCI_VDEVICE(INTEL, 0xa184), board_ahci }, /* Lewisburg RAID*/
|
||||
+ { PCI_VDEVICE(INTEL, 0xa204), board_ahci }, /* Lewisburg RAID*/
|
||||
+ { PCI_VDEVICE(INTEL, 0xa186), board_ahci }, /* Lewisburg RAID*/
|
||||
+ { PCI_VDEVICE(INTEL, 0xa206), board_ahci }, /* Lewisburg RAID*/
|
||||
+ { PCI_VDEVICE(INTEL, 0x2822), board_ahci }, /* Lewisburg RAID*/
|
||||
+ { PCI_VDEVICE(INTEL, 0x2826), board_ahci }, /* Lewisburg RAID*/
|
||||
+ { PCI_VDEVICE(INTEL, 0xa18e), board_ahci }, /* Lewisburg RAID*/
|
||||
+ { PCI_VDEVICE(INTEL, 0xa20e), board_ahci }, /* Lewisburg RAID*/
|
||||
{ PCI_VDEVICE(INTEL, 0x2823), board_ahci }, /* Wellsburg RAID */
|
||||
{ PCI_VDEVICE(INTEL, 0x2827), board_ahci }, /* Wellsburg RAID */
|
||||
{ PCI_VDEVICE(INTEL, 0x8d02), board_ahci }, /* Wellsburg AHCI */
|
||||
--
|
||||
2.3.10
|
||||
|
||||
-145
@@ -1,145 +0,0 @@
|
||||
From f7c8d3a509e51f4a555371ded4957b225f1818ad Mon Sep 17 00:00:00 2001
|
||||
From: Lubomir Rintel <lkundrak@v3.sk>
|
||||
Date: Mon, 2 May 2016 09:06:51 +0200
|
||||
Subject: [PATCH] ARM: bcm2835: dt: Add the ethernet to the device trees
|
||||
|
||||
The hub and the ethernet in its port 1 are hardwired on the board.
|
||||
|
||||
Compared to the adapters that can be plugged into the USB ports, this
|
||||
one has no serial EEPROM to store its MAC. Nevertheless, the Raspberry Pi
|
||||
has the MAC address for this adapter in its ROM, accessible from its
|
||||
firmware.
|
||||
|
||||
U-Boot can read out the address and set the local-mac-address property of the
|
||||
node with "ethernet" alias. Let's add the node so that U-Boot can do its
|
||||
business.
|
||||
|
||||
Model B rev2 and Model B+ entries were verified by me, the hierarchy and
|
||||
pid/vid pair for the Version 2 was provided by Peter Chen. Original
|
||||
Model B is a blind shot, though very likely correct.
|
||||
|
||||
Signed-off-by: Lubomir Rintel <lkundrak@v3.sk>
|
||||
Acked-by: Stephen Warren <swarren@wwwdotorg.org>
|
||||
---
|
||||
arch/arm/boot/dts/bcm2835-rpi-b-plus.dts | 1 +
|
||||
arch/arm/boot/dts/bcm2835-rpi-b-rev2.dts | 1 +
|
||||
arch/arm/boot/dts/bcm2835-rpi-b.dts | 1 +
|
||||
arch/arm/boot/dts/bcm2836-rpi-2-b.dts | 1 +
|
||||
arch/arm/boot/dts/bcm283x-rpi-smsc9512.dtsi | 19 +++++++++++++++++++
|
||||
arch/arm/boot/dts/bcm283x-rpi-smsc9514.dtsi | 19 +++++++++++++++++++
|
||||
arch/arm/boot/dts/bcm283x.dtsi | 2 ++
|
||||
7 files changed, 44 insertions(+)
|
||||
create mode 100644 arch/arm/boot/dts/bcm283x-rpi-smsc9512.dtsi
|
||||
create mode 100644 arch/arm/boot/dts/bcm283x-rpi-smsc9514.dtsi
|
||||
|
||||
diff --git a/arch/arm/boot/dts/bcm2835-rpi-b-plus.dts b/arch/arm/boot/dts/bcm2835-rpi-b-plus.dts
|
||||
index ef54050..c3e01ce 100644
|
||||
--- a/arch/arm/boot/dts/bcm2835-rpi-b-plus.dts
|
||||
+++ b/arch/arm/boot/dts/bcm2835-rpi-b-plus.dts
|
||||
@@ -1,6 +1,7 @@
|
||||
/dts-v1/;
|
||||
#include "bcm2835.dtsi"
|
||||
#include "bcm2835-rpi.dtsi"
|
||||
+#include "bcm283x-rpi-smsc9514.dtsi"
|
||||
|
||||
/ {
|
||||
compatible = "raspberrypi,model-b-plus", "brcm,bcm2835";
|
||||
diff --git a/arch/arm/boot/dts/bcm2835-rpi-b-rev2.dts b/arch/arm/boot/dts/bcm2835-rpi-b-rev2.dts
|
||||
index 86f1f2f..364086a 100644
|
||||
--- a/arch/arm/boot/dts/bcm2835-rpi-b-rev2.dts
|
||||
+++ b/arch/arm/boot/dts/bcm2835-rpi-b-rev2.dts
|
||||
@@ -1,6 +1,7 @@
|
||||
/dts-v1/;
|
||||
#include "bcm2835.dtsi"
|
||||
#include "bcm2835-rpi.dtsi"
|
||||
+#include "bcm283x-rpi-smsc9512.dtsi"
|
||||
|
||||
/ {
|
||||
compatible = "raspberrypi,model-b-rev2", "brcm,bcm2835";
|
||||
diff --git a/arch/arm/boot/dts/bcm2835-rpi-b.dts b/arch/arm/boot/dts/bcm2835-rpi-b.dts
|
||||
index 4859e9d..4420b09 100644
|
||||
--- a/arch/arm/boot/dts/bcm2835-rpi-b.dts
|
||||
+++ b/arch/arm/boot/dts/bcm2835-rpi-b.dts
|
||||
@@ -1,6 +1,7 @@
|
||||
/dts-v1/;
|
||||
#include "bcm2835.dtsi"
|
||||
#include "bcm2835-rpi.dtsi"
|
||||
+#include "bcm283x-rpi-smsc9512.dtsi"
|
||||
|
||||
/ {
|
||||
compatible = "raspberrypi,model-b", "brcm,bcm2835";
|
||||
diff --git a/arch/arm/boot/dts/bcm2836-rpi-2-b.dts b/arch/arm/boot/dts/bcm2836-rpi-2-b.dts
|
||||
index ff94666..b975f29 100644
|
||||
--- a/arch/arm/boot/dts/bcm2836-rpi-2-b.dts
|
||||
+++ b/arch/arm/boot/dts/bcm2836-rpi-2-b.dts
|
||||
@@ -1,6 +1,7 @@
|
||||
/dts-v1/;
|
||||
#include "bcm2836.dtsi"
|
||||
#include "bcm2835-rpi.dtsi"
|
||||
+#include "bcm283x-rpi-smsc9514.dtsi"
|
||||
|
||||
/ {
|
||||
compatible = "raspberrypi,2-model-b", "brcm,bcm2836";
|
||||
diff --git a/arch/arm/boot/dts/bcm283x-rpi-smsc9512.dtsi b/arch/arm/boot/dts/bcm283x-rpi-smsc9512.dtsi
|
||||
new file mode 100644
|
||||
index 0000000..12c981e
|
||||
--- /dev/null
|
||||
+++ b/arch/arm/boot/dts/bcm283x-rpi-smsc9512.dtsi
|
||||
@@ -0,0 +1,19 @@
|
||||
+/ {
|
||||
+ aliases {
|
||||
+ ethernet = ðernet;
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&usb {
|
||||
+ usb1@1 {
|
||||
+ compatible = "usb424,9512";
|
||||
+ reg = <1>;
|
||||
+ #address-cells = <1>;
|
||||
+ #size-cells = <0>;
|
||||
+
|
||||
+ ethernet: usbether@1 {
|
||||
+ compatible = "usb424,ec00";
|
||||
+ reg = <1>;
|
||||
+ };
|
||||
+ };
|
||||
+};
|
||||
diff --git a/arch/arm/boot/dts/bcm283x-rpi-smsc9514.dtsi b/arch/arm/boot/dts/bcm283x-rpi-smsc9514.dtsi
|
||||
new file mode 100644
|
||||
index 0000000..3f0a56e
|
||||
--- /dev/null
|
||||
+++ b/arch/arm/boot/dts/bcm283x-rpi-smsc9514.dtsi
|
||||
@@ -0,0 +1,19 @@
|
||||
+/ {
|
||||
+ aliases {
|
||||
+ ethernet = ðernet;
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&usb {
|
||||
+ usb1@1 {
|
||||
+ compatible = "usb424,9514";
|
||||
+ reg = <1>;
|
||||
+ #address-cells = <1>;
|
||||
+ #size-cells = <0>;
|
||||
+
|
||||
+ ethernet: usbether@1 {
|
||||
+ compatible = "usb424,ec00";
|
||||
+ reg = <1>;
|
||||
+ };
|
||||
+ };
|
||||
+};
|
||||
diff --git a/arch/arm/boot/dts/bcm283x.dtsi b/arch/arm/boot/dts/bcm283x.dtsi
|
||||
index 8aaf193..04504b7 100644
|
||||
--- a/arch/arm/boot/dts/bcm283x.dtsi
|
||||
+++ b/arch/arm/boot/dts/bcm283x.dtsi
|
||||
@@ -287,6 +287,8 @@
|
||||
compatible = "brcm,bcm2835-usb";
|
||||
reg = <0x7e980000 0x10000>;
|
||||
interrupts = <1 9>;
|
||||
+ #address-cells = <1>;
|
||||
+ #size-cells = <0>;
|
||||
};
|
||||
|
||||
v3d: v3d@7ec00000 {
|
||||
File diff suppressed because it is too large
Load Diff
+1101
File diff suppressed because it is too large
Load Diff
+103
@@ -0,0 +1,103 @@
|
||||
From 465ed48c05de63f5bdd34d83915f1b8998a62134 Mon Sep 17 00:00:00 2001
|
||||
From: Paolo Valente <paolo.valente@unimore.it>
|
||||
Date: Tue, 7 Apr 2015 13:39:12 +0200
|
||||
Subject: [PATCH 1/4] block: cgroups, kconfig, build bits for BFQ-v7r11-4.5.0
|
||||
|
||||
Update Kconfig.iosched and do the related Makefile changes to include
|
||||
kernel configuration options for BFQ. Also increase the number of
|
||||
policies supported by the blkio controller so that BFQ can add its
|
||||
own.
|
||||
|
||||
Signed-off-by: Paolo Valente <paolo.valente@unimore.it>
|
||||
Signed-off-by: Arianna Avanzini <avanzini@google.com>
|
||||
---
|
||||
block/Kconfig.iosched | 32 ++++++++++++++++++++++++++++++++
|
||||
block/Makefile | 1 +
|
||||
include/linux/blkdev.h | 2 +-
|
||||
3 files changed, 34 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/block/Kconfig.iosched b/block/Kconfig.iosched
|
||||
index 421bef9..0ee5f0f 100644
|
||||
--- a/block/Kconfig.iosched
|
||||
+++ b/block/Kconfig.iosched
|
||||
@@ -39,6 +39,27 @@ config CFQ_GROUP_IOSCHED
|
||||
---help---
|
||||
Enable group IO scheduling in CFQ.
|
||||
|
||||
+config IOSCHED_BFQ
|
||||
+ tristate "BFQ I/O scheduler"
|
||||
+ default n
|
||||
+ ---help---
|
||||
+ The BFQ I/O scheduler tries to distribute bandwidth among
|
||||
+ all processes according to their weights.
|
||||
+ It aims at distributing the bandwidth as desired, independently of
|
||||
+ the disk parameters and with any workload. It also tries to
|
||||
+ guarantee low latency to interactive and soft real-time
|
||||
+ applications. If compiled built-in (saying Y here), BFQ can
|
||||
+ be configured to support hierarchical scheduling.
|
||||
+
|
||||
+config CGROUP_BFQIO
|
||||
+ bool "BFQ hierarchical scheduling support"
|
||||
+ depends on CGROUPS && IOSCHED_BFQ=y
|
||||
+ default n
|
||||
+ ---help---
|
||||
+ Enable hierarchical scheduling in BFQ, using the cgroups
|
||||
+ filesystem interface. The name of the subsystem will be
|
||||
+ bfqio.
|
||||
+
|
||||
choice
|
||||
prompt "Default I/O scheduler"
|
||||
default DEFAULT_CFQ
|
||||
@@ -52,6 +73,16 @@ choice
|
||||
config DEFAULT_CFQ
|
||||
bool "CFQ" if IOSCHED_CFQ=y
|
||||
|
||||
+ config DEFAULT_BFQ
|
||||
+ bool "BFQ" if IOSCHED_BFQ=y
|
||||
+ help
|
||||
+ Selects BFQ as the default I/O scheduler which will be
|
||||
+ used by default for all block devices.
|
||||
+ The BFQ I/O scheduler aims at distributing the bandwidth
|
||||
+ as desired, independently of the disk parameters and with
|
||||
+ any workload. It also tries to guarantee low latency to
|
||||
+ interactive and soft real-time applications.
|
||||
+
|
||||
config DEFAULT_NOOP
|
||||
bool "No-op"
|
||||
|
||||
@@ -61,6 +92,7 @@ config DEFAULT_IOSCHED
|
||||
string
|
||||
default "deadline" if DEFAULT_DEADLINE
|
||||
default "cfq" if DEFAULT_CFQ
|
||||
+ default "bfq" if DEFAULT_BFQ
|
||||
default "noop" if DEFAULT_NOOP
|
||||
|
||||
endmenu
|
||||
diff --git a/block/Makefile b/block/Makefile
|
||||
index 36acdd7..736e91a 100644
|
||||
--- a/block/Makefile
|
||||
+++ b/block/Makefile
|
||||
@@ -18,6 +18,7 @@ obj-$(CONFIG_BLK_DEV_THROTTLING) += blk-throttle.o
|
||||
obj-$(CONFIG_IOSCHED_NOOP) += noop-iosched.o
|
||||
obj-$(CONFIG_IOSCHED_DEADLINE) += deadline-iosched.o
|
||||
obj-$(CONFIG_IOSCHED_CFQ) += cfq-iosched.o
|
||||
+obj-$(CONFIG_IOSCHED_BFQ) += bfq-iosched.o
|
||||
|
||||
obj-$(CONFIG_BLOCK_COMPAT) += compat_ioctl.o
|
||||
obj-$(CONFIG_BLK_CMDLINE_PARSER) += cmdline-parser.o
|
||||
diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h
|
||||
index c47c358..1047d99 100644
|
||||
--- a/include/linux/blkdev.h
|
||||
+++ b/include/linux/blkdev.h
|
||||
@@ -45,7 +45,7 @@ struct pr_ops;
|
||||
* Maximum number of blkcg policies allowed to be registered concurrently.
|
||||
* Defined here to simplify include dependency.
|
||||
*/
|
||||
-#define BLKCG_MAX_POLS 2
|
||||
+#define BLKCG_MAX_POLS 3
|
||||
|
||||
typedef void (rq_end_io_fn)(struct request *, int);
|
||||
|
||||
--
|
||||
2.10.0
|
||||
|
||||
+7109
File diff suppressed because it is too large
Load Diff
+34
@@ -0,0 +1,34 @@
|
||||
From 124298bd03acebd9c9da29a794718aca31bec1f7 Mon Sep 17 00:00:00 2001
|
||||
From: Daniel Roschka <danielroschka@phoenitydawn.de>
|
||||
Date: Wed, 22 Feb 2017 15:17:29 -0700
|
||||
Subject: [PATCH] nvme: detect NVMe controller in recent MacBooks
|
||||
|
||||
Adds support for detection of the NVMe controller found in the
|
||||
following recent MacBooks:
|
||||
- Retina MacBook 2016 (MacBook9,1)
|
||||
- 13" MacBook Pro 2016 without Touch Bar (MacBook13,1)
|
||||
- 13" MacBook Pro 2016 with Touch Bar (MacBook13,2)
|
||||
|
||||
Signed-off-by: Daniel Roschka <danielroschka@phoenitydawn.de>
|
||||
Reviewed-by: Christoph Hellwig <hch@lst.de>
|
||||
Signed-off-by: Sagi Grimberg <sagi@grimberg.me>
|
||||
Signed-off-by: Jens Axboe <axboe@fb.com>
|
||||
---
|
||||
drivers/nvme/host/pci.c | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/drivers/nvme/host/pci.c b/drivers/nvme/host/pci.c
|
||||
index d38dae9..319f5c5 100644
|
||||
--- a/drivers/nvme/host/pci.c
|
||||
+++ b/drivers/nvme/host/pci.c
|
||||
@@ -2120,6 +2120,7 @@ static const struct pci_device_id nvme_id_table[] = {
|
||||
.driver_data = NVME_QUIRK_DELAY_BEFORE_CHK_RDY, },
|
||||
{ PCI_DEVICE_CLASS(PCI_CLASS_STORAGE_EXPRESS, 0xffffff) },
|
||||
{ PCI_DEVICE(PCI_VENDOR_ID_APPLE, 0x2001) },
|
||||
+ { PCI_DEVICE(PCI_VENDOR_ID_APPLE, 0x2003) },
|
||||
{ 0, }
|
||||
};
|
||||
MODULE_DEVICE_TABLE(pci, nvme_id_table);
|
||||
--
|
||||
2.10.2
|
||||
|
||||
@@ -0,0 +1,69 @@
|
||||
block/bfq-iosched.c | 4 +++-
|
||||
block/bfq-sched.c | 15 ++++++++++++---
|
||||
block/bfq.h | 2 +-
|
||||
3 files changed, 16 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/block/bfq-iosched.c b/block/bfq-iosched.c
|
||||
index 96b79a0dae9f..158628392d92 100644
|
||||
--- a/block/bfq-iosched.c
|
||||
+++ b/block/bfq-iosched.c
|
||||
@@ -4572,6 +4572,8 @@ static int bfq_set_request(struct request_queue *q, struct request *rq,
|
||||
if (!bic)
|
||||
goto queue_fail;
|
||||
|
||||
+ bfq_check_ioprio_change(bic, bio);
|
||||
+
|
||||
bfq_bic_update_cgroup(bic, bio);
|
||||
|
||||
new_queue:
|
||||
@@ -5268,7 +5270,7 @@ static struct blkcg_policy blkcg_policy_bfq = {
|
||||
static int __init bfq_init(void)
|
||||
{
|
||||
int ret;
|
||||
- char msg[60] = "BFQ I/O-scheduler: v8r10";
|
||||
+ char msg[60] = "BFQ I/O-scheduler: v8r11";
|
||||
|
||||
#ifdef CONFIG_BFQ_GROUP_IOSCHED
|
||||
ret = blkcg_policy_register(&blkcg_policy_bfq);
|
||||
diff --git a/block/bfq-sched.c b/block/bfq-sched.c
|
||||
index 70aac56b02ef..8311bdbeceea 100644
|
||||
--- a/block/bfq-sched.c
|
||||
+++ b/block/bfq-sched.c
|
||||
@@ -1280,14 +1280,23 @@ static bool __bfq_deactivate_entity(struct bfq_entity *entity,
|
||||
bool ins_into_idle_tree)
|
||||
{
|
||||
struct bfq_sched_data *sd = entity->sched_data;
|
||||
- struct bfq_service_tree *st = bfq_entity_service_tree(entity);
|
||||
- bool is_in_service = entity == sd->in_service_entity;
|
||||
+ struct bfq_service_tree *st;
|
||||
+ bool is_in_service;
|
||||
|
||||
if (!entity->on_st) { /* entity never activated, or already inactive */
|
||||
- BUG_ON(entity == entity->sched_data->in_service_entity);
|
||||
+ BUG_ON(sd && entity == sd->in_service_entity);
|
||||
return false;
|
||||
}
|
||||
|
||||
+ /*
|
||||
+ * If we get here, then entity is active, which implies that
|
||||
+ * bfq_group_set_parent has already been invoked for the group
|
||||
+ * represented by entity. Therefore, the field
|
||||
+ * entity->sched_data has been set, and we can safely use it.
|
||||
+ */
|
||||
+ st = bfq_entity_service_tree(entity);
|
||||
+ is_in_service = entity == sd->in_service_entity;
|
||||
+
|
||||
BUG_ON(is_in_service && entity->tree && entity->tree != &st->active);
|
||||
|
||||
if (is_in_service)
|
||||
diff --git a/block/bfq.h b/block/bfq.h
|
||||
index e3855af1211b..a521ac40cac0 100644
|
||||
--- a/block/bfq.h
|
||||
+++ b/block/bfq.h
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
- * BFQ v8r10 for 4.9.0: data structures and common functions prototypes.
|
||||
+ * BFQ v8r11 for 4.9.0: data structures and common functions prototypes.
|
||||
*
|
||||
* Based on ideas and code from CFQ:
|
||||
* Copyright (C) 2003 Jens Axboe <axboe@kernel.dk>
|
||||
@@ -0,0 +1,729 @@
|
||||
block/bfq-cgroup.c | 12 +--
|
||||
block/bfq-iosched.c | 211 +++++++++++++++++++++++++++++++---------------------
|
||||
block/bfq-sched.c | 73 ++++++++++++------
|
||||
block/bfq.h | 4 +-
|
||||
4 files changed, 180 insertions(+), 120 deletions(-)
|
||||
|
||||
diff --git a/block/bfq-cgroup.c b/block/bfq-cgroup.c
|
||||
index bbaecd0..a66a723 100644
|
||||
--- a/block/bfq-cgroup.c
|
||||
+++ b/block/bfq-cgroup.c
|
||||
@@ -771,7 +771,6 @@ static void bfq_pd_offline(struct blkg_policy_data *pd)
|
||||
|
||||
__bfq_deactivate_entity(entity, false);
|
||||
bfq_put_async_queues(bfqd, bfqg);
|
||||
- BUG_ON(entity->tree);
|
||||
|
||||
/*
|
||||
* @blkg is going offline and will be ignored by
|
||||
@@ -1140,6 +1139,9 @@ static inline void bfqg_stats_update_idle_time(struct bfq_group *bfqg) { }
|
||||
static inline void bfqg_stats_set_start_idle_time(struct bfq_group *bfqg) { }
|
||||
static inline void bfqg_stats_update_avg_queue_size(struct bfq_group *bfqg) { }
|
||||
|
||||
+static void bfq_bfqq_move(struct bfq_data *bfqd, struct bfq_queue *bfqq,
|
||||
+ struct bfq_group *bfqg) {}
|
||||
+
|
||||
static void bfq_init_entity(struct bfq_entity *entity,
|
||||
struct bfq_group *bfqg)
|
||||
{
|
||||
@@ -1154,13 +1156,7 @@ static void bfq_init_entity(struct bfq_entity *entity,
|
||||
entity->sched_data = &bfqg->sched_data;
|
||||
}
|
||||
|
||||
-static struct bfq_group *
|
||||
-bfq_bic_update_cgroup(struct bfq_io_cq *bic, struct bio *bio)
|
||||
-{
|
||||
- struct bfq_data *bfqd = bic_to_bfqd(bic);
|
||||
-
|
||||
- return bfqd->root_group;
|
||||
-}
|
||||
+static void bfq_bic_update_cgroup(struct bfq_io_cq *bic, struct bio *bio) {}
|
||||
|
||||
static void bfq_end_wr_async(struct bfq_data *bfqd)
|
||||
{
|
||||
diff --git a/block/bfq-iosched.c b/block/bfq-iosched.c
|
||||
index 78baa07..96b79a0 100644
|
||||
--- a/block/bfq-iosched.c
|
||||
+++ b/block/bfq-iosched.c
|
||||
@@ -9,7 +9,7 @@
|
||||
*
|
||||
* Copyright (C) 2015 Paolo Valente <paolo.valente@unimore.it>
|
||||
*
|
||||
- * Copyright (C) 2016 Paolo Valente <paolo.valente@linaro.org>
|
||||
+ * Copyright (C) 2017 Paolo Valente <paolo.valente@linaro.org>
|
||||
*
|
||||
* Licensed under the GPL-2 as detailed in the accompanying COPYING.BFQ
|
||||
* file.
|
||||
@@ -107,7 +107,7 @@ static const int bfq_async_charge_factor = 10;
|
||||
/* Default timeout values, in jiffies, approximating CFQ defaults. */
|
||||
static const int bfq_timeout = (HZ / 8);
|
||||
|
||||
-struct kmem_cache *bfq_pool;
|
||||
+static struct kmem_cache *bfq_pool;
|
||||
|
||||
/* Below this threshold (in ns), we consider thinktime immediate. */
|
||||
#define BFQ_MIN_TT (2 * NSEC_PER_MSEC)
|
||||
@@ -483,6 +483,22 @@ static void bfq_weights_tree_add(struct bfq_data *bfqd,
|
||||
|
||||
entity->weight_counter = kzalloc(sizeof(struct bfq_weight_counter),
|
||||
GFP_ATOMIC);
|
||||
+
|
||||
+ /*
|
||||
+ * In the unlucky event of an allocation failure, we just
|
||||
+ * exit. This will cause the weight of entity to not be
|
||||
+ * considered in bfq_differentiated_weights, which, in its
|
||||
+ * turn, causes the scenario to be deemed wrongly symmetric in
|
||||
+ * case entity's weight would have been the only weight making
|
||||
+ * the scenario asymmetric. On the bright side, no unbalance
|
||||
+ * will however occur when entity becomes inactive again (the
|
||||
+ * invocation of this function is triggered by an activation
|
||||
+ * of entity). In fact, bfq_weights_tree_remove does nothing
|
||||
+ * if !entity->weight_counter.
|
||||
+ */
|
||||
+ if (unlikely(!entity->weight_counter))
|
||||
+ return;
|
||||
+
|
||||
entity->weight_counter->weight = entity->weight;
|
||||
rb_link_node(&entity->weight_counter->weights_node, parent, new);
|
||||
rb_insert_color(&entity->weight_counter->weights_node, root);
|
||||
@@ -519,13 +535,45 @@ static void bfq_weights_tree_remove(struct bfq_data *bfqd,
|
||||
entity->weight_counter = NULL;
|
||||
}
|
||||
|
||||
+/*
|
||||
+ * Return expired entry, or NULL to just start from scratch in rbtree.
|
||||
+ */
|
||||
+static struct request *bfq_check_fifo(struct bfq_queue *bfqq,
|
||||
+ struct request *last)
|
||||
+{
|
||||
+ struct request *rq;
|
||||
+
|
||||
+ if (bfq_bfqq_fifo_expire(bfqq))
|
||||
+ return NULL;
|
||||
+
|
||||
+ bfq_mark_bfqq_fifo_expire(bfqq);
|
||||
+
|
||||
+ rq = rq_entry_fifo(bfqq->fifo.next);
|
||||
+
|
||||
+ if (rq == last || ktime_get_ns() < rq->fifo_time)
|
||||
+ return NULL;
|
||||
+
|
||||
+ bfq_log_bfqq(bfqq->bfqd, bfqq, "check_fifo: returned %p", rq);
|
||||
+ BUG_ON(RB_EMPTY_NODE(&rq->rb_node));
|
||||
+ return rq;
|
||||
+}
|
||||
+
|
||||
static struct request *bfq_find_next_rq(struct bfq_data *bfqd,
|
||||
struct bfq_queue *bfqq,
|
||||
struct request *last)
|
||||
{
|
||||
struct rb_node *rbnext = rb_next(&last->rb_node);
|
||||
struct rb_node *rbprev = rb_prev(&last->rb_node);
|
||||
- struct request *next = NULL, *prev = NULL;
|
||||
+ struct request *next, *prev = NULL;
|
||||
+
|
||||
+ BUG_ON(list_empty(&bfqq->fifo));
|
||||
+
|
||||
+ /* Follow expired path, else get first next available. */
|
||||
+ next = bfq_check_fifo(bfqq, last);
|
||||
+ if (next) {
|
||||
+ BUG_ON(next == last);
|
||||
+ return next;
|
||||
+ }
|
||||
|
||||
BUG_ON(RB_EMPTY_NODE(&last->rb_node));
|
||||
|
||||
@@ -1359,7 +1407,6 @@ static void bfq_bfqq_handle_idle_busy_switch(struct bfq_data *bfqd,
|
||||
|
||||
bfq_bfqq_expire(bfqd, bfqd->in_service_queue,
|
||||
false, BFQ_BFQQ_PREEMPTED);
|
||||
- BUG_ON(in_serv->entity.budget < 0);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1523,12 +1570,15 @@ static void bfq_remove_request(struct request *rq)
|
||||
elv_rb_del(&bfqq->sort_list, rq);
|
||||
|
||||
if (RB_EMPTY_ROOT(&bfqq->sort_list)) {
|
||||
+ bfqq->next_rq = NULL;
|
||||
+
|
||||
BUG_ON(bfqq->entity.budget < 0);
|
||||
|
||||
if (bfq_bfqq_busy(bfqq) && bfqq != bfqd->in_service_queue) {
|
||||
+ BUG_ON(bfqq->ref < 2); /* referred by rq and on tree */
|
||||
bfq_del_bfqq_busy(bfqd, bfqq, false);
|
||||
-
|
||||
- /* bfqq emptied. In normal operation, when
|
||||
+ /*
|
||||
+ * bfqq emptied. In normal operation, when
|
||||
* bfqq is empty, bfqq->entity.service and
|
||||
* bfqq->entity.budget must contain,
|
||||
* respectively, the service received and the
|
||||
@@ -1537,7 +1587,8 @@ static void bfq_remove_request(struct request *rq)
|
||||
* this last removal occurred while bfqq is
|
||||
* not in service. To avoid inconsistencies,
|
||||
* reset both bfqq->entity.service and
|
||||
- * bfqq->entity.budget.
|
||||
+ * bfqq->entity.budget, if bfqq has still a
|
||||
+ * process that may issue I/O requests to it.
|
||||
*/
|
||||
bfqq->entity.budget = bfqq->entity.service = 0;
|
||||
}
|
||||
@@ -1868,7 +1919,7 @@ static bool bfq_may_be_close_cooperator(struct bfq_queue *bfqq,
|
||||
* positives. In case bfqq is weight-raised, such false positives
|
||||
* would evidently degrade latency guarantees for bfqq.
|
||||
*/
|
||||
-bool wr_from_too_long(struct bfq_queue *bfqq)
|
||||
+static bool wr_from_too_long(struct bfq_queue *bfqq)
|
||||
{
|
||||
return bfqq->wr_coeff > 1 &&
|
||||
time_is_before_jiffies(bfqq->last_wr_start_finish +
|
||||
@@ -2029,7 +2080,8 @@ bfq_merge_bfqqs(struct bfq_data *bfqd, struct bfq_io_cq *bic,
|
||||
new_bfqq->wr_coeff = bfqq->wr_coeff;
|
||||
new_bfqq->wr_cur_max_time = bfqq->wr_cur_max_time;
|
||||
new_bfqq->last_wr_start_finish = bfqq->last_wr_start_finish;
|
||||
- new_bfqq->wr_start_at_switch_to_srt = bfqq->wr_start_at_switch_to_srt;
|
||||
+ new_bfqq->wr_start_at_switch_to_srt =
|
||||
+ bfqq->wr_start_at_switch_to_srt;
|
||||
if (bfq_bfqq_busy(new_bfqq))
|
||||
bfqd->wr_busy_queues++;
|
||||
new_bfqq->entity.prio_changed = 1;
|
||||
@@ -2072,6 +2124,7 @@ bfq_merge_bfqqs(struct bfq_data *bfqd, struct bfq_io_cq *bic,
|
||||
*/
|
||||
new_bfqq->bic = NULL;
|
||||
bfqq->bic = NULL;
|
||||
+ /* release process reference to bfqq */
|
||||
bfq_put_queue(bfqq);
|
||||
}
|
||||
|
||||
@@ -2298,7 +2351,7 @@ static unsigned long bfq_calc_max_budget(struct bfq_data *bfqd)
|
||||
* function of the estimated peak rate. See comments on
|
||||
* bfq_calc_max_budget(), and on T_slow and T_fast arrays.
|
||||
*/
|
||||
-void update_thr_responsiveness_params(struct bfq_data *bfqd)
|
||||
+static void update_thr_responsiveness_params(struct bfq_data *bfqd)
|
||||
{
|
||||
int dev_type = blk_queue_nonrot(bfqd->queue);
|
||||
|
||||
@@ -2333,7 +2386,7 @@ void update_thr_responsiveness_params(struct bfq_data *bfqd)
|
||||
BFQ_RATE_SHIFT);
|
||||
}
|
||||
|
||||
-void bfq_reset_rate_computation(struct bfq_data *bfqd, struct request *rq)
|
||||
+static void bfq_reset_rate_computation(struct bfq_data *bfqd, struct request *rq)
|
||||
{
|
||||
if (rq != NULL) { /* new rq dispatch now, reset accordingly */
|
||||
bfqd->last_dispatch = bfqd->first_dispatch = ktime_get_ns() ;
|
||||
@@ -2350,7 +2403,7 @@ void bfq_reset_rate_computation(struct bfq_data *bfqd, struct request *rq)
|
||||
bfqd->tot_sectors_dispatched);
|
||||
}
|
||||
|
||||
-void bfq_update_rate_reset(struct bfq_data *bfqd, struct request *rq)
|
||||
+static void bfq_update_rate_reset(struct bfq_data *bfqd, struct request *rq)
|
||||
{
|
||||
u32 rate, weight, divisor;
|
||||
|
||||
@@ -2400,7 +2453,7 @@ void bfq_update_rate_reset(struct bfq_data *bfqd, struct request *rq)
|
||||
* total, and rate is below the current estimated peak rate
|
||||
* - rate is unreasonably high (> 20M sectors/sec)
|
||||
*/
|
||||
- if ((bfqd->peak_rate_samples > (3 * bfqd->sequential_samples)>>2 &&
|
||||
+ if ((bfqd->sequential_samples < (3 * bfqd->peak_rate_samples)>>2 &&
|
||||
rate <= bfqd->peak_rate) ||
|
||||
rate > 20<<BFQ_RATE_SHIFT) {
|
||||
bfq_log(bfqd,
|
||||
@@ -2515,7 +2568,7 @@ void bfq_update_rate_reset(struct bfq_data *bfqd, struct request *rq)
|
||||
* of the observed dispatch rate. The function assumes to be invoked
|
||||
* on every request dispatch.
|
||||
*/
|
||||
-void bfq_update_peak_rate(struct bfq_data *bfqd, struct request *rq)
|
||||
+static void bfq_update_peak_rate(struct bfq_data *bfqd, struct request *rq)
|
||||
{
|
||||
u64 now_ns = ktime_get_ns();
|
||||
|
||||
@@ -2616,29 +2669,6 @@ static void bfq_dispatch_insert(struct request_queue *q, struct request *rq)
|
||||
elv_dispatch_sort(q, rq);
|
||||
}
|
||||
|
||||
-/*
|
||||
- * Return expired entry, or NULL to just start from scratch in rbtree.
|
||||
- */
|
||||
-static struct request *bfq_check_fifo(struct bfq_queue *bfqq)
|
||||
-{
|
||||
- struct request *rq = NULL;
|
||||
-
|
||||
- if (bfq_bfqq_fifo_expire(bfqq))
|
||||
- return NULL;
|
||||
-
|
||||
- bfq_mark_bfqq_fifo_expire(bfqq);
|
||||
-
|
||||
- if (list_empty(&bfqq->fifo))
|
||||
- return NULL;
|
||||
-
|
||||
- rq = rq_entry_fifo(bfqq->fifo.next);
|
||||
-
|
||||
- if (ktime_get_ns() < rq->fifo_time)
|
||||
- return NULL;
|
||||
-
|
||||
- return rq;
|
||||
-}
|
||||
-
|
||||
static void __bfq_bfqq_expire(struct bfq_data *bfqd, struct bfq_queue *bfqq)
|
||||
{
|
||||
BUG_ON(bfqq != bfqd->in_service_queue);
|
||||
@@ -2904,8 +2934,8 @@ static bool bfq_bfqq_is_slow(struct bfq_data *bfqd, struct bfq_queue *bfqq,
|
||||
delta_ktime = ktime_sub(delta_ktime, bfqd->last_budget_start);
|
||||
delta_usecs = ktime_to_us(delta_ktime);
|
||||
|
||||
- /* don't trust short/unrealistic values. */
|
||||
- if (delta_usecs < 1000 || delta_usecs >= LONG_MAX) {
|
||||
+ /* don't use too short time intervals */
|
||||
+ if (delta_usecs < 1000) {
|
||||
if (blk_queue_nonrot(bfqd->queue))
|
||||
/*
|
||||
* give same worst-case guarantees as idling
|
||||
@@ -2915,7 +2945,7 @@ static bool bfq_bfqq_is_slow(struct bfq_data *bfqd, struct bfq_queue *bfqq,
|
||||
else /* charge at least one seek */
|
||||
*delta_ms = bfq_slice_idle / NSEC_PER_MSEC;
|
||||
|
||||
- bfq_log(bfqd, "bfq_bfqq_is_slow: unrealistic %u", delta_usecs);
|
||||
+ bfq_log(bfqd, "bfq_bfqq_is_slow: too short %u", delta_usecs);
|
||||
|
||||
return slow;
|
||||
}
|
||||
@@ -3067,6 +3097,7 @@ static void bfq_bfqq_expire(struct bfq_data *bfqd,
|
||||
bool slow;
|
||||
unsigned long delta = 0;
|
||||
struct bfq_entity *entity = &bfqq->entity;
|
||||
+ int ref;
|
||||
|
||||
BUG_ON(bfqq != bfqd->in_service_queue);
|
||||
|
||||
@@ -3174,12 +3205,15 @@ static void bfq_bfqq_expire(struct bfq_data *bfqd,
|
||||
__bfq_bfqq_recalc_budget(bfqd, bfqq, reason);
|
||||
BUG_ON(bfqq->next_rq == NULL &&
|
||||
bfqq->entity.budget < bfqq->entity.service);
|
||||
+ ref = bfqq->ref;
|
||||
__bfq_bfqq_expire(bfqd, bfqq);
|
||||
|
||||
- BUG_ON(!bfq_bfqq_busy(bfqq) && reason == BFQ_BFQQ_BUDGET_EXHAUSTED &&
|
||||
+ BUG_ON(ref > 1 &&
|
||||
+ !bfq_bfqq_busy(bfqq) && reason == BFQ_BFQQ_BUDGET_EXHAUSTED &&
|
||||
!bfq_class_idle(bfqq));
|
||||
|
||||
- if (!bfq_bfqq_busy(bfqq) &&
|
||||
+ /* mark bfqq as waiting a request only if a bic still points to it */
|
||||
+ if (ref > 1 && !bfq_bfqq_busy(bfqq) &&
|
||||
reason != BFQ_BFQQ_BUDGET_TIMEOUT &&
|
||||
reason != BFQ_BFQQ_BUDGET_EXHAUSTED)
|
||||
bfq_mark_bfqq_non_blocking_wait_rq(bfqq);
|
||||
@@ -3504,14 +3538,29 @@ static struct bfq_queue *bfq_select_queue(struct bfq_data *bfqd)
|
||||
!bfq_bfqq_must_idle(bfqq))
|
||||
goto expire;
|
||||
|
||||
+check_queue:
|
||||
+ /*
|
||||
+ * This loop is rarely executed more than once. Even when it
|
||||
+ * happens, it is much more convenient to re-execute this loop
|
||||
+ * than to return NULL and trigger a new dispatch to get a
|
||||
+ * request served.
|
||||
+ */
|
||||
next_rq = bfqq->next_rq;
|
||||
/*
|
||||
* If bfqq has requests queued and it has enough budget left to
|
||||
* serve them, keep the queue, otherwise expire it.
|
||||
*/
|
||||
if (next_rq) {
|
||||
+ BUG_ON(RB_EMPTY_ROOT(&bfqq->sort_list));
|
||||
+
|
||||
if (bfq_serv_to_charge(next_rq, bfqq) >
|
||||
bfq_bfqq_budget_left(bfqq)) {
|
||||
+ /*
|
||||
+ * Expire the queue for budget exhaustion,
|
||||
+ * which makes sure that the next budget is
|
||||
+ * enough to serve the next request, even if
|
||||
+ * it comes from the fifo expired path.
|
||||
+ */
|
||||
reason = BFQ_BFQQ_BUDGET_EXHAUSTED;
|
||||
goto expire;
|
||||
} else {
|
||||
@@ -3559,9 +3608,16 @@ static struct bfq_queue *bfq_select_queue(struct bfq_data *bfqd)
|
||||
bfq_bfqq_expire(bfqd, bfqq, false, reason);
|
||||
new_queue:
|
||||
bfqq = bfq_set_in_service_queue(bfqd);
|
||||
- bfq_log(bfqd, "select_queue: new queue %d returned",
|
||||
- bfqq ? bfqq->pid : 0);
|
||||
+ if (bfqq) {
|
||||
+ bfq_log_bfqq(bfqd, bfqq, "select_queue: checking new queue");
|
||||
+ goto check_queue;
|
||||
+ }
|
||||
keep_queue:
|
||||
+ if (bfqq)
|
||||
+ bfq_log_bfqq(bfqd, bfqq, "select_queue: returned this queue");
|
||||
+ else
|
||||
+ bfq_log(bfqd, "select_queue: no queue returned");
|
||||
+
|
||||
return bfqq;
|
||||
}
|
||||
|
||||
@@ -3627,45 +3683,17 @@ static int bfq_dispatch_request(struct bfq_data *bfqd,
|
||||
struct bfq_queue *bfqq)
|
||||
{
|
||||
int dispatched = 0;
|
||||
- struct request *rq;
|
||||
+ struct request *rq = bfqq->next_rq;
|
||||
unsigned long service_to_charge;
|
||||
|
||||
BUG_ON(RB_EMPTY_ROOT(&bfqq->sort_list));
|
||||
-
|
||||
- /* Follow expired path, else get first next available. */
|
||||
- rq = bfq_check_fifo(bfqq);
|
||||
- if (!rq)
|
||||
- rq = bfqq->next_rq;
|
||||
+ BUG_ON(!rq);
|
||||
service_to_charge = bfq_serv_to_charge(rq, bfqq);
|
||||
|
||||
- if (service_to_charge > bfq_bfqq_budget_left(bfqq)) {
|
||||
- /*
|
||||
- * This may happen if the next rq is chosen in fifo order
|
||||
- * instead of sector order. The budget is properly
|
||||
- * dimensioned to be always sufficient to serve the next
|
||||
- * request only if it is chosen in sector order. The reason
|
||||
- * is that it would be quite inefficient and little useful
|
||||
- * to always make sure that the budget is large enough to
|
||||
- * serve even the possible next rq in fifo order.
|
||||
- * In fact, requests are seldom served in fifo order.
|
||||
- *
|
||||
- * Expire the queue for budget exhaustion, and make sure
|
||||
- * that the next act_budget is enough to serve the next
|
||||
- * request, even if it comes from the fifo expired path.
|
||||
- */
|
||||
- bfqq->next_rq = rq;
|
||||
- /*
|
||||
- * Since this dispatch is failed, make sure that
|
||||
- * a new one will be performed
|
||||
- */
|
||||
- if (!bfqd->rq_in_driver)
|
||||
- bfq_schedule_dispatch(bfqd);
|
||||
- BUG_ON(bfqq->entity.budget < bfqq->entity.service);
|
||||
- goto expire;
|
||||
- }
|
||||
+ BUG_ON(service_to_charge > bfq_bfqq_budget_left(bfqq));
|
||||
|
||||
BUG_ON(bfqq->entity.budget < bfqq->entity.service);
|
||||
- /* Finally, insert request into driver dispatch list. */
|
||||
+
|
||||
bfq_bfqq_served(bfqq, service_to_charge);
|
||||
|
||||
BUG_ON(bfqq->entity.budget < bfqq->entity.service);
|
||||
@@ -3805,7 +3833,8 @@ static int bfq_dispatch_requests(struct request_queue *q, int force)
|
||||
* Task holds one reference to the queue, dropped when task exits. Each rq
|
||||
* in-flight on this queue also holds a reference, dropped when rq is freed.
|
||||
*
|
||||
- * Queue lock must be held here.
|
||||
+ * Queue lock must be held here. Recall not to use bfqq after calling
|
||||
+ * this function on it.
|
||||
*/
|
||||
static void bfq_put_queue(struct bfq_queue *bfqq)
|
||||
{
|
||||
@@ -3874,7 +3903,7 @@ static void bfq_exit_bfqq(struct bfq_data *bfqd, struct bfq_queue *bfqq)
|
||||
|
||||
bfq_put_cooperator(bfqq);
|
||||
|
||||
- bfq_put_queue(bfqq);
|
||||
+ bfq_put_queue(bfqq); /* release process reference */
|
||||
}
|
||||
|
||||
static void bfq_init_icq(struct io_cq *icq)
|
||||
@@ -3973,6 +4002,7 @@ static void bfq_check_ioprio_change(struct bfq_io_cq *bic, struct bio *bio)
|
||||
|
||||
bfqq = bic_to_bfqq(bic, false);
|
||||
if (bfqq) {
|
||||
+ /* release process reference on this queue */
|
||||
bfq_put_queue(bfqq);
|
||||
bfqq = bfq_get_queue(bfqd, bio, BLK_RW_ASYNC, bic);
|
||||
bic_set_bfqq(bic, bfqq, false);
|
||||
@@ -4093,14 +4123,20 @@ static struct bfq_queue *bfq_get_queue(struct bfq_data *bfqd,
|
||||
* prune it.
|
||||
*/
|
||||
if (async_bfqq) {
|
||||
- bfqq->ref++;
|
||||
+ bfqq->ref++; /*
|
||||
+ * Extra group reference, w.r.t. sync
|
||||
+ * queue. This extra reference is removed
|
||||
+ * only if bfqq->bfqg disappears, to
|
||||
+ * guarantee that this queue is not freed
|
||||
+ * until its group goes away.
|
||||
+ */
|
||||
bfq_log_bfqq(bfqd, bfqq, "get_queue, bfqq not in async: %p, %d",
|
||||
bfqq, bfqq->ref);
|
||||
*async_bfqq = bfqq;
|
||||
}
|
||||
|
||||
out:
|
||||
- bfqq->ref++;
|
||||
+ bfqq->ref++; /* get a process reference to this queue */
|
||||
bfq_log_bfqq(bfqd, bfqq, "get_queue, at end: %p, %d", bfqq, bfqq->ref);
|
||||
rcu_read_unlock();
|
||||
return bfqq;
|
||||
@@ -4274,10 +4310,14 @@ static void bfq_insert_request(struct request_queue *q, struct request *rq)
|
||||
bfqq->allocated[rq_data_dir(rq)]--;
|
||||
new_bfqq->ref++;
|
||||
bfq_clear_bfqq_just_created(bfqq);
|
||||
- bfq_put_queue(bfqq);
|
||||
if (bic_to_bfqq(RQ_BIC(rq), 1) == bfqq)
|
||||
bfq_merge_bfqqs(bfqd, RQ_BIC(rq),
|
||||
bfqq, new_bfqq);
|
||||
+ /*
|
||||
+ * rq is about to be enqueued into new_bfqq,
|
||||
+ * release rq reference on bfqq
|
||||
+ */
|
||||
+ bfq_put_queue(bfqq);
|
||||
rq->elv.priv[1] = new_bfqq;
|
||||
bfqq = new_bfqq;
|
||||
}
|
||||
@@ -4697,9 +4737,8 @@ static void bfq_shutdown_timer_wq(struct bfq_data *bfqd)
|
||||
cancel_work_sync(&bfqd->unplug_work);
|
||||
}
|
||||
|
||||
-#ifdef CONFIG_BFQ_GROUP_IOSCHED
|
||||
static void __bfq_put_async_bfqq(struct bfq_data *bfqd,
|
||||
- struct bfq_queue **bfqq_ptr)
|
||||
+ struct bfq_queue **bfqq_ptr)
|
||||
{
|
||||
struct bfq_group *root_group = bfqd->root_group;
|
||||
struct bfq_queue *bfqq = *bfqq_ptr;
|
||||
@@ -4730,7 +4769,6 @@ static void bfq_put_async_queues(struct bfq_data *bfqd, struct bfq_group *bfqg)
|
||||
|
||||
__bfq_put_async_bfqq(bfqd, &bfqg->async_idle_bfqq);
|
||||
}
|
||||
-#endif
|
||||
|
||||
static void bfq_exit_queue(struct elevator_queue *e)
|
||||
{
|
||||
@@ -4755,6 +4793,7 @@ static void bfq_exit_queue(struct elevator_queue *e)
|
||||
#ifdef CONFIG_BFQ_GROUP_IOSCHED
|
||||
blkcg_deactivate_policy(q, &blkcg_policy_bfq);
|
||||
#else
|
||||
+ bfq_put_async_queues(bfqd, bfqd->root_group);
|
||||
kfree(bfqd->root_group);
|
||||
#endif
|
||||
|
||||
@@ -5229,7 +5268,7 @@ static struct blkcg_policy blkcg_policy_bfq = {
|
||||
static int __init bfq_init(void)
|
||||
{
|
||||
int ret;
|
||||
- char msg[60] = "BFQ I/O-scheduler: v8r7";
|
||||
+ char msg[60] = "BFQ I/O-scheduler: v8r10";
|
||||
|
||||
#ifdef CONFIG_BFQ_GROUP_IOSCHED
|
||||
ret = blkcg_policy_register(&blkcg_policy_bfq);
|
||||
@@ -5255,7 +5294,7 @@ static int __init bfq_init(void)
|
||||
* be run for a long time.
|
||||
*/
|
||||
T_slow[0] = msecs_to_jiffies(3500); /* actually 4 sec */
|
||||
- T_slow[1] = msecs_to_jiffies(1000); /* actually 1.5 sec */
|
||||
+ T_slow[1] = msecs_to_jiffies(6000); /* actually 6.5 sec */
|
||||
T_fast[0] = msecs_to_jiffies(7000); /* actually 8 sec */
|
||||
T_fast[1] = msecs_to_jiffies(2500); /* actually 3 sec */
|
||||
|
||||
diff --git a/block/bfq-sched.c b/block/bfq-sched.c
|
||||
index 797bce7..70aac56 100644
|
||||
--- a/block/bfq-sched.c
|
||||
+++ b/block/bfq-sched.c
|
||||
@@ -154,7 +154,13 @@ static bool bfq_update_next_in_service(struct bfq_sched_data *sd,
|
||||
#define for_each_entity(entity) \
|
||||
for (; entity ; entity = entity->parent)
|
||||
|
||||
-#define for_each_entity_safe(entity, parent) \
|
||||
+/*
|
||||
+ * For each iteration, compute parent in advance, so as to be safe if
|
||||
+ * entity is deallocated during the iteration. Such a deallocation may
|
||||
+ * happen as a consequence of a bfq_put_queue that frees the bfq_queue
|
||||
+ * containing entity.
|
||||
+ */
|
||||
+#define for_each_entity_safe(entity, parent) \
|
||||
for (; entity && ({ parent = entity->parent; 1; }); entity = parent)
|
||||
|
||||
/*
|
||||
@@ -691,27 +697,31 @@ static void bfq_idle_insert(struct bfq_service_tree *st,
|
||||
}
|
||||
|
||||
/**
|
||||
- * bfq_forget_entity - remove an entity from the wfq trees.
|
||||
+ * bfq_forget_entity - do not consider entity any longer for scheduling
|
||||
* @st: the service tree.
|
||||
* @entity: the entity being removed.
|
||||
+ * @is_in_service: true if entity is currently the in-service entity.
|
||||
*
|
||||
- * Update the device status and forget everything about @entity, putting
|
||||
- * the device reference to it, if it is a queue. Entities belonging to
|
||||
- * groups are not refcounted.
|
||||
+ * Forget everything about @entity. In addition, if entity represents
|
||||
+ * a queue, and the latter is not in service, then release the service
|
||||
+ * reference to the queue (the one taken through bfq_get_entity). In
|
||||
+ * fact, in this case, there is really no more service reference to
|
||||
+ * the queue, as the latter is also outside any service tree. If,
|
||||
+ * instead, the queue is in service, then __bfq_bfqd_reset_in_service
|
||||
+ * will take care of putting the reference when the queue finally
|
||||
+ * stops being served.
|
||||
*/
|
||||
static void bfq_forget_entity(struct bfq_service_tree *st,
|
||||
- struct bfq_entity *entity)
|
||||
+ struct bfq_entity *entity,
|
||||
+ bool is_in_service)
|
||||
{
|
||||
struct bfq_queue *bfqq = bfq_entity_to_bfqq(entity);
|
||||
- struct bfq_sched_data *sd;
|
||||
-
|
||||
BUG_ON(!entity->on_st);
|
||||
|
||||
entity->on_st = false;
|
||||
st->wsum -= entity->weight;
|
||||
- if (bfqq) {
|
||||
- sd = entity->sched_data;
|
||||
- bfq_log_bfqq(bfqq->bfqd, bfqq, "forget_entity: %p %d",
|
||||
+ if (bfqq && !is_in_service) {
|
||||
+ bfq_log_bfqq(bfqq->bfqd, bfqq, "forget_entity (before): %p %d",
|
||||
bfqq, bfqq->ref);
|
||||
bfq_put_queue(bfqq);
|
||||
}
|
||||
@@ -726,7 +736,8 @@ static void bfq_put_idle_entity(struct bfq_service_tree *st,
|
||||
struct bfq_entity *entity)
|
||||
{
|
||||
bfq_idle_extract(st, entity);
|
||||
- bfq_forget_entity(st, entity);
|
||||
+ bfq_forget_entity(st, entity,
|
||||
+ entity == entity->sched_data->in_service_entity);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1082,6 +1093,12 @@ static void __bfq_activate_entity(struct bfq_entity *entity,
|
||||
*/
|
||||
entity->start = min_vstart;
|
||||
st->wsum += entity->weight;
|
||||
+ /*
|
||||
+ * entity is about to be inserted into a service tree,
|
||||
+ * and then set in service: get a reference to make
|
||||
+ * sure entity does not disappear until it is no
|
||||
+ * longer in service or scheduled for service.
|
||||
+ */
|
||||
bfq_get_entity(entity);
|
||||
|
||||
BUG_ON(entity->on_st && bfqq);
|
||||
@@ -1264,27 +1281,27 @@ static bool __bfq_deactivate_entity(struct bfq_entity *entity,
|
||||
{
|
||||
struct bfq_sched_data *sd = entity->sched_data;
|
||||
struct bfq_service_tree *st = bfq_entity_service_tree(entity);
|
||||
- bool was_in_service = entity == sd->in_service_entity;
|
||||
+ bool is_in_service = entity == sd->in_service_entity;
|
||||
|
||||
if (!entity->on_st) { /* entity never activated, or already inactive */
|
||||
BUG_ON(entity == entity->sched_data->in_service_entity);
|
||||
return false;
|
||||
}
|
||||
|
||||
- BUG_ON(was_in_service && entity->tree && entity->tree != &st->active);
|
||||
+ BUG_ON(is_in_service && entity->tree && entity->tree != &st->active);
|
||||
|
||||
- if (was_in_service)
|
||||
+ if (is_in_service)
|
||||
bfq_calc_finish(entity, entity->service);
|
||||
|
||||
if (entity->tree == &st->active)
|
||||
bfq_active_extract(st, entity);
|
||||
- else if (!was_in_service && entity->tree == &st->idle)
|
||||
+ else if (!is_in_service && entity->tree == &st->idle)
|
||||
bfq_idle_extract(st, entity);
|
||||
else if (entity->tree)
|
||||
BUG();
|
||||
|
||||
if (!ins_into_idle_tree || !bfq_gt(entity->finish, st->vtime))
|
||||
- bfq_forget_entity(st, entity);
|
||||
+ bfq_forget_entity(st, entity, is_in_service);
|
||||
else
|
||||
bfq_idle_insert(st, entity);
|
||||
|
||||
@@ -1301,7 +1318,7 @@ static void bfq_deactivate_entity(struct bfq_entity *entity,
|
||||
bool expiration)
|
||||
{
|
||||
struct bfq_sched_data *sd;
|
||||
- struct bfq_entity *parent;
|
||||
+ struct bfq_entity *parent = NULL;
|
||||
|
||||
for_each_entity_safe(entity, parent) {
|
||||
sd = entity->sched_data;
|
||||
@@ -1320,8 +1337,8 @@ static void bfq_deactivate_entity(struct bfq_entity *entity,
|
||||
|
||||
if (!__bfq_deactivate_entity(entity, ins_into_idle_tree)) {
|
||||
/*
|
||||
- * Entity is not any tree any more, so, this
|
||||
- * deactivation is a no-op, and there is
|
||||
+ * entity is not in any tree any more, so
|
||||
+ * this deactivation is a no-op, and there is
|
||||
* nothing to change for upper-level entities
|
||||
* (in case of expiration, this can never
|
||||
* happen).
|
||||
@@ -1821,14 +1838,16 @@ static struct bfq_queue *bfq_get_next_queue(struct bfq_data *bfqd)
|
||||
|
||||
static void __bfq_bfqd_reset_in_service(struct bfq_data *bfqd)
|
||||
{
|
||||
- struct bfq_entity *entity = &bfqd->in_service_queue->entity;
|
||||
+ struct bfq_queue *in_serv_bfqq = bfqd->in_service_queue;
|
||||
+ struct bfq_entity *in_serv_entity = &in_serv_bfqq->entity;
|
||||
+ struct bfq_entity *entity = in_serv_entity;
|
||||
|
||||
if (bfqd->in_service_bic) {
|
||||
put_io_context(bfqd->in_service_bic->icq.ioc);
|
||||
bfqd->in_service_bic = NULL;
|
||||
}
|
||||
|
||||
- bfq_clear_bfqq_wait_request(bfqd->in_service_queue);
|
||||
+ bfq_clear_bfqq_wait_request(in_serv_bfqq);
|
||||
hrtimer_try_to_cancel(&bfqd->idle_slice_timer);
|
||||
bfqd->in_service_queue = NULL;
|
||||
|
||||
@@ -1840,6 +1859,14 @@ static void __bfq_bfqd_reset_in_service(struct bfq_data *bfqd)
|
||||
*/
|
||||
for_each_entity(entity)
|
||||
entity->sched_data->in_service_entity = NULL;
|
||||
+
|
||||
+ /*
|
||||
+ * in_serv_entity is no longer in service, so, if it is in no
|
||||
+ * service tree either, then release the service reference to
|
||||
+ * the queue it represents (taken with bfq_get_entity).
|
||||
+ */
|
||||
+ if (!in_serv_entity->on_st)
|
||||
+ bfq_put_queue(in_serv_bfqq);
|
||||
}
|
||||
|
||||
static void bfq_deactivate_bfqq(struct bfq_data *bfqd, struct bfq_queue *bfqq,
|
||||
@@ -1904,8 +1931,6 @@ static void bfq_del_bfqq_busy(struct bfq_data *bfqd, struct bfq_queue *bfqq,
|
||||
BUG_ON(bfqq->entity.budget < 0);
|
||||
|
||||
bfq_deactivate_bfqq(bfqd, bfqq, true, expiration);
|
||||
-
|
||||
- BUG_ON(bfqq->entity.budget < 0);
|
||||
}
|
||||
|
||||
/*
|
||||
diff --git a/block/bfq.h b/block/bfq.h
|
||||
index a9da002..e3855af 100644
|
||||
--- a/block/bfq.h
|
||||
+++ b/block/bfq.h
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
- * BFQ v8r7 for 4.9.0: data structures and common functions prototypes.
|
||||
+ * BFQ v8r10 for 4.9.0: data structures and common functions prototypes.
|
||||
*
|
||||
* Based on ideas and code from CFQ:
|
||||
* Copyright (C) 2003 Jens Axboe <axboe@kernel.dk>
|
||||
@@ -9,7 +9,7 @@
|
||||
*
|
||||
* Copyright (C) 2015 Paolo Valente <paolo.valente@unimore.it>
|
||||
*
|
||||
- * Copyright (C) 2016 Paolo Valente <paolo.valente@linaro.org>
|
||||
+ * Copyright (C) 2017 Paolo Valente <paolo.valente@linaro.org>
|
||||
*/
|
||||
|
||||
#ifndef _BFQ_H
|
||||
+115
@@ -0,0 +1,115 @@
|
||||
From bc33c5df710c0aae6db396146194108634ef6f60 Mon Sep 17 00:00:00 2001
|
||||
From: "Winkler, Tomas" <tomas.winkler@intel.com>
|
||||
Date: Mon, 12 Sep 2016 16:04:19 +0300
|
||||
Subject: [PATCH] tmp/tpm_crb: fix Intel PTT hw bug during idle state
|
||||
|
||||
There is a HW bug in Skylake, and Broxton PCH Intel PTT device, where
|
||||
most of the registers in the control area except START, REQUEST, CANCEL,
|
||||
and LOC_CTRL lost retention when the device is in the idle state. Hence
|
||||
we need to bring the device to ready state before accessing the other
|
||||
registers. The fix brings device to ready state before trying to read
|
||||
command and response buffer addresses in order to remap the for access.
|
||||
|
||||
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
|
||||
Tested-by: Jarkko Sakkinen <jarkko.sakkinn@linux.intel.com>
|
||||
Reviewed-by: Jarkko Sakkinen <jarkko.sakkinn@linux.intel.com>
|
||||
Signed-off-by: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
|
||||
---
|
||||
drivers/char/tpm/tpm_crb.c | 47 ++++++++++++++++++++++++++++++++++++++--------
|
||||
1 file changed, 39 insertions(+), 8 deletions(-)
|
||||
|
||||
diff --git a/drivers/char/tpm/tpm_crb.c b/drivers/char/tpm/tpm_crb.c
|
||||
index 8dd0f20..ff0d505 100644
|
||||
--- a/drivers/char/tpm/tpm_crb.c
|
||||
+++ b/drivers/char/tpm/tpm_crb.c
|
||||
@@ -315,6 +315,7 @@ static int crb_map_io(struct acpi_device *device, struct crb_priv *priv,
|
||||
struct list_head resources;
|
||||
struct resource io_res;
|
||||
struct device *dev = &device->dev;
|
||||
+ u32 pa_high, pa_low;
|
||||
u64 cmd_pa;
|
||||
u32 cmd_size;
|
||||
u64 rsp_pa;
|
||||
@@ -342,12 +343,27 @@ static int crb_map_io(struct acpi_device *device, struct crb_priv *priv,
|
||||
if (IS_ERR(priv->cca))
|
||||
return PTR_ERR(priv->cca);
|
||||
|
||||
- cmd_pa = ((u64) ioread32(&priv->cca->cmd_pa_high) << 32) |
|
||||
- (u64) ioread32(&priv->cca->cmd_pa_low);
|
||||
+ /*
|
||||
+ * PTT HW bug w/a: wake up the device to access
|
||||
+ * possibly not retained registers.
|
||||
+ */
|
||||
+ ret = crb_cmd_ready(dev, priv);
|
||||
+ if (ret)
|
||||
+ return ret;
|
||||
+
|
||||
+ pa_high = ioread32(&priv->cca->cmd_pa_high);
|
||||
+ pa_low = ioread32(&priv->cca->cmd_pa_low);
|
||||
+ cmd_pa = ((u64)pa_high << 32) | pa_low;
|
||||
cmd_size = ioread32(&priv->cca->cmd_size);
|
||||
+
|
||||
+ dev_dbg(dev, "cmd_hi = %X cmd_low = %X cmd_size %X\n",
|
||||
+ pa_high, pa_low, cmd_size);
|
||||
+
|
||||
priv->cmd = crb_map_res(dev, priv, &io_res, cmd_pa, cmd_size);
|
||||
- if (IS_ERR(priv->cmd))
|
||||
- return PTR_ERR(priv->cmd);
|
||||
+ if (IS_ERR(priv->cmd)) {
|
||||
+ ret = PTR_ERR(priv->cmd);
|
||||
+ goto out;
|
||||
+ }
|
||||
|
||||
memcpy_fromio(&rsp_pa, &priv->cca->rsp_pa, 8);
|
||||
rsp_pa = le64_to_cpu(rsp_pa);
|
||||
@@ -355,7 +371,8 @@ static int crb_map_io(struct acpi_device *device, struct crb_priv *priv,
|
||||
|
||||
if (cmd_pa != rsp_pa) {
|
||||
priv->rsp = crb_map_res(dev, priv, &io_res, rsp_pa, rsp_size);
|
||||
- return PTR_ERR_OR_ZERO(priv->rsp);
|
||||
+ ret = PTR_ERR_OR_ZERO(priv->rsp);
|
||||
+ goto out;
|
||||
}
|
||||
|
||||
/* According to the PTP specification, overlapping command and response
|
||||
@@ -363,12 +380,18 @@ static int crb_map_io(struct acpi_device *device, struct crb_priv *priv,
|
||||
*/
|
||||
if (cmd_size != rsp_size) {
|
||||
dev_err(dev, FW_BUG "overlapping command and response buffer sizes are not identical");
|
||||
- return -EINVAL;
|
||||
+ ret = -EINVAL;
|
||||
+ goto out;
|
||||
}
|
||||
+
|
||||
priv->cmd_size = cmd_size;
|
||||
|
||||
priv->rsp = priv->cmd;
|
||||
- return 0;
|
||||
+
|
||||
+out:
|
||||
+ crb_go_idle(dev, priv);
|
||||
+
|
||||
+ return ret;
|
||||
}
|
||||
|
||||
static int crb_acpi_add(struct acpi_device *device)
|
||||
@@ -412,7 +435,15 @@ static int crb_acpi_add(struct acpi_device *device)
|
||||
if (rc)
|
||||
return rc;
|
||||
|
||||
- return crb_init(device, priv);
|
||||
+ rc = crb_cmd_ready(dev, priv);
|
||||
+ if (rc)
|
||||
+ return rc;
|
||||
+
|
||||
+ rc = crb_init(device, priv);
|
||||
+ if (rc)
|
||||
+ crb_go_idle(dev, priv);
|
||||
+
|
||||
+ return rc;
|
||||
}
|
||||
|
||||
static int crb_acpi_remove(struct acpi_device *device)
|
||||
--
|
||||
2.10.2
|
||||
|
||||
+134
@@ -0,0 +1,134 @@
|
||||
From e74f2f76c13770bb8e004475a933923e9c92723d Mon Sep 17 00:00:00 2001
|
||||
From: "Winkler, Tomas" <tomas.winkler@intel.com>
|
||||
Date: Sat, 8 Oct 2016 14:59:39 +0300
|
||||
Subject: [PATCH] tmp/tpm_crb: implement runtime pm for tpm_crb
|
||||
|
||||
Utilize runtime_pm for driving tpm crb idle states.
|
||||
The framework calls cmd_ready from the pm_runtime_resume handler
|
||||
and go idle from the pm_runtime_suspend handler.
|
||||
The TPM framework should wake the device before transmit and receive.
|
||||
In case the runtime_pm framework is not compiled in or enabled, the device
|
||||
will be in the permanent ready state.
|
||||
|
||||
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
|
||||
Reviewed-by: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
|
||||
Tested-by: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
|
||||
Signed-off-by: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
|
||||
---
|
||||
drivers/char/tpm/tpm-interface.c | 5 +++++
|
||||
drivers/char/tpm/tpm_crb.c | 42 ++++++++++++++++++++++++++++++++++++----
|
||||
2 files changed, 43 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/drivers/char/tpm/tpm-interface.c b/drivers/char/tpm/tpm-interface.c
|
||||
index 3a9149c..cb0e57e 100644
|
||||
--- a/drivers/char/tpm/tpm-interface.c
|
||||
+++ b/drivers/char/tpm/tpm-interface.c
|
||||
@@ -29,6 +29,7 @@
|
||||
#include <linux/mutex.h>
|
||||
#include <linux/spinlock.h>
|
||||
#include <linux/freezer.h>
|
||||
+#include <linux/pm_runtime.h>
|
||||
|
||||
#include "tpm.h"
|
||||
#include "tpm_eventlog.h"
|
||||
@@ -356,6 +357,8 @@ ssize_t tpm_transmit(struct tpm_chip *chip, const u8 *buf, size_t bufsiz,
|
||||
if (!(flags & TPM_TRANSMIT_UNLOCKED))
|
||||
mutex_lock(&chip->tpm_mutex);
|
||||
|
||||
+ pm_runtime_get_sync(chip->dev.parent);
|
||||
+
|
||||
rc = chip->ops->send(chip, (u8 *) buf, count);
|
||||
if (rc < 0) {
|
||||
dev_err(&chip->dev,
|
||||
@@ -397,6 +400,8 @@ ssize_t tpm_transmit(struct tpm_chip *chip, const u8 *buf, size_t bufsiz,
|
||||
dev_err(&chip->dev,
|
||||
"tpm_transmit: tpm_recv: error %zd\n", rc);
|
||||
out:
|
||||
+ pm_runtime_put_sync(chip->dev.parent);
|
||||
+
|
||||
if (!(flags & TPM_TRANSMIT_UNLOCKED))
|
||||
mutex_unlock(&chip->tpm_mutex);
|
||||
return rc;
|
||||
diff --git a/drivers/char/tpm/tpm_crb.c b/drivers/char/tpm/tpm_crb.c
|
||||
index f579f1a..717b6b4 100644
|
||||
--- a/drivers/char/tpm/tpm_crb.c
|
||||
+++ b/drivers/char/tpm/tpm_crb.c
|
||||
@@ -19,6 +19,7 @@
|
||||
#include <linux/highmem.h>
|
||||
#include <linux/rculist.h>
|
||||
#include <linux/module.h>
|
||||
+#include <linux/pm_runtime.h>
|
||||
#include "tpm.h"
|
||||
|
||||
#define ACPI_SIG_TPM2 "TPM2"
|
||||
@@ -149,8 +150,6 @@ static int __maybe_unused crb_cmd_ready(struct device *dev,
|
||||
return 0;
|
||||
}
|
||||
|
||||
-static SIMPLE_DEV_PM_OPS(crb_pm, tpm_pm_suspend, tpm_pm_resume);
|
||||
-
|
||||
static u8 crb_status(struct tpm_chip *chip)
|
||||
{
|
||||
struct crb_priv *priv = dev_get_drvdata(&chip->dev);
|
||||
@@ -433,11 +432,21 @@ static int crb_acpi_add(struct acpi_device *device)
|
||||
if (rc)
|
||||
return rc;
|
||||
|
||||
+ pm_runtime_get_noresume(dev);
|
||||
+ pm_runtime_set_active(dev);
|
||||
+ pm_runtime_enable(dev);
|
||||
+
|
||||
rc = tpm_chip_register(chip);
|
||||
- if (rc)
|
||||
+ if (rc) {
|
||||
crb_go_idle(dev, priv);
|
||||
+ pm_runtime_put_noidle(dev);
|
||||
+ pm_runtime_disable(dev);
|
||||
+ return rc;
|
||||
+ }
|
||||
|
||||
- return rc;
|
||||
+ pm_runtime_put(dev);
|
||||
+
|
||||
+ return 0;
|
||||
}
|
||||
|
||||
static int crb_acpi_remove(struct acpi_device *device)
|
||||
@@ -447,9 +456,34 @@ static int crb_acpi_remove(struct acpi_device *device)
|
||||
|
||||
tpm_chip_unregister(chip);
|
||||
|
||||
+ pm_runtime_disable(dev);
|
||||
+
|
||||
return 0;
|
||||
}
|
||||
|
||||
+#ifdef CONFIG_PM
|
||||
+static int crb_pm_runtime_suspend(struct device *dev)
|
||||
+{
|
||||
+ struct tpm_chip *chip = dev_get_drvdata(dev);
|
||||
+ struct crb_priv *priv = dev_get_drvdata(&chip->dev);
|
||||
+
|
||||
+ return crb_go_idle(dev, priv);
|
||||
+}
|
||||
+
|
||||
+static int crb_pm_runtime_resume(struct device *dev)
|
||||
+{
|
||||
+ struct tpm_chip *chip = dev_get_drvdata(dev);
|
||||
+ struct crb_priv *priv = dev_get_drvdata(&chip->dev);
|
||||
+
|
||||
+ return crb_cmd_ready(dev, priv);
|
||||
+}
|
||||
+#endif /* CONFIG_PM */
|
||||
+
|
||||
+static const struct dev_pm_ops crb_pm = {
|
||||
+ SET_SYSTEM_SLEEP_PM_OPS(tpm_pm_suspend, tpm_pm_resume)
|
||||
+ SET_RUNTIME_PM_OPS(crb_pm_runtime_suspend, crb_pm_runtime_resume, NULL)
|
||||
+};
|
||||
+
|
||||
static struct acpi_device_id crb_device_ids[] = {
|
||||
{"MSFT0101", 0},
|
||||
{"", 0},
|
||||
--
|
||||
2.10.2
|
||||
|
||||
+111
@@ -0,0 +1,111 @@
|
||||
From ba5287b6ef6a2ee91dc6cc0829649cecf7b70253 Mon Sep 17 00:00:00 2001
|
||||
From: "Winkler, Tomas" <tomas.winkler@intel.com>
|
||||
Date: Thu, 15 Sep 2016 10:27:38 +0300
|
||||
Subject: [PATCH] tpm/tpm_crb: implement tpm crb idle state
|
||||
|
||||
The register TPM_CRB_CTRL_REQ_x contains bits goIdle and cmdReady for
|
||||
SW to indicate that the device can enter or should exit the idle state.
|
||||
|
||||
The legacy ACPI-start (SMI + DMA) based devices do not support these
|
||||
bits and the idle state management is not exposed to the host SW.
|
||||
Thus, this functionality only is enabled only for a CRB start (MMIO)
|
||||
based devices.
|
||||
|
||||
Based on Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
|
||||
original patch:
|
||||
'tpm_crb: implement power tpm crb power management'
|
||||
|
||||
To keep the implementation local to the hw we don't use wait_for_tpm_stat
|
||||
for polling the TPM_CRB_CTRL_REQ.
|
||||
|
||||
[jarkko.sakkinen@linux.intel.com: removed cmdReady debug trace on a
|
||||
success case due the heavy amount of log traffic it causes.]
|
||||
|
||||
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
|
||||
Reviewed-by: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
|
||||
Tested-by: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
|
||||
Signed-off-by: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
|
||||
---
|
||||
drivers/char/tpm/tpm_crb.c | 66 ++++++++++++++++++++++++++++++++++++++++++++++
|
||||
1 file changed, 66 insertions(+)
|
||||
|
||||
diff --git a/drivers/char/tpm/tpm_crb.c b/drivers/char/tpm/tpm_crb.c
|
||||
index a7c870a..8dd0f20 100644
|
||||
--- a/drivers/char/tpm/tpm_crb.c
|
||||
+++ b/drivers/char/tpm/tpm_crb.c
|
||||
@@ -83,6 +83,72 @@ struct crb_priv {
|
||||
u32 cmd_size;
|
||||
};
|
||||
|
||||
+/**
|
||||
+ * crb_go_idle - request tpm crb device to go the idle state
|
||||
+ *
|
||||
+ * @dev: crb device
|
||||
+ * @priv: crb private data
|
||||
+ *
|
||||
+ * Write CRB_CTRL_REQ_GO_IDLE to TPM_CRB_CTRL_REQ
|
||||
+ * The device should respond within TIMEOUT_C by clearing the bit.
|
||||
+ * Anyhow, we do not wait here as a consequent CMD_READY request
|
||||
+ * will be handled correctly even if idle was not completed.
|
||||
+ *
|
||||
+ * The function does nothing for devices with ACPI-start method.
|
||||
+ *
|
||||
+ * Return: 0 always
|
||||
+ */
|
||||
+static int __maybe_unused crb_go_idle(struct device *dev, struct crb_priv *priv)
|
||||
+{
|
||||
+ if (priv->flags & CRB_FL_ACPI_START)
|
||||
+ return 0;
|
||||
+
|
||||
+ iowrite32(CRB_CTRL_REQ_GO_IDLE, &priv->cca->req);
|
||||
+ /* we don't really care when this settles */
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+/**
|
||||
+ * crb_cmd_ready - request tpm crb device to enter ready state
|
||||
+ *
|
||||
+ * @dev: crb device
|
||||
+ * @priv: crb private data
|
||||
+ *
|
||||
+ * Write CRB_CTRL_REQ_CMD_READY to TPM_CRB_CTRL_REQ
|
||||
+ * and poll till the device acknowledge it by clearing the bit.
|
||||
+ * The device should respond within TIMEOUT_C.
|
||||
+ *
|
||||
+ * The function does nothing for devices with ACPI-start method
|
||||
+ *
|
||||
+ * Return: 0 on success -ETIME on timeout;
|
||||
+ */
|
||||
+static int __maybe_unused crb_cmd_ready(struct device *dev,
|
||||
+ struct crb_priv *priv)
|
||||
+{
|
||||
+ ktime_t stop, start;
|
||||
+
|
||||
+ if (priv->flags & CRB_FL_ACPI_START)
|
||||
+ return 0;
|
||||
+
|
||||
+ iowrite32(CRB_CTRL_REQ_CMD_READY, &priv->cca->req);
|
||||
+
|
||||
+ start = ktime_get();
|
||||
+ stop = ktime_add(start, ms_to_ktime(TPM2_TIMEOUT_C));
|
||||
+ do {
|
||||
+ if (!(ioread32(&priv->cca->req) & CRB_CTRL_REQ_CMD_READY))
|
||||
+ return 0;
|
||||
+ usleep_range(50, 100);
|
||||
+ } while (ktime_before(ktime_get(), stop));
|
||||
+
|
||||
+ if (ioread32(&priv->cca->req) & CRB_CTRL_REQ_CMD_READY) {
|
||||
+ dev_warn(dev, "cmdReady timed out\n");
|
||||
+ return -ETIME;
|
||||
+ }
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
static SIMPLE_DEV_PM_OPS(crb_pm, tpm_pm_suspend, tpm_pm_resume);
|
||||
|
||||
static u8 crb_status(struct tpm_chip *chip)
|
||||
--
|
||||
2.10.2
|
||||
|
||||
+75
@@ -0,0 +1,75 @@
|
||||
From c58bd34cec4c05f8e3362a79ae94de9f405c39b5 Mon Sep 17 00:00:00 2001
|
||||
From: "Winkler, Tomas" <tomas.winkler@intel.com>
|
||||
Date: Mon, 12 Sep 2016 16:04:20 +0300
|
||||
Subject: [PATCH] tpm/tpm_crb: open code the crb_init into acpi_add
|
||||
|
||||
This is preparation step for implementing tpm crb
|
||||
runtime pm. We need to have tpm chip allocated
|
||||
and populated before we access the runtime handlers.
|
||||
|
||||
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
|
||||
Reviewed-by: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
|
||||
Tested-by: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
|
||||
Signed-off-by: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
|
||||
---
|
||||
drivers/char/tpm/tpm_crb.c | 26 ++++++++++----------------
|
||||
1 file changed, 10 insertions(+), 16 deletions(-)
|
||||
|
||||
diff --git a/drivers/char/tpm/tpm_crb.c b/drivers/char/tpm/tpm_crb.c
|
||||
index ff0d505..f579f1a 100644
|
||||
--- a/drivers/char/tpm/tpm_crb.c
|
||||
+++ b/drivers/char/tpm/tpm_crb.c
|
||||
@@ -262,21 +262,6 @@ static const struct tpm_class_ops tpm_crb = {
|
||||
.req_complete_val = CRB_DRV_STS_COMPLETE,
|
||||
};
|
||||
|
||||
-static int crb_init(struct acpi_device *device, struct crb_priv *priv)
|
||||
-{
|
||||
- struct tpm_chip *chip;
|
||||
-
|
||||
- chip = tpmm_chip_alloc(&device->dev, &tpm_crb);
|
||||
- if (IS_ERR(chip))
|
||||
- return PTR_ERR(chip);
|
||||
-
|
||||
- dev_set_drvdata(&chip->dev, priv);
|
||||
- chip->acpi_dev_handle = device->handle;
|
||||
- chip->flags = TPM_CHIP_FLAG_TPM2;
|
||||
-
|
||||
- return tpm_chip_register(chip);
|
||||
-}
|
||||
-
|
||||
static int crb_check_resource(struct acpi_resource *ares, void *data)
|
||||
{
|
||||
struct resource *io_res = data;
|
||||
@@ -398,6 +383,7 @@ static int crb_acpi_add(struct acpi_device *device)
|
||||
{
|
||||
struct acpi_table_tpm2 *buf;
|
||||
struct crb_priv *priv;
|
||||
+ struct tpm_chip *chip;
|
||||
struct device *dev = &device->dev;
|
||||
acpi_status status;
|
||||
u32 sm;
|
||||
@@ -435,11 +421,19 @@ static int crb_acpi_add(struct acpi_device *device)
|
||||
if (rc)
|
||||
return rc;
|
||||
|
||||
+ chip = tpmm_chip_alloc(dev, &tpm_crb);
|
||||
+ if (IS_ERR(chip))
|
||||
+ return PTR_ERR(chip);
|
||||
+
|
||||
+ dev_set_drvdata(&chip->dev, priv);
|
||||
+ chip->acpi_dev_handle = device->handle;
|
||||
+ chip->flags = TPM_CHIP_FLAG_TPM2;
|
||||
+
|
||||
rc = crb_cmd_ready(dev, priv);
|
||||
if (rc)
|
||||
return rc;
|
||||
|
||||
- rc = crb_init(device, priv);
|
||||
+ rc = tpm_chip_register(chip);
|
||||
if (rc)
|
||||
crb_go_idle(dev, priv);
|
||||
|
||||
--
|
||||
2.10.2
|
||||
|
||||
@@ -8,13 +8,14 @@ Signed-off-by: Thomas Backlund <tmb@mageia.org>
|
||||
drivers/md/dm-raid.c | 2 ++
|
||||
1 file changed, 2 insertions(+)
|
||||
|
||||
--- linux-2.6.38.2-mga2/drivers/md/dm-raid.c.orig 2011-03-15 03:20:32.000000000 +0200
|
||||
+++ linux-2.6.38.2-mga2/drivers/md/dm-raid.c 2011-04-02 21:52:21.331302590 +0300
|
||||
@@ -693,5 +693,7 @@ MODULE_DESCRIPTION(DM_NAME " raid4/5/6 t
|
||||
--- linux/drivers/md/dm-raid.c.orig
|
||||
+++ linux/drivers/md/dm-raid.c
|
||||
@@ -3689,6 +3689,8 @@ MODULE_ALIAS("dm-raid10");
|
||||
MODULE_ALIAS("dm-raid4");
|
||||
MODULE_ALIAS("dm-raid5");
|
||||
MODULE_ALIAS("dm-raid6");
|
||||
+MODULE_ALIAS("dm-raid45");
|
||||
+MODULE_ALIAS("dm-raid4-5");
|
||||
MODULE_AUTHOR("Neil Brown <dm-devel@redhat.com>");
|
||||
MODULE_AUTHOR("Heinz Mauelshagen <dm-devel@redhat.com>");
|
||||
MODULE_LICENSE("GPL");
|
||||
|
||||
@@ -1,16 +0,0 @@
|
||||
|
||||
Mark as 4.7 so we can rebuild aufs tools with matching 4.7 check
|
||||
|
||||
Signed-off-by: Thomas Backlund <tmb@mageia.org>
|
||||
|
||||
--- linux/include/uapi/linux/aufs_type.h.orig
|
||||
+++ linux/include/uapi/linux/aufs_type.h
|
||||
@@ -26,7 +26,7 @@
|
||||
|
||||
#include <linux/limits.h>
|
||||
|
||||
-#define AUFS_VERSION "4.x-rcN"
|
||||
+#define AUFS_VERSION "4.7"
|
||||
|
||||
/* todo? move this to linux-2.6.19/include/magic.h */
|
||||
#define AUFS_SUPER_MAGIC ('a' << 24 | 'u' << 16 | 'f' << 8 | 's')
|
||||
+85
-77
@@ -1,6 +1,6 @@
|
||||
|
||||
fs/aufs/Kconfig | 2 +-
|
||||
fs/dcache.c | 1 +
|
||||
fs/dcache.c | 2 ++
|
||||
fs/exec.c | 1 +
|
||||
fs/fcntl.c | 1 +
|
||||
fs/file_table.c | 4 ++++
|
||||
@@ -16,11 +16,11 @@
|
||||
security/commoncap.c | 2 ++
|
||||
security/device_cgroup.c | 2 ++
|
||||
security/security.c | 10 ++++++++++
|
||||
17 files changed, 41 insertions(+), 1 deletion(-)
|
||||
17 files changed, 42 insertions(+), 1 deletion(-)
|
||||
|
||||
diff -Nurp linux-4.7-rc6-aufs/fs/aufs/Kconfig linux-4.7-rc6-aufs-mod/fs/aufs/Kconfig
|
||||
--- linux-4.7-rc6-aufs/fs/aufs/Kconfig 2016-07-04 19:02:29.246286120 +0300
|
||||
+++ linux-4.7-rc6-aufs-mod/fs/aufs/Kconfig 2016-07-04 19:03:53.653714965 +0300
|
||||
diff -Nurp linux-4.9-aufs/fs/aufs/Kconfig linux-4.9-aufs-mod/fs/aufs/Kconfig
|
||||
--- linux-4.9-aufs/fs/aufs/Kconfig 2016-12-31 00:31:52.367789380 +0200
|
||||
+++ linux-4.9-aufs-mod/fs/aufs/Kconfig 2016-12-31 00:32:35.153785422 +0200
|
||||
@@ -1,5 +1,5 @@
|
||||
config AUFS_FS
|
||||
- bool "Aufs (Advanced multi layered unification filesystem) support"
|
||||
@@ -28,10 +28,10 @@ diff -Nurp linux-4.7-rc6-aufs/fs/aufs/Kconfig linux-4.7-rc6-aufs-mod/fs/aufs/Kco
|
||||
help
|
||||
Aufs is a stackable unification filesystem such as Unionfs,
|
||||
which unifies several directories and provides a merged single
|
||||
diff -Nurp linux-4.7-rc6-aufs/fs/dcache.c linux-4.7-rc6-aufs-mod/fs/dcache.c
|
||||
--- linux-4.7-rc6-aufs/fs/dcache.c 2016-07-04 19:02:29.260286196 +0300
|
||||
+++ linux-4.7-rc6-aufs-mod/fs/dcache.c 2016-07-04 19:03:53.653714965 +0300
|
||||
@@ -1310,6 +1310,7 @@ rename_retry:
|
||||
diff -Nurp linux-4.9-aufs/fs/dcache.c linux-4.9-aufs-mod/fs/dcache.c
|
||||
--- linux-4.9-aufs/fs/dcache.c 2016-12-31 00:31:52.379789379 +0200
|
||||
+++ linux-4.9-aufs-mod/fs/dcache.c 2016-12-31 01:49:12.324360147 +0200
|
||||
@@ -1272,6 +1272,7 @@ rename_retry:
|
||||
seq = 1;
|
||||
goto again;
|
||||
}
|
||||
@@ -39,9 +39,17 @@ diff -Nurp linux-4.7-rc6-aufs/fs/dcache.c linux-4.7-rc6-aufs-mod/fs/dcache.c
|
||||
|
||||
/*
|
||||
* Search for at least 1 mount point in the dentry's subdirs.
|
||||
diff -Nurp linux-4.7-rc6-aufs/fs/exec.c linux-4.7-rc6-aufs-mod/fs/exec.c
|
||||
--- linux-4.7-rc6-aufs/fs/exec.c 2016-07-04 17:58:15.707773651 +0300
|
||||
+++ linux-4.7-rc6-aufs-mod/fs/exec.c 2016-07-04 19:03:53.654714970 +0300
|
||||
@@ -2855,6 +2856,7 @@ void d_exchange(struct dentry *dentry1,
|
||||
|
||||
write_sequnlock(&rename_lock);
|
||||
}
|
||||
+EXPORT_SYMBOL_GPL(d_exchange);
|
||||
|
||||
/**
|
||||
* d_ancestor - search for an ancestor
|
||||
diff -Nurp linux-4.9-aufs/fs/exec.c linux-4.9-aufs-mod/fs/exec.c
|
||||
--- linux-4.9-aufs/fs/exec.c 2016-12-11 21:17:54.000000000 +0200
|
||||
+++ linux-4.9-aufs-mod/fs/exec.c 2016-12-31 00:32:35.153785422 +0200
|
||||
@@ -104,6 +104,7 @@ bool path_noexec(const struct path *path
|
||||
return (path->mnt->mnt_flags & MNT_NOEXEC) ||
|
||||
(path->mnt->mnt_sb->s_iflags & SB_I_NOEXEC);
|
||||
@@ -50,9 +58,9 @@ diff -Nurp linux-4.7-rc6-aufs/fs/exec.c linux-4.7-rc6-aufs-mod/fs/exec.c
|
||||
|
||||
#ifdef CONFIG_USELIB
|
||||
/*
|
||||
diff -Nurp linux-4.7-rc6-aufs/fs/fcntl.c linux-4.7-rc6-aufs-mod/fs/fcntl.c
|
||||
--- linux-4.7-rc6-aufs/fs/fcntl.c 2016-07-04 19:02:29.260286196 +0300
|
||||
+++ linux-4.7-rc6-aufs-mod/fs/fcntl.c 2016-07-04 19:03:53.654714970 +0300
|
||||
diff -Nurp linux-4.9-aufs/fs/fcntl.c linux-4.9-aufs-mod/fs/fcntl.c
|
||||
--- linux-4.9-aufs/fs/fcntl.c 2016-12-31 00:31:52.379789379 +0200
|
||||
+++ linux-4.9-aufs-mod/fs/fcntl.c 2016-12-31 00:32:35.154785422 +0200
|
||||
@@ -82,6 +82,7 @@ int setfl(int fd, struct file * filp, un
|
||||
out:
|
||||
return error;
|
||||
@@ -61,9 +69,9 @@ diff -Nurp linux-4.7-rc6-aufs/fs/fcntl.c linux-4.7-rc6-aufs-mod/fs/fcntl.c
|
||||
|
||||
static void f_modown(struct file *filp, struct pid *pid, enum pid_type type,
|
||||
int force)
|
||||
diff -Nurp linux-4.7-rc6-aufs/fs/file_table.c linux-4.7-rc6-aufs-mod/fs/file_table.c
|
||||
--- linux-4.7-rc6-aufs/fs/file_table.c 2016-05-16 01:43:13.000000000 +0300
|
||||
+++ linux-4.7-rc6-aufs-mod/fs/file_table.c 2016-07-04 19:03:53.654714970 +0300
|
||||
diff -Nurp linux-4.9-aufs/fs/file_table.c linux-4.9-aufs-mod/fs/file_table.c
|
||||
--- linux-4.9-aufs/fs/file_table.c 2016-12-11 21:17:54.000000000 +0200
|
||||
+++ linux-4.9-aufs-mod/fs/file_table.c 2016-12-31 00:32:35.154785422 +0200
|
||||
@@ -147,6 +147,7 @@ over:
|
||||
}
|
||||
return ERR_PTR(-ENFILE);
|
||||
@@ -96,10 +104,10 @@ diff -Nurp linux-4.7-rc6-aufs/fs/file_table.c linux-4.7-rc6-aufs-mod/fs/file_tab
|
||||
|
||||
void __init files_init(void)
|
||||
{
|
||||
diff -Nurp linux-4.7-rc6-aufs/fs/inode.c linux-4.7-rc6-aufs-mod/fs/inode.c
|
||||
--- linux-4.7-rc6-aufs/fs/inode.c 2016-07-04 19:02:29.261286202 +0300
|
||||
+++ linux-4.7-rc6-aufs-mod/fs/inode.c 2016-07-04 20:51:39.805168596 +0300
|
||||
@@ -1600,6 +1600,7 @@ int update_time(struct inode *inode, str
|
||||
diff -Nurp linux-4.9-aufs/fs/inode.c linux-4.9-aufs-mod/fs/inode.c
|
||||
--- linux-4.9-aufs/fs/inode.c 2016-12-31 00:31:52.379789379 +0200
|
||||
+++ linux-4.9-aufs-mod/fs/inode.c 2016-12-31 00:32:35.154785422 +0200
|
||||
@@ -1651,6 +1651,7 @@ int update_time(struct inode *inode, str
|
||||
|
||||
return update_time(inode, time, flags);
|
||||
}
|
||||
@@ -107,10 +115,10 @@ diff -Nurp linux-4.7-rc6-aufs/fs/inode.c linux-4.7-rc6-aufs-mod/fs/inode.c
|
||||
|
||||
/**
|
||||
* touch_atime - update the access time
|
||||
diff -Nurp linux-4.7-rc6-aufs/fs/namespace.c linux-4.7-rc6-aufs-mod/fs/namespace.c
|
||||
--- linux-4.7-rc6-aufs/fs/namespace.c 2016-07-04 17:58:15.729773645 +0300
|
||||
+++ linux-4.7-rc6-aufs-mod/fs/namespace.c 2016-07-04 19:03:53.654714970 +0300
|
||||
@@ -463,6 +463,7 @@ void __mnt_drop_write(struct vfsmount *m
|
||||
diff -Nurp linux-4.9-aufs/fs/namespace.c linux-4.9-aufs-mod/fs/namespace.c
|
||||
--- linux-4.9-aufs/fs/namespace.c 2016-12-11 21:17:54.000000000 +0200
|
||||
+++ linux-4.9-aufs-mod/fs/namespace.c 2016-12-31 00:32:35.154785422 +0200
|
||||
@@ -466,6 +466,7 @@ void __mnt_drop_write(struct vfsmount *m
|
||||
mnt_dec_writers(real_mount(mnt));
|
||||
preempt_enable();
|
||||
}
|
||||
@@ -118,7 +126,7 @@ diff -Nurp linux-4.7-rc6-aufs/fs/namespace.c linux-4.7-rc6-aufs-mod/fs/namespace
|
||||
|
||||
/**
|
||||
* mnt_drop_write - give up write access to a mount
|
||||
@@ -1812,6 +1813,7 @@ int iterate_mounts(int (*f)(struct vfsmo
|
||||
@@ -1823,6 +1824,7 @@ int iterate_mounts(int (*f)(struct vfsmo
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
@@ -126,9 +134,9 @@ diff -Nurp linux-4.7-rc6-aufs/fs/namespace.c linux-4.7-rc6-aufs-mod/fs/namespace
|
||||
|
||||
static void cleanup_group_ids(struct mount *mnt, struct mount *end)
|
||||
{
|
||||
diff -Nurp linux-4.7-rc6-aufs/fs/notify/group.c linux-4.7-rc6-aufs-mod/fs/notify/group.c
|
||||
--- linux-4.7-rc6-aufs/fs/notify/group.c 2016-07-04 17:58:15.742773641 +0300
|
||||
+++ linux-4.7-rc6-aufs-mod/fs/notify/group.c 2016-07-04 19:03:53.655714975 +0300
|
||||
diff -Nurp linux-4.9-aufs/fs/notify/group.c linux-4.9-aufs-mod/fs/notify/group.c
|
||||
--- linux-4.9-aufs/fs/notify/group.c 2016-12-11 21:17:54.000000000 +0200
|
||||
+++ linux-4.9-aufs-mod/fs/notify/group.c 2016-12-31 00:32:35.155785422 +0200
|
||||
@@ -22,6 +22,7 @@
|
||||
#include <linux/srcu.h>
|
||||
#include <linux/rculist.h>
|
||||
@@ -137,7 +145,7 @@ diff -Nurp linux-4.7-rc6-aufs/fs/notify/group.c linux-4.7-rc6-aufs-mod/fs/notify
|
||||
|
||||
#include <linux/fsnotify_backend.h>
|
||||
#include "fsnotify.h"
|
||||
@@ -81,6 +82,7 @@ void fsnotify_get_group(struct fsnotify_
|
||||
@@ -100,6 +101,7 @@ void fsnotify_get_group(struct fsnotify_
|
||||
{
|
||||
atomic_inc(&group->refcnt);
|
||||
}
|
||||
@@ -145,7 +153,7 @@ diff -Nurp linux-4.7-rc6-aufs/fs/notify/group.c linux-4.7-rc6-aufs-mod/fs/notify
|
||||
|
||||
/*
|
||||
* Drop a reference to a group. Free it if it's through.
|
||||
@@ -90,6 +92,7 @@ void fsnotify_put_group(struct fsnotify_
|
||||
@@ -109,6 +111,7 @@ void fsnotify_put_group(struct fsnotify_
|
||||
if (atomic_dec_and_test(&group->refcnt))
|
||||
fsnotify_final_destroy_group(group);
|
||||
}
|
||||
@@ -153,7 +161,7 @@ diff -Nurp linux-4.7-rc6-aufs/fs/notify/group.c linux-4.7-rc6-aufs-mod/fs/notify
|
||||
|
||||
/*
|
||||
* Create a new fsnotify_group and hold a reference for the group returned.
|
||||
@@ -118,6 +121,7 @@ struct fsnotify_group *fsnotify_alloc_gr
|
||||
@@ -137,6 +140,7 @@ struct fsnotify_group *fsnotify_alloc_gr
|
||||
|
||||
return group;
|
||||
}
|
||||
@@ -161,9 +169,9 @@ diff -Nurp linux-4.7-rc6-aufs/fs/notify/group.c linux-4.7-rc6-aufs-mod/fs/notify
|
||||
|
||||
int fsnotify_fasync(int fd, struct file *file, int on)
|
||||
{
|
||||
diff -Nurp linux-4.7-rc6-aufs/fs/notify/mark.c linux-4.7-rc6-aufs-mod/fs/notify/mark.c
|
||||
--- linux-4.7-rc6-aufs/fs/notify/mark.c 2016-07-04 17:58:15.742773641 +0300
|
||||
+++ linux-4.7-rc6-aufs-mod/fs/notify/mark.c 2016-07-04 19:03:53.655714975 +0300
|
||||
diff -Nurp linux-4.9-aufs/fs/notify/mark.c linux-4.9-aufs-mod/fs/notify/mark.c
|
||||
--- linux-4.9-aufs/fs/notify/mark.c 2016-12-11 21:17:54.000000000 +0200
|
||||
+++ linux-4.9-aufs-mod/fs/notify/mark.c 2016-12-31 00:32:35.155785422 +0200
|
||||
@@ -113,6 +113,7 @@ void fsnotify_put_mark(struct fsnotify_m
|
||||
mark->free_mark(mark);
|
||||
}
|
||||
@@ -196,9 +204,9 @@ diff -Nurp linux-4.7-rc6-aufs/fs/notify/mark.c linux-4.7-rc6-aufs-mod/fs/notify/
|
||||
|
||||
/*
|
||||
* Nothing fancy, just initialize lists and locks and counters.
|
||||
diff -Nurp linux-4.7-rc6-aufs/fs/open.c linux-4.7-rc6-aufs-mod/fs/open.c
|
||||
--- linux-4.7-rc6-aufs/fs/open.c 2016-07-04 17:58:15.746773640 +0300
|
||||
+++ linux-4.7-rc6-aufs-mod/fs/open.c 2016-07-04 19:03:53.655714975 +0300
|
||||
diff -Nurp linux-4.9-aufs/fs/open.c linux-4.9-aufs-mod/fs/open.c
|
||||
--- linux-4.9-aufs/fs/open.c 2016-12-11 21:17:54.000000000 +0200
|
||||
+++ linux-4.9-aufs-mod/fs/open.c 2016-12-31 00:32:35.155785422 +0200
|
||||
@@ -64,6 +64,7 @@ int do_truncate(struct dentry *dentry, l
|
||||
inode_unlock(dentry->d_inode);
|
||||
return ret;
|
||||
@@ -207,7 +215,7 @@ diff -Nurp linux-4.7-rc6-aufs/fs/open.c linux-4.7-rc6-aufs-mod/fs/open.c
|
||||
|
||||
long vfs_truncate(const struct path *path, loff_t length)
|
||||
{
|
||||
@@ -678,6 +679,7 @@ int open_check_o_direct(struct file *f)
|
||||
@@ -695,6 +696,7 @@ int open_check_o_direct(struct file *f)
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
@@ -215,9 +223,9 @@ diff -Nurp linux-4.7-rc6-aufs/fs/open.c linux-4.7-rc6-aufs-mod/fs/open.c
|
||||
|
||||
static int do_dentry_open(struct file *f,
|
||||
struct inode *inode,
|
||||
diff -Nurp linux-4.7-rc6-aufs/fs/read_write.c linux-4.7-rc6-aufs-mod/fs/read_write.c
|
||||
--- linux-4.7-rc6-aufs/fs/read_write.c 2016-07-04 19:02:29.262286207 +0300
|
||||
+++ linux-4.7-rc6-aufs-mod/fs/read_write.c 2016-07-04 19:03:53.655714975 +0300
|
||||
diff -Nurp linux-4.9-aufs/fs/read_write.c linux-4.9-aufs-mod/fs/read_write.c
|
||||
--- linux-4.9-aufs/fs/read_write.c 2016-12-31 00:31:52.380789379 +0200
|
||||
+++ linux-4.9-aufs-mod/fs/read_write.c 2016-12-31 00:32:35.155785422 +0200
|
||||
@@ -525,6 +525,7 @@ vfs_readf_t vfs_readf(struct file *file)
|
||||
return new_sync_read;
|
||||
return ERR_PTR(-ENOSYS);
|
||||
@@ -234,10 +242,10 @@ diff -Nurp linux-4.7-rc6-aufs/fs/read_write.c linux-4.7-rc6-aufs-mod/fs/read_wri
|
||||
|
||||
ssize_t __kernel_write(struct file *file, const char *buf, size_t count, loff_t *pos)
|
||||
{
|
||||
diff -Nurp linux-4.7-rc6-aufs/fs/splice.c linux-4.7-rc6-aufs-mod/fs/splice.c
|
||||
--- linux-4.7-rc6-aufs/fs/splice.c 2016-07-04 19:02:29.262286207 +0300
|
||||
+++ linux-4.7-rc6-aufs-mod/fs/splice.c 2016-07-04 19:03:53.656714979 +0300
|
||||
@@ -1124,6 +1124,7 @@ long do_splice_from(struct pipe_inode_in
|
||||
diff -Nurp linux-4.9-aufs/fs/splice.c linux-4.9-aufs-mod/fs/splice.c
|
||||
--- linux-4.9-aufs/fs/splice.c 2016-12-31 00:31:52.380789379 +0200
|
||||
+++ linux-4.9-aufs-mod/fs/splice.c 2016-12-31 00:32:35.156785422 +0200
|
||||
@@ -868,6 +868,7 @@ long do_splice_from(struct pipe_inode_in
|
||||
|
||||
return splice_write(pipe, out, ppos, len, flags);
|
||||
}
|
||||
@@ -245,7 +253,7 @@ diff -Nurp linux-4.7-rc6-aufs/fs/splice.c linux-4.7-rc6-aufs-mod/fs/splice.c
|
||||
|
||||
/*
|
||||
* Attempt to initiate a splice from a file to a pipe.
|
||||
@@ -1153,6 +1154,7 @@ long do_splice_to(struct file *in, loff_
|
||||
@@ -897,6 +898,7 @@ long do_splice_to(struct file *in, loff_
|
||||
|
||||
return splice_read(in, ppos, pipe, len, flags);
|
||||
}
|
||||
@@ -253,29 +261,29 @@ diff -Nurp linux-4.7-rc6-aufs/fs/splice.c linux-4.7-rc6-aufs-mod/fs/splice.c
|
||||
|
||||
/**
|
||||
* splice_direct_to_actor - splices data directly between two non-pipes
|
||||
diff -Nurp linux-4.7-rc6-aufs/fs/xattr.c linux-4.7-rc6-aufs-mod/fs/xattr.c
|
||||
--- linux-4.7-rc6-aufs/fs/xattr.c 2016-07-04 17:58:15.754773638 +0300
|
||||
+++ linux-4.7-rc6-aufs-mod/fs/xattr.c 2016-07-04 19:03:53.656714979 +0300
|
||||
@@ -207,6 +207,7 @@ vfs_getxattr_alloc(struct dentry *dentry
|
||||
diff -Nurp linux-4.9-aufs/fs/xattr.c linux-4.9-aufs-mod/fs/xattr.c
|
||||
--- linux-4.9-aufs/fs/xattr.c 2016-12-11 21:17:54.000000000 +0200
|
||||
+++ linux-4.9-aufs-mod/fs/xattr.c 2016-12-31 00:32:35.156785422 +0200
|
||||
@@ -296,6 +296,7 @@ vfs_getxattr_alloc(struct dentry *dentry
|
||||
*xattr_value = value;
|
||||
return error;
|
||||
}
|
||||
+EXPORT_SYMBOL_GPL(vfs_getxattr_alloc);
|
||||
|
||||
ssize_t
|
||||
vfs_getxattr(struct dentry *dentry, const char *name, void *value, size_t size)
|
||||
diff -Nurp linux-4.7-rc6-aufs/kernel/task_work.c linux-4.7-rc6-aufs-mod/kernel/task_work.c
|
||||
--- linux-4.7-rc6-aufs/kernel/task_work.c 2016-05-16 01:43:13.000000000 +0300
|
||||
+++ linux-4.7-rc6-aufs-mod/kernel/task_work.c 2016-07-04 19:03:53.656714979 +0300
|
||||
@@ -118,3 +118,4 @@ void task_work_run(void)
|
||||
__vfs_getxattr(struct dentry *dentry, struct inode *inode, const char *name,
|
||||
diff -Nurp linux-4.9-aufs/kernel/task_work.c linux-4.9-aufs-mod/kernel/task_work.c
|
||||
--- linux-4.9-aufs/kernel/task_work.c 2016-12-11 21:17:54.000000000 +0200
|
||||
+++ linux-4.9-aufs-mod/kernel/task_work.c 2016-12-31 00:32:35.156785422 +0200
|
||||
@@ -119,3 +119,4 @@ void task_work_run(void)
|
||||
} while (work);
|
||||
}
|
||||
}
|
||||
+EXPORT_SYMBOL_GPL(task_work_run);
|
||||
diff -Nurp linux-4.7-rc6-aufs/security/commoncap.c linux-4.7-rc6-aufs-mod/security/commoncap.c
|
||||
--- linux-4.7-rc6-aufs/security/commoncap.c 2016-07-04 17:58:15.945773585 +0300
|
||||
+++ linux-4.7-rc6-aufs-mod/security/commoncap.c 2016-07-04 19:03:53.656714979 +0300
|
||||
@@ -1058,12 +1058,14 @@ int cap_mmap_addr(unsigned long addr)
|
||||
diff -Nurp linux-4.9-aufs/security/commoncap.c linux-4.9-aufs-mod/security/commoncap.c
|
||||
--- linux-4.9-aufs/security/commoncap.c 2016-12-11 21:17:54.000000000 +0200
|
||||
+++ linux-4.9-aufs-mod/security/commoncap.c 2016-12-31 00:32:35.156785422 +0200
|
||||
@@ -1061,12 +1061,14 @@ int cap_mmap_addr(unsigned long addr)
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
@@ -290,9 +298,9 @@ diff -Nurp linux-4.7-rc6-aufs/security/commoncap.c linux-4.7-rc6-aufs-mod/securi
|
||||
|
||||
#ifdef CONFIG_SECURITY
|
||||
|
||||
diff -Nurp linux-4.7-rc6-aufs/security/device_cgroup.c linux-4.7-rc6-aufs-mod/security/device_cgroup.c
|
||||
--- linux-4.7-rc6-aufs/security/device_cgroup.c 2016-05-16 01:43:13.000000000 +0300
|
||||
+++ linux-4.7-rc6-aufs-mod/security/device_cgroup.c 2016-07-04 19:03:53.656714979 +0300
|
||||
diff -Nurp linux-4.9-aufs/security/device_cgroup.c linux-4.9-aufs-mod/security/device_cgroup.c
|
||||
--- linux-4.9-aufs/security/device_cgroup.c 2016-12-11 21:17:54.000000000 +0200
|
||||
+++ linux-4.9-aufs-mod/security/device_cgroup.c 2016-12-31 00:32:35.156785422 +0200
|
||||
@@ -7,6 +7,7 @@
|
||||
#include <linux/device_cgroup.h>
|
||||
#include <linux/cgroup.h>
|
||||
@@ -309,10 +317,10 @@ diff -Nurp linux-4.7-rc6-aufs/security/device_cgroup.c linux-4.7-rc6-aufs-mod/se
|
||||
|
||||
int devcgroup_inode_mknod(int mode, dev_t dev)
|
||||
{
|
||||
diff -Nurp linux-4.7-rc6-aufs/security/security.c linux-4.7-rc6-aufs-mod/security/security.c
|
||||
--- linux-4.7-rc6-aufs/security/security.c 2016-07-04 17:58:15.948773584 +0300
|
||||
+++ linux-4.7-rc6-aufs-mod/security/security.c 2016-07-04 19:03:53.657714984 +0300
|
||||
@@ -434,6 +434,7 @@ int security_path_rmdir(const struct pat
|
||||
diff -Nurp linux-4.9-aufs/security/security.c linux-4.9-aufs-mod/security/security.c
|
||||
--- linux-4.9-aufs/security/security.c 2016-12-11 21:17:54.000000000 +0200
|
||||
+++ linux-4.9-aufs-mod/security/security.c 2016-12-31 00:32:35.157785422 +0200
|
||||
@@ -443,6 +443,7 @@ int security_path_rmdir(const struct pat
|
||||
return 0;
|
||||
return call_int_hook(path_rmdir, 0, dir, dentry);
|
||||
}
|
||||
@@ -320,7 +328,7 @@ diff -Nurp linux-4.7-rc6-aufs/security/security.c linux-4.7-rc6-aufs-mod/securit
|
||||
|
||||
int security_path_unlink(const struct path *dir, struct dentry *dentry)
|
||||
{
|
||||
@@ -450,6 +451,7 @@ int security_path_symlink(const struct p
|
||||
@@ -459,6 +460,7 @@ int security_path_symlink(const struct p
|
||||
return 0;
|
||||
return call_int_hook(path_symlink, 0, dir, dentry, old_name);
|
||||
}
|
||||
@@ -328,7 +336,7 @@ diff -Nurp linux-4.7-rc6-aufs/security/security.c linux-4.7-rc6-aufs-mod/securit
|
||||
|
||||
int security_path_link(struct dentry *old_dentry, const struct path *new_dir,
|
||||
struct dentry *new_dentry)
|
||||
@@ -458,6 +460,7 @@ int security_path_link(struct dentry *ol
|
||||
@@ -467,6 +469,7 @@ int security_path_link(struct dentry *ol
|
||||
return 0;
|
||||
return call_int_hook(path_link, 0, old_dentry, new_dir, new_dentry);
|
||||
}
|
||||
@@ -336,7 +344,7 @@ diff -Nurp linux-4.7-rc6-aufs/security/security.c linux-4.7-rc6-aufs-mod/securit
|
||||
|
||||
int security_path_rename(const struct path *old_dir, struct dentry *old_dentry,
|
||||
const struct path *new_dir, struct dentry *new_dentry,
|
||||
@@ -485,6 +488,7 @@ int security_path_truncate(const struct
|
||||
@@ -494,6 +497,7 @@ int security_path_truncate(const struct
|
||||
return 0;
|
||||
return call_int_hook(path_truncate, 0, path);
|
||||
}
|
||||
@@ -344,7 +352,7 @@ diff -Nurp linux-4.7-rc6-aufs/security/security.c linux-4.7-rc6-aufs-mod/securit
|
||||
|
||||
int security_path_chmod(const struct path *path, umode_t mode)
|
||||
{
|
||||
@@ -492,6 +496,7 @@ int security_path_chmod(const struct pat
|
||||
@@ -501,6 +505,7 @@ int security_path_chmod(const struct pat
|
||||
return 0;
|
||||
return call_int_hook(path_chmod, 0, path, mode);
|
||||
}
|
||||
@@ -352,7 +360,7 @@ diff -Nurp linux-4.7-rc6-aufs/security/security.c linux-4.7-rc6-aufs-mod/securit
|
||||
|
||||
int security_path_chown(const struct path *path, kuid_t uid, kgid_t gid)
|
||||
{
|
||||
@@ -499,6 +504,7 @@ int security_path_chown(const struct pat
|
||||
@@ -508,6 +513,7 @@ int security_path_chown(const struct pat
|
||||
return 0;
|
||||
return call_int_hook(path_chown, 0, path, uid, gid);
|
||||
}
|
||||
@@ -360,7 +368,7 @@ diff -Nurp linux-4.7-rc6-aufs/security/security.c linux-4.7-rc6-aufs-mod/securit
|
||||
|
||||
int security_path_chroot(const struct path *path)
|
||||
{
|
||||
@@ -584,6 +590,7 @@ int security_inode_readlink(struct dentr
|
||||
@@ -593,6 +599,7 @@ int security_inode_readlink(struct dentr
|
||||
return 0;
|
||||
return call_int_hook(inode_readlink, 0, dentry);
|
||||
}
|
||||
@@ -368,7 +376,7 @@ diff -Nurp linux-4.7-rc6-aufs/security/security.c linux-4.7-rc6-aufs-mod/securit
|
||||
|
||||
int security_inode_follow_link(struct dentry *dentry, struct inode *inode,
|
||||
bool rcu)
|
||||
@@ -599,6 +606,7 @@ int security_inode_permission(struct ino
|
||||
@@ -608,6 +615,7 @@ int security_inode_permission(struct ino
|
||||
return 0;
|
||||
return call_int_hook(inode_permission, 0, inode, mask);
|
||||
}
|
||||
@@ -376,7 +384,7 @@ diff -Nurp linux-4.7-rc6-aufs/security/security.c linux-4.7-rc6-aufs-mod/securit
|
||||
|
||||
int security_inode_setattr(struct dentry *dentry, struct iattr *attr)
|
||||
{
|
||||
@@ -737,6 +745,7 @@ int security_file_permission(struct file
|
||||
@@ -779,6 +787,7 @@ int security_file_permission(struct file
|
||||
|
||||
return fsnotify_perm(file, mask);
|
||||
}
|
||||
@@ -384,7 +392,7 @@ diff -Nurp linux-4.7-rc6-aufs/security/security.c linux-4.7-rc6-aufs-mod/securit
|
||||
|
||||
int security_file_alloc(struct file *file)
|
||||
{
|
||||
@@ -796,6 +805,7 @@ int security_mmap_file(struct file *file
|
||||
@@ -838,6 +847,7 @@ int security_mmap_file(struct file *file
|
||||
return ret;
|
||||
return ima_file_mmap(file, prot);
|
||||
}
|
||||
+1314
-821
File diff suppressed because it is too large
Load Diff
-45
@@ -1,45 +0,0 @@
|
||||
From 6a7fd522a7c94cdef0a3b08acf8e6702056e635c Mon Sep 17 00:00:00 2001
|
||||
From: Vegard Nossum <vegard.nossum@oracle.com>
|
||||
Date: Mon, 4 Jul 2016 11:03:00 -0400
|
||||
Subject: [PATCH] ext4: don't call ext4_should_journal_data() on the journal
|
||||
inode
|
||||
|
||||
If ext4_fill_super() fails early, it's possible for ext4_evict_inode()
|
||||
to call ext4_should_journal_data() before superblock options and flags
|
||||
are fully set up. In that case, the iput() on the journal inode can
|
||||
end up causing a BUG().
|
||||
|
||||
Work around this problem by reordering the tests so we only call
|
||||
ext4_should_journal_data() after we know it's not the journal inode.
|
||||
|
||||
Fixes: 2d859db3e4 ("ext4: fix data corruption in inodes with journalled data")
|
||||
Fixes: 2b405bfa84 ("ext4: fix data=journal fast mount/umount hang")
|
||||
Cc: Jan Kara <jack@suse.cz>
|
||||
Cc: stable@vger.kernel.org
|
||||
Signed-off-by: Vegard Nossum <vegard.nossum@oracle.com>
|
||||
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
|
||||
Reviewed-by: Jan Kara <jack@suse.cz>
|
||||
---
|
||||
fs/ext4/inode.c | 6 +++---
|
||||
1 file changed, 3 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c
|
||||
index 321a31c..ea39d19 100644
|
||||
--- a/fs/ext4/inode.c
|
||||
+++ b/fs/ext4/inode.c
|
||||
@@ -211,9 +211,9 @@ void ext4_evict_inode(struct inode *inode)
|
||||
* Note that directories do not have this problem because they
|
||||
* don't use page cache.
|
||||
*/
|
||||
- if (ext4_should_journal_data(inode) &&
|
||||
- (S_ISLNK(inode->i_mode) || S_ISREG(inode->i_mode)) &&
|
||||
- inode->i_ino != EXT4_JOURNAL_INO) {
|
||||
+ if (inode->i_ino != EXT4_JOURNAL_INO &&
|
||||
+ ext4_should_journal_data(inode) &&
|
||||
+ (S_ISLNK(inode->i_mode) || S_ISREG(inode->i_mode))) {
|
||||
journal_t *journal = EXT4_SB(inode->i_sb)->s_journal;
|
||||
tid_t commit_tid = EXT4_I(inode)->i_datasync_tid;
|
||||
|
||||
--
|
||||
2.9.2
|
||||
|
||||
-78
@@ -1,78 +0,0 @@
|
||||
From 646caa9c8e196880b41cd3e3d33a2ebc752bdb85 Mon Sep 17 00:00:00 2001
|
||||
From: Jan Kara <jack@suse.cz>
|
||||
Date: Mon, 4 Jul 2016 10:14:01 -0400
|
||||
Subject: [PATCH] ext4: fix deadlock during page writeback
|
||||
|
||||
Commit 06bd3c36a733 (ext4: fix data exposure after a crash) uncovered a
|
||||
deadlock in ext4_writepages() which was previously much harder to hit.
|
||||
After this commit xfstest generic/130 reproduces the deadlock on small
|
||||
filesystems.
|
||||
|
||||
The problem happens when ext4_do_update_inode() sets LARGE_FILE feature
|
||||
and marks current inode handle as synchronous. That subsequently results
|
||||
in ext4_journal_stop() called from ext4_writepages() to block waiting for
|
||||
transaction commit while still holding page locks, reference to io_end,
|
||||
and some prepared bio in mpd structure each of which can possibly block
|
||||
transaction commit from completing and thus results in deadlock.
|
||||
|
||||
Fix the problem by releasing page locks, io_end reference, and
|
||||
submitting prepared bio before calling ext4_journal_stop().
|
||||
|
||||
[ Changed to defer the call to ext4_journal_stop() only if the handle
|
||||
is synchronous. --tytso ]
|
||||
|
||||
Reported-and-tested-by: Eryu Guan <eguan@redhat.com>
|
||||
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
|
||||
CC: stable@vger.kernel.org
|
||||
Signed-off-by: Jan Kara <jack@suse.cz>
|
||||
---
|
||||
fs/ext4/inode.c | 29 ++++++++++++++++++++++++++---
|
||||
1 file changed, 26 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c
|
||||
index 44ee5d9..321a31c 100644
|
||||
--- a/fs/ext4/inode.c
|
||||
+++ b/fs/ext4/inode.c
|
||||
@@ -2754,13 +2754,36 @@ retry:
|
||||
done = true;
|
||||
}
|
||||
}
|
||||
- ext4_journal_stop(handle);
|
||||
+ /*
|
||||
+ * Caution: If the handle is synchronous,
|
||||
+ * ext4_journal_stop() can wait for transaction commit
|
||||
+ * to finish which may depend on writeback of pages to
|
||||
+ * complete or on page lock to be released. In that
|
||||
+ * case, we have to wait until after after we have
|
||||
+ * submitted all the IO, released page locks we hold,
|
||||
+ * and dropped io_end reference (for extent conversion
|
||||
+ * to be able to complete) before stopping the handle.
|
||||
+ */
|
||||
+ if (!ext4_handle_valid(handle) || handle->h_sync == 0) {
|
||||
+ ext4_journal_stop(handle);
|
||||
+ handle = NULL;
|
||||
+ }
|
||||
/* Submit prepared bio */
|
||||
ext4_io_submit(&mpd.io_submit);
|
||||
/* Unlock pages we didn't use */
|
||||
mpage_release_unused_pages(&mpd, give_up_on_write);
|
||||
- /* Drop our io_end reference we got from init */
|
||||
- ext4_put_io_end(mpd.io_submit.io_end);
|
||||
+ /*
|
||||
+ * Drop our io_end reference we got from init. We have
|
||||
+ * to be careful and use deferred io_end finishing if
|
||||
+ * we are still holding the transaction as we can
|
||||
+ * release the last reference to io_end which may end
|
||||
+ * up doing unwritten extent conversion.
|
||||
+ */
|
||||
+ if (handle) {
|
||||
+ ext4_put_io_end_defer(mpd.io_submit.io_end);
|
||||
+ ext4_journal_stop(handle);
|
||||
+ } else
|
||||
+ ext4_put_io_end(mpd.io_submit.io_end);
|
||||
|
||||
if (ret == -ENOSPC && sbi->s_journal) {
|
||||
/*
|
||||
--
|
||||
2.9.2
|
||||
|
||||
+39
@@ -0,0 +1,39 @@
|
||||
From: Jan Kara <jack@suse.cz>
|
||||
Subject: [PATCH] jbd2: Fix dbench4 performance regression for 'nobarrier' mounts
|
||||
Date: Fri, 28 Apr 2017 11:59:34 +0200
|
||||
|
||||
Commit b685d3d65ac7 "block: treat REQ_FUA and REQ_PREFLUSH as
|
||||
synchronous" removed REQ_SYNC flag from WRITE_FUA implementation. Since
|
||||
JBD2 strips REQ_FUA and REQ_FLUSH flags from submitted IO when the
|
||||
filesystem is mounted with nobarrier mount option, journal superblock
|
||||
writes ended up being async writes after this patch and that caused
|
||||
heavy performance regression for dbench4 benchmark with high number of
|
||||
processes. In my test setup with HP RAID array with non-volatile write
|
||||
cache and 32 GB ram, dbench4 runs with 8 processes regressed by ~25%.
|
||||
|
||||
Fix the problem by making sure journal superblock writes are always
|
||||
treated as synchronous since they generally block progress of the
|
||||
journalling machinery and thus the whole filesystem.
|
||||
|
||||
Fixes: b685d3d65ac791406e0dfd8779cc9b3707fea5a3
|
||||
CC: stable@vger.kernel.org
|
||||
Signed-off-by: Jan Kara <jack@suse.cz>
|
||||
---
|
||||
fs/jbd2/journal.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/fs/jbd2/journal.c b/fs/jbd2/journal.c
|
||||
index 5adc2fb62b0f..e768126f6a72 100644
|
||||
--- a/fs/jbd2/journal.c
|
||||
+++ b/fs/jbd2/journal.c
|
||||
@@ -1348,7 +1348,7 @@ static int jbd2_write_superblock(journal_t *journal, int write_flags)
|
||||
jbd2_superblock_csum_set(journal, sb);
|
||||
get_bh(bh);
|
||||
bh->b_end_io = end_buffer_write_sync;
|
||||
- ret = submit_bh(REQ_OP_WRITE, write_flags, bh);
|
||||
+ ret = submit_bh(REQ_OP_WRITE, write_flags | REQ_SYNC, bh);
|
||||
wait_on_buffer(bh);
|
||||
if (buffer_write_io_error(bh)) {
|
||||
clear_buffer_write_io_error(bh);
|
||||
--
|
||||
2.12.0
|
||||
+44
@@ -0,0 +1,44 @@
|
||||
From e522751d605d99a81508e58390a8f51ee96fb662 Mon Sep 17 00:00:00 2001
|
||||
From: Tomasz Majchrzak <tomasz.majchrzak@intel.com>
|
||||
Date: Tue, 29 Nov 2016 15:18:20 +0100
|
||||
Subject: [PATCH] seq_file: reset iterator to first record for zero offset
|
||||
|
||||
If kernfs file is empty on a first read, successive read operations
|
||||
using the same file descriptor will return no data, even when data is
|
||||
available. Default kernfs 'seq_next' implementation advances iterator
|
||||
position even when next object is not there. Kernfs 'seq_start' for
|
||||
following requests will not return iterator as position is already on
|
||||
the second object.
|
||||
|
||||
This defect doesn't allow to monitor badblocks sysfs files from MD raid.
|
||||
They are initially empty but if data appears at some stage, userspace is
|
||||
not able to read it.
|
||||
|
||||
Signed-off-by: Tomasz Majchrzak <tomasz.majchrzak@intel.com>
|
||||
Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
|
||||
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
|
||||
---
|
||||
fs/seq_file.c | 7 +++++++
|
||||
1 file changed, 7 insertions(+)
|
||||
|
||||
diff --git a/fs/seq_file.c b/fs/seq_file.c
|
||||
index 368bfb9..a11f271 100644
|
||||
--- a/fs/seq_file.c
|
||||
+++ b/fs/seq_file.c
|
||||
@@ -190,6 +190,13 @@ ssize_t seq_read(struct file *file, char __user *buf, size_t size, loff_t *ppos)
|
||||
*/
|
||||
m->version = file->f_version;
|
||||
|
||||
+ /*
|
||||
+ * if request is to read from zero offset, reset iterator to first
|
||||
+ * record as it might have been already advanced by previous requests
|
||||
+ */
|
||||
+ if (*ppos == 0)
|
||||
+ m->index = 0;
|
||||
+
|
||||
/* Don't assume *ppos is where we left it */
|
||||
if (unlikely(*ppos != m->read_pos)) {
|
||||
while ((err = traverse(m, *ppos)) == -EAGAIN)
|
||||
--
|
||||
2.10.2
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
From cf8c73afb3abf0f8905efbaddd4ce11a0deec9da Mon Sep 17 00:00:00 2001
|
||||
From: Evan Quan <evan.quan@amd.com>
|
||||
Date: Fri, 17 Mar 2017 10:22:51 +0800
|
||||
Subject: [PATCH] drm/amd/amdgpu: add POLARIS12 PCI ID
|
||||
|
||||
Signed-off-by: Evan Quan <evan.quan@amd.com>
|
||||
Reviewed-by: Junwei Zhang <Jerry.Zhang@amd.com>
|
||||
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
|
||||
Cc: stable@vger.kernel.org
|
||||
---
|
||||
drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
|
||||
index f7adbac..b76cd69 100644
|
||||
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
|
||||
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
|
||||
@@ -421,6 +421,7 @@ static const struct pci_device_id pciidlist[] = {
|
||||
{0x1002, 0x6985, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_POLARIS12},
|
||||
{0x1002, 0x6986, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_POLARIS12},
|
||||
{0x1002, 0x6987, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_POLARIS12},
|
||||
+ {0x1002, 0x6995, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_POLARIS12},
|
||||
{0x1002, 0x699F, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_POLARIS12},
|
||||
|
||||
{0, 0, 0}
|
||||
--
|
||||
2.10.2
|
||||
|
||||
@@ -0,0 +1,38 @@
|
||||
From fc8e9c54699e42754094ff475da46440778d8f19 Mon Sep 17 00:00:00 2001
|
||||
From: Junwei Zhang <Jerry.Zhang@amd.com>
|
||||
Date: Thu, 4 Aug 2016 12:54:22 +0800
|
||||
Subject: [PATCH] drm/amd/amdgpu: add Polaris12 PCI ID
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Signed-off-by: Junwei Zhang <Jerry.Zhang@amd.com>
|
||||
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
|
||||
Reviewed-by: Christian König <christian.koenig@amd.com>
|
||||
Reviewed-by: Ken Wang <Qingqing.Wang@amd.com>
|
||||
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
|
||||
---
|
||||
drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 7 +++++++
|
||||
1 file changed, 7 insertions(+)
|
||||
|
||||
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
|
||||
index 8cb937b..2534ada 100644
|
||||
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
|
||||
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
|
||||
@@ -418,6 +418,13 @@ static const struct pci_device_id pciidlist[] = {
|
||||
{0x1002, 0x67CA, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_POLARIS10},
|
||||
{0x1002, 0x67CC, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_POLARIS10},
|
||||
{0x1002, 0x67CF, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_POLARIS10},
|
||||
+ /* Polaris12 */
|
||||
+ {0x1002, 0x6980, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_POLARIS12},
|
||||
+ {0x1002, 0x6981, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_POLARIS12},
|
||||
+ {0x1002, 0x6985, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_POLARIS12},
|
||||
+ {0x1002, 0x6986, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_POLARIS12},
|
||||
+ {0x1002, 0x6987, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_POLARIS12},
|
||||
+ {0x1002, 0x699F, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_POLARIS12},
|
||||
|
||||
{0, 0, 0}
|
||||
};
|
||||
--
|
||||
2.10.2
|
||||
|
||||
+469
@@ -0,0 +1,469 @@
|
||||
From c4642a479fac9f5c224ff7425d86c427b94011af Mon Sep 17 00:00:00 2001
|
||||
From: Junwei Zhang <Jerry.Zhang@amd.com>
|
||||
Date: Wed, 14 Dec 2016 15:32:28 -0500
|
||||
Subject: [PATCH] drm/amd/amdgpu: add Polaris12 support (v3)
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
v2: agd: squash in various fixes
|
||||
v3: agd: squash in:
|
||||
drm/amdgpu: remove unnecessary smc sk firmware for polaris12
|
||||
|
||||
Signed-off-by: Junwei Zhang <Jerry.Zhang@amd.com>
|
||||
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
|
||||
Reviewed-by: Christian König <christian.koenig@amd.com>
|
||||
Reviewed-by: Ken Wang <Qingqing.Wang@amd.com>
|
||||
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
|
||||
[ rebased for 4.9 / tmb ]
|
||||
Signed-off-by: Thomas Backlund <tmb@mageia.org>
|
||||
---
|
||||
drivers/gpu/drm/amd/amdgpu/amdgpu_cgs.c | 3 +++
|
||||
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 2 ++
|
||||
drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c | 5 +++++
|
||||
drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c | 5 +++++
|
||||
drivers/gpu/drm/amd/amdgpu/dce_v11_0.c | 13 ++++++++++---
|
||||
drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 31 +++++++++++++++++++++++++-----
|
||||
drivers/gpu/drm/amd/amdgpu/gmc_v8_0.c | 5 +++++
|
||||
drivers/gpu/drm/amd/amdgpu/sdma_v3_0.c | 6 ++++++
|
||||
drivers/gpu/drm/amd/amdgpu/vce_v3_0.c | 5 +++--
|
||||
drivers/gpu/drm/amd/amdgpu/vi.c | 10 ++++++++++
|
||||
drivers/gpu/drm/amd/include/amd_shared.h | 1 +
|
||||
11 files changed, 76 insertions(+), 10 deletions(-)
|
||||
|
||||
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_cgs.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_cgs.c
|
||||
index 9ada56c..4c851fde 100644
|
||||
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_cgs.c
|
||||
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_cgs.c
|
||||
@@ -840,6 +840,9 @@ static int amdgpu_cgs_get_firmware_info(struct cgs_device *cgs_device,
|
||||
else if (type == CGS_UCODE_ID_SMU_SK)
|
||||
strcpy(fw_name, "amdgpu/polaris10_smc_sk.bin");
|
||||
break;
|
||||
+ case CHIP_POLARIS12:
|
||||
+ strcpy(fw_name, "amdgpu/polaris12_smc.bin");
|
||||
+ break;
|
||||
default:
|
||||
DRM_ERROR("SMC firmware not supported\n");
|
||||
return -EINVAL;
|
||||
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
|
||||
index 60bd4af..fe3bb94 100644
|
||||
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
|
||||
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
|
||||
@@ -73,6 +73,7 @@ static const char *amdgpu_asic_name[] = {
|
||||
"STONEY",
|
||||
"POLARIS10",
|
||||
"POLARIS11",
|
||||
+ "POLARIS12",
|
||||
"LAST",
|
||||
};
|
||||
|
||||
@@ -1277,6 +1278,7 @@ static int amdgpu_early_init(struct amdgpu_device *adev)
|
||||
case CHIP_FIJI:
|
||||
case CHIP_POLARIS11:
|
||||
case CHIP_POLARIS10:
|
||||
+ case CHIP_POLARIS12:
|
||||
case CHIP_CARRIZO:
|
||||
case CHIP_STONEY:
|
||||
if (adev->asic_type == CHIP_CARRIZO || adev->asic_type == CHIP_STONEY)
|
||||
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c
|
||||
index a81dfae..1d564be 100644
|
||||
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c
|
||||
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c
|
||||
@@ -65,6 +65,7 @@
|
||||
#define FIRMWARE_STONEY "amdgpu/stoney_uvd.bin"
|
||||
#define FIRMWARE_POLARIS10 "amdgpu/polaris10_uvd.bin"
|
||||
#define FIRMWARE_POLARIS11 "amdgpu/polaris11_uvd.bin"
|
||||
+#define FIRMWARE_POLARIS12 "amdgpu/polaris12_uvd.bin"
|
||||
|
||||
/**
|
||||
* amdgpu_uvd_cs_ctx - Command submission parser context
|
||||
@@ -98,6 +99,7 @@ MODULE_FIRMWARE(FIRMWARE_FIJI);
|
||||
MODULE_FIRMWARE(FIRMWARE_STONEY);
|
||||
MODULE_FIRMWARE(FIRMWARE_POLARIS10);
|
||||
MODULE_FIRMWARE(FIRMWARE_POLARIS11);
|
||||
+MODULE_FIRMWARE(FIRMWARE_POLARIS12);
|
||||
|
||||
static void amdgpu_uvd_idle_work_handler(struct work_struct *work);
|
||||
|
||||
@@ -149,6 +151,9 @@ int amdgpu_uvd_sw_init(struct amdgpu_device *adev)
|
||||
case CHIP_POLARIS11:
|
||||
fw_name = FIRMWARE_POLARIS11;
|
||||
break;
|
||||
+ case CHIP_POLARIS12:
|
||||
+ fw_name = FIRMWARE_POLARIS12;
|
||||
+ break;
|
||||
default:
|
||||
return -EINVAL;
|
||||
}
|
||||
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c
|
||||
index 69b66b9..8fec802 100644
|
||||
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c
|
||||
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c
|
||||
@@ -52,6 +52,7 @@
|
||||
#define FIRMWARE_STONEY "amdgpu/stoney_vce.bin"
|
||||
#define FIRMWARE_POLARIS10 "amdgpu/polaris10_vce.bin"
|
||||
#define FIRMWARE_POLARIS11 "amdgpu/polaris11_vce.bin"
|
||||
+#define FIRMWARE_POLARIS12 "amdgpu/polaris12_vce.bin"
|
||||
|
||||
#ifdef CONFIG_DRM_AMDGPU_CIK
|
||||
MODULE_FIRMWARE(FIRMWARE_BONAIRE);
|
||||
@@ -66,6 +67,7 @@ MODULE_FIRMWARE(FIRMWARE_FIJI);
|
||||
MODULE_FIRMWARE(FIRMWARE_STONEY);
|
||||
MODULE_FIRMWARE(FIRMWARE_POLARIS10);
|
||||
MODULE_FIRMWARE(FIRMWARE_POLARIS11);
|
||||
+MODULE_FIRMWARE(FIRMWARE_POLARIS12);
|
||||
|
||||
static void amdgpu_vce_idle_work_handler(struct work_struct *work);
|
||||
|
||||
@@ -121,6 +123,9 @@ int amdgpu_vce_sw_init(struct amdgpu_device *adev, unsigned long size)
|
||||
case CHIP_POLARIS11:
|
||||
fw_name = FIRMWARE_POLARIS11;
|
||||
break;
|
||||
+ case CHIP_POLARIS12:
|
||||
+ fw_name = FIRMWARE_POLARIS12;
|
||||
+ break;
|
||||
|
||||
default:
|
||||
return -EINVAL;
|
||||
diff --git a/drivers/gpu/drm/amd/amdgpu/dce_v11_0.c b/drivers/gpu/drm/amd/amdgpu/dce_v11_0.c
|
||||
index b3d62b9..2006abb 100644
|
||||
--- a/drivers/gpu/drm/amd/amdgpu/dce_v11_0.c
|
||||
+++ b/drivers/gpu/drm/amd/amdgpu/dce_v11_0.c
|
||||
@@ -167,6 +167,7 @@ static void dce_v11_0_init_golden_registers(struct amdgpu_device *adev)
|
||||
(const u32)ARRAY_SIZE(stoney_golden_settings_a11));
|
||||
break;
|
||||
case CHIP_POLARIS11:
|
||||
+ case CHIP_POLARIS12:
|
||||
amdgpu_program_register_sequence(adev,
|
||||
polaris11_golden_settings_a11,
|
||||
(const u32)ARRAY_SIZE(polaris11_golden_settings_a11));
|
||||
@@ -608,6 +609,7 @@ static int dce_v11_0_get_num_crtc (struct amdgpu_device *adev)
|
||||
num_crtc = 6;
|
||||
break;
|
||||
case CHIP_POLARIS11:
|
||||
+ case CHIP_POLARIS12:
|
||||
num_crtc = 5;
|
||||
break;
|
||||
default:
|
||||
@@ -1589,6 +1591,7 @@ static int dce_v11_0_audio_init(struct amdgpu_device *adev)
|
||||
adev->mode_info.audio.num_pins = 8;
|
||||
break;
|
||||
case CHIP_POLARIS11:
|
||||
+ case CHIP_POLARIS12:
|
||||
adev->mode_info.audio.num_pins = 6;
|
||||
break;
|
||||
default:
|
||||
@@ -2388,7 +2391,8 @@ static u32 dce_v11_0_pick_pll(struct drm_crtc *crtc)
|
||||
int pll;
|
||||
|
||||
if ((adev->asic_type == CHIP_POLARIS10) ||
|
||||
- (adev->asic_type == CHIP_POLARIS11)) {
|
||||
+ (adev->asic_type == CHIP_POLARIS11) ||
|
||||
+ (adev->asic_type == CHIP_POLARIS12)) {
|
||||
struct amdgpu_encoder *amdgpu_encoder =
|
||||
to_amdgpu_encoder(amdgpu_crtc->encoder);
|
||||
struct amdgpu_encoder_atom_dig *dig = amdgpu_encoder->enc_priv;
|
||||
@@ -2822,7 +2826,8 @@ static int dce_v11_0_crtc_mode_set(struct drm_crtc *crtc,
|
||||
return -EINVAL;
|
||||
|
||||
if ((adev->asic_type == CHIP_POLARIS10) ||
|
||||
- (adev->asic_type == CHIP_POLARIS11)) {
|
||||
+ (adev->asic_type == CHIP_POLARIS11) ||
|
||||
+ (adev->asic_type == CHIP_POLARIS12)) {
|
||||
struct amdgpu_encoder *amdgpu_encoder =
|
||||
to_amdgpu_encoder(amdgpu_crtc->encoder);
|
||||
int encoder_mode =
|
||||
@@ -2992,6 +2997,7 @@ static int dce_v11_0_early_init(void *handle)
|
||||
adev->mode_info.num_dig = 6;
|
||||
break;
|
||||
case CHIP_POLARIS11:
|
||||
+ case CHIP_POLARIS12:
|
||||
adev->mode_info.num_hpd = 5;
|
||||
adev->mode_info.num_dig = 5;
|
||||
break;
|
||||
@@ -3101,7 +3107,8 @@ static int dce_v11_0_hw_init(void *handle)
|
||||
amdgpu_atombios_crtc_powergate_init(adev);
|
||||
amdgpu_atombios_encoder_init_dig(adev);
|
||||
if ((adev->asic_type == CHIP_POLARIS10) ||
|
||||
- (adev->asic_type == CHIP_POLARIS11)) {
|
||||
+ (adev->asic_type == CHIP_POLARIS11) ||
|
||||
+ (adev->asic_type == CHIP_POLARIS12)) {
|
||||
amdgpu_atombios_crtc_set_dce_clock(adev, adev->clock.default_dispclk,
|
||||
DCE_CLOCK_TYPE_DISPCLK, ATOM_GCK_DFS);
|
||||
amdgpu_atombios_crtc_set_dce_clock(adev, 0,
|
||||
diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c b/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c
|
||||
index d0ec009..3733741 100644
|
||||
--- a/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c
|
||||
+++ b/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c
|
||||
@@ -138,6 +138,13 @@ MODULE_FIRMWARE("amdgpu/polaris10_mec.bi
|
||||
MODULE_FIRMWARE("amdgpu/polaris10_mec2.bin");
|
||||
MODULE_FIRMWARE("amdgpu/polaris10_rlc.bin");
|
||||
|
||||
+MODULE_FIRMWARE("amdgpu/polaris12_ce.bin");
|
||||
+MODULE_FIRMWARE("amdgpu/polaris12_pfp.bin");
|
||||
+MODULE_FIRMWARE("amdgpu/polaris12_me.bin");
|
||||
+MODULE_FIRMWARE("amdgpu/polaris12_mec.bin");
|
||||
+MODULE_FIRMWARE("amdgpu/polaris12_mec2.bin");
|
||||
+MODULE_FIRMWARE("amdgpu/polaris12_rlc.bin");
|
||||
+
|
||||
static const struct amdgpu_gds_reg_offset amdgpu_gds_reg_offset[] =
|
||||
{
|
||||
{mmGDS_VMID0_BASE, mmGDS_VMID0_SIZE, mmGDS_GWS_VMID0, mmGDS_OA_VMID0},
|
||||
@@ -687,6 +694,7 @@ static void gfx_v8_0_init_golden_registe
|
||||
(const u32)ARRAY_SIZE(tonga_golden_common_all));
|
||||
break;
|
||||
case CHIP_POLARIS11:
|
||||
+ case CHIP_POLARIS12:
|
||||
amdgpu_program_register_sequence(adev,
|
||||
golden_settings_polaris11_a11,
|
||||
(const u32)ARRAY_SIZE(golden_settings_polaris11_a11));
|
||||
@@ -901,6 +909,9 @@ static int gfx_v8_0_init_microcode(struc
|
||||
case CHIP_POLARIS10:
|
||||
chip_name = "polaris10";
|
||||
break;
|
||||
+ case CHIP_POLARIS12:
|
||||
+ chip_name = "polaris12";
|
||||
+ break;
|
||||
case CHIP_STONEY:
|
||||
chip_name = "stoney";
|
||||
break;
|
||||
@@ -1777,6 +1788,7 @@ static int gfx_v8_0_gpu_early_init(struc
|
||||
gb_addr_config = TONGA_GB_ADDR_CONFIG_GOLDEN;
|
||||
break;
|
||||
case CHIP_POLARIS11:
|
||||
+ case CHIP_POLARIS12:
|
||||
ret = amdgpu_atombios_get_gfx_info(adev);
|
||||
if (ret)
|
||||
return ret;
|
||||
@@ -2695,6 +2707,7 @@ static void gfx_v8_0_tiling_mode_table_i
|
||||
|
||||
break;
|
||||
case CHIP_POLARIS11:
|
||||
+ case CHIP_POLARIS12:
|
||||
modearray[0] = (ARRAY_MODE(ARRAY_2D_TILED_THIN1) |
|
||||
PIPE_CONFIG(ADDR_SURF_P4_16x16) |
|
||||
TILE_SPLIT(ADDR_SURF_TILE_SPLIT_64B) |
|
||||
@@ -3516,6 +3529,7 @@ gfx_v8_0_raster_config(struct amdgpu_dev
|
||||
*rconf1 |= 0x0;
|
||||
break;
|
||||
case CHIP_POLARIS11:
|
||||
+ case CHIP_POLARIS12:
|
||||
*rconf |= RB_MAP_PKR0(2) | RB_XSEL2(1) | SE_MAP(2) |
|
||||
SE_XSEL(1) | SE_YSEL(1);
|
||||
*rconf1 |= 0x0;
|
||||
@@ -4029,7 +4043,8 @@ static void gfx_v8_0_init_pg(struct amdg
|
||||
cz_enable_cp_power_gating(adev, true);
|
||||
else
|
||||
cz_enable_cp_power_gating(adev, false);
|
||||
- } else if (adev->asic_type == CHIP_POLARIS11) {
|
||||
+ } else if ((adev->asic_type == CHIP_POLARIS11) ||
|
||||
+ (adev->asic_type == CHIP_POLARIS11)) {
|
||||
gfx_v8_0_init_power_gating(adev);
|
||||
}
|
||||
}
|
||||
@@ -4100,7 +4115,8 @@ static int gfx_v8_0_rlc_resume(struct am
|
||||
RLC_CGCG_CGLS_CTRL__CGLS_EN_MASK);
|
||||
WREG32(mmRLC_CGCG_CGLS_CTRL, tmp);
|
||||
if (adev->asic_type == CHIP_POLARIS11 ||
|
||||
- adev->asic_type == CHIP_POLARIS10) {
|
||||
+ adev->asic_type == CHIP_POLARIS10 ||
|
||||
+ adev->asic_type == CHIP_POLARIS12) {
|
||||
tmp = RREG32(mmRLC_CGCG_CGLS_CTRL_3D);
|
||||
tmp &= ~0x3;
|
||||
WREG32(mmRLC_CGCG_CGLS_CTRL_3D, tmp);
|
||||
@@ -4288,6 +4304,7 @@ static int gfx_v8_0_cp_gfx_start(struct
|
||||
amdgpu_ring_write(ring, 0x0000002A);
|
||||
break;
|
||||
case CHIP_POLARIS11:
|
||||
+ case CHIP_POLARIS12:
|
||||
amdgpu_ring_write(ring, 0x16000012);
|
||||
amdgpu_ring_write(ring, 0x00000000);
|
||||
break;
|
||||
@@ -4938,7 +4955,8 @@ static int gfx_v8_0_cp_compute_resume(st
|
||||
(adev->asic_type == CHIP_FIJI) ||
|
||||
(adev->asic_type == CHIP_STONEY) ||
|
||||
(adev->asic_type == CHIP_POLARIS11) ||
|
||||
- (adev->asic_type == CHIP_POLARIS10)) {
|
||||
+ (adev->asic_type == CHIP_POLARIS10) ||
|
||||
+ (adev->asic_type == CHIP_POLARIS12)) {
|
||||
WREG32(mmCP_MEC_DOORBELL_RANGE_LOWER,
|
||||
AMDGPU_DOORBELL_KIQ << 2);
|
||||
WREG32(mmCP_MEC_DOORBELL_RANGE_UPPER,
|
||||
@@ -4974,7 +4992,8 @@ static int gfx_v8_0_cp_compute_resume(st
|
||||
mqd->cp_hqd_persistent_state = tmp;
|
||||
if (adev->asic_type == CHIP_STONEY ||
|
||||
adev->asic_type == CHIP_POLARIS11 ||
|
||||
- adev->asic_type == CHIP_POLARIS10) {
|
||||
+ adev->asic_type == CHIP_POLARIS10 ||
|
||||
+ adev->asic_type == CHIP_POLARIS12) {
|
||||
tmp = RREG32(mmCP_ME1_PIPE3_INT_CNTL);
|
||||
tmp = REG_SET_FIELD(tmp, CP_ME1_PIPE3_INT_CNTL, GENERIC2_INT_ENABLE, 1);
|
||||
WREG32(mmCP_ME1_PIPE3_INT_CNTL, tmp);
|
||||
@@ -5488,7 +5507,8 @@ static int gfx_v8_0_late_init(void *hand
|
||||
static void gfx_v8_0_enable_gfx_static_mg_power_gating(struct amdgpu_device *adev,
|
||||
bool enable)
|
||||
{
|
||||
- if (adev->asic_type == CHIP_POLARIS11)
|
||||
+ if ((adev->asic_type == CHIP_POLARIS11) ||
|
||||
+ (adev->asic_type == CHIP_POLARIS12))
|
||||
/* Send msg to SMU via Powerplay */
|
||||
amdgpu_set_powergating_state(adev,
|
||||
AMD_IP_BLOCK_TYPE_SMC,
|
||||
@@ -5565,6 +5585,7 @@ static int gfx_v8_0_set_powergating_stat
|
||||
gfx_v8_0_enable_gfx_dynamic_mg_power_gating(adev, false);
|
||||
break;
|
||||
case CHIP_POLARIS11:
|
||||
+ case CHIP_POLARIS12:
|
||||
if ((adev->pg_flags & AMD_PG_SUPPORT_GFX_SMG) && enable)
|
||||
gfx_v8_0_enable_gfx_static_mg_power_gating(adev, true);
|
||||
else
|
||||
diff --git a/drivers/gpu/drm/amd/amdgpu/gmc_v8_0.c b/drivers/gpu/drm/amd/amdgpu/gmc_v8_0.c
|
||||
index 0daac3a..476bc9f 100644
|
||||
--- a/drivers/gpu/drm/amd/amdgpu/gmc_v8_0.c
|
||||
+++ b/drivers/gpu/drm/amd/amdgpu/gmc_v8_0.c
|
||||
@@ -46,6 +46,7 @@ static int gmc_v8_0_wait_for_idle(void *handle);
|
||||
MODULE_FIRMWARE("amdgpu/tonga_mc.bin");
|
||||
MODULE_FIRMWARE("amdgpu/polaris11_mc.bin");
|
||||
MODULE_FIRMWARE("amdgpu/polaris10_mc.bin");
|
||||
+MODULE_FIRMWARE("amdgpu/polaris12_mc.bin");
|
||||
|
||||
static const u32 golden_settings_tonga_a11[] =
|
||||
{
|
||||
@@ -130,6 +131,7 @@ static void gmc_v8_0_init_golden_registers(struct amdgpu_device *adev)
|
||||
(const u32)ARRAY_SIZE(golden_settings_tonga_a11));
|
||||
break;
|
||||
case CHIP_POLARIS11:
|
||||
+ case CHIP_POLARIS12:
|
||||
amdgpu_program_register_sequence(adev,
|
||||
golden_settings_polaris11_a11,
|
||||
(const u32)ARRAY_SIZE(golden_settings_polaris11_a11));
|
||||
@@ -225,6 +227,9 @@ static int gmc_v8_0_init_microcode(struct amdgpu_device *adev)
|
||||
case CHIP_POLARIS10:
|
||||
chip_name = "polaris10";
|
||||
break;
|
||||
+ case CHIP_POLARIS12:
|
||||
+ chip_name = "polaris12";
|
||||
+ break;
|
||||
case CHIP_FIJI:
|
||||
case CHIP_CARRIZO:
|
||||
case CHIP_STONEY:
|
||||
diff --git a/drivers/gpu/drm/amd/amdgpu/sdma_v3_0.c b/drivers/gpu/drm/amd/amdgpu/sdma_v3_0.c
|
||||
index 1170a64..034ace7 100644
|
||||
--- a/drivers/gpu/drm/amd/amdgpu/sdma_v3_0.c
|
||||
+++ b/drivers/gpu/drm/amd/amdgpu/sdma_v3_0.c
|
||||
@@ -60,6 +60,8 @@ MODULE_FIRMWARE("amdgpu/polaris10_sdma.bin");
|
||||
MODULE_FIRMWARE("amdgpu/polaris10_sdma1.bin");
|
||||
MODULE_FIRMWARE("amdgpu/polaris11_sdma.bin");
|
||||
MODULE_FIRMWARE("amdgpu/polaris11_sdma1.bin");
|
||||
+MODULE_FIRMWARE("amdgpu/polaris12_sdma.bin");
|
||||
+MODULE_FIRMWARE("amdgpu/polaris12_sdma1.bin");
|
||||
|
||||
|
||||
static const u32 sdma_offsets[SDMA_MAX_INSTANCE] =
|
||||
@@ -206,6 +208,7 @@ static void sdma_v3_0_init_golden_registers(struct amdgpu_device *adev)
|
||||
(const u32)ARRAY_SIZE(golden_settings_tonga_a11));
|
||||
break;
|
||||
case CHIP_POLARIS11:
|
||||
+ case CHIP_POLARIS12:
|
||||
amdgpu_program_register_sequence(adev,
|
||||
golden_settings_polaris11_a11,
|
||||
(const u32)ARRAY_SIZE(golden_settings_polaris11_a11));
|
||||
@@ -278,6 +281,9 @@ static int sdma_v3_0_init_microcode(struct amdgpu_device *adev)
|
||||
case CHIP_POLARIS10:
|
||||
chip_name = "polaris10";
|
||||
break;
|
||||
+ case CHIP_POLARIS12:
|
||||
+ chip_name = "polaris12";
|
||||
+ break;
|
||||
case CHIP_CARRIZO:
|
||||
chip_name = "carrizo";
|
||||
break;
|
||||
diff --git a/drivers/gpu/drm/amd/amdgpu/vce_v3_0.c b/drivers/gpu/drm/amd/amdgpu/vce_v3_0.c
|
||||
index 6b3293a..5fb0b7f 100644
|
||||
--- a/drivers/gpu/drm/amd/amdgpu/vce_v3_0.c
|
||||
+++ b/drivers/gpu/drm/amd/amdgpu/vce_v3_0.c
|
||||
@@ -320,11 +320,12 @@ static unsigned vce_v3_0_get_harvest_config(struct amdgpu_device *adev)
|
||||
{
|
||||
u32 tmp;
|
||||
|
||||
- /* Fiji, Stoney, Polaris10, Polaris11 are single pipe */
|
||||
+ /* Fiji, Stoney, Polaris10, Polaris11, Polaris12 are single pipe */
|
||||
if ((adev->asic_type == CHIP_FIJI) ||
|
||||
(adev->asic_type == CHIP_STONEY) ||
|
||||
(adev->asic_type == CHIP_POLARIS10) ||
|
||||
- (adev->asic_type == CHIP_POLARIS11))
|
||||
+ (adev->asic_type == CHIP_POLARIS11) ||
|
||||
+ (adev->asic_type == CHIP_POLARIS12))
|
||||
return AMDGPU_VCE_HARVEST_VCE1;
|
||||
|
||||
/* Tonga and CZ are dual or single pipe */
|
||||
diff --git a/drivers/gpu/drm/amd/amdgpu/vi.c b/drivers/gpu/drm/amd/amdgpu/vi.c
|
||||
index bf088d6..c2ac54f 100644
|
||||
--- a/drivers/gpu/drm/amd/amdgpu/vi.c
|
||||
+++ b/drivers/gpu/drm/amd/amdgpu/vi.c
|
||||
@@ -88,6 +88,7 @@ MODULE_FIRMWARE("amdgpu/polaris10_smc.bi
|
||||
MODULE_FIRMWARE("amdgpu/polaris10_smc_sk.bin");
|
||||
MODULE_FIRMWARE("amdgpu/polaris11_smc.bin");
|
||||
MODULE_FIRMWARE("amdgpu/polaris11_smc_sk.bin");
|
||||
+MODULE_FIRMWARE("amdgpu/polaris12_smc.bin");
|
||||
|
||||
/*
|
||||
* Indirect registers accessor
|
||||
@@ -312,6 +313,7 @@ static void vi_init_golden_registers(str
|
||||
break;
|
||||
case CHIP_POLARIS11:
|
||||
case CHIP_POLARIS10:
|
||||
+ case CHIP_POLARIS12:
|
||||
default:
|
||||
break;
|
||||
}
|
||||
@@ -592,6 +594,7 @@ static int vi_read_register(struct amdgp
|
||||
case CHIP_TONGA:
|
||||
case CHIP_POLARIS11:
|
||||
case CHIP_POLARIS10:
|
||||
+ case CHIP_POLARIS12:
|
||||
case CHIP_CARRIZO:
|
||||
case CHIP_STONEY:
|
||||
asic_register_table = cz_allowed_read_registers;
|
||||
@@ -1465,6 +1468,7 @@ int vi_set_ip_blocks(struct amdgpu_devic
|
||||
break;
|
||||
case CHIP_POLARIS11:
|
||||
case CHIP_POLARIS10:
|
||||
+ case CHIP_POLARIS12:
|
||||
adev->ip_blocks = polaris11_ip_blocks_vd;
|
||||
adev->num_ip_blocks = ARRAY_SIZE(polaris11_ip_blocks_vd);
|
||||
break;
|
||||
@@ -1608,6 +1612,11 @@ static int vi_common_early_init(void *ha
|
||||
adev->pg_flags = 0;
|
||||
adev->external_rev_id = adev->rev_id + 0x50;
|
||||
break;
|
||||
+ case CHIP_POLARIS12:
|
||||
+ adev->cg_flags = AMD_CG_SUPPORT_UVD_MGCG;
|
||||
+ adev->pg_flags = 0;
|
||||
+ adev->external_rev_id = adev->rev_id + 0x64;
|
||||
+ break;
|
||||
case CHIP_CARRIZO:
|
||||
adev->cg_flags = AMD_CG_SUPPORT_UVD_MGCG |
|
||||
AMD_CG_SUPPORT_GFX_MGCG |
|
||||
@@ -1897,6 +1906,7 @@ static int vi_common_set_clockgating_sta
|
||||
case CHIP_TONGA:
|
||||
case CHIP_POLARIS10:
|
||||
case CHIP_POLARIS11:
|
||||
+ case CHIP_POLARIS12:
|
||||
vi_common_set_clockgating_state_by_smu(adev, state);
|
||||
default:
|
||||
break;
|
||||
diff --git a/drivers/gpu/drm/amd/include/amd_shared.h b/drivers/gpu/drm/amd/include/amd_shared.h
|
||||
index c02469a..5f59117 100644
|
||||
--- a/drivers/gpu/drm/amd/include/amd_shared.h
|
||||
+++ b/drivers/gpu/drm/amd/include/amd_shared.h
|
||||
@@ -46,6 +46,7 @@ enum amd_asic_type {
|
||||
CHIP_STONEY,
|
||||
CHIP_POLARIS10,
|
||||
CHIP_POLARIS11,
|
||||
+ CHIP_POLARIS12,
|
||||
CHIP_LAST,
|
||||
};
|
||||
|
||||
--
|
||||
2.10.2
|
||||
@@ -0,0 +1,24 @@
|
||||
From 6e88491cf2a3b17199c78bd53348b39dc6a88275 Mon Sep 17 00:00:00 2001
|
||||
From: Junshan Fang <Junshan.Fang@amd.com>
|
||||
Date: Thu, 15 Jun 2017 14:02:20 +0800
|
||||
Subject: [PATCH] drm/amdgpu: add Polaris12 DID
|
||||
|
||||
Signed-off-by: Junshan Fang <Junshan.Fang@amd.com>
|
||||
Reviewed-by: Roger.He <Hongbo.He@amd.com>
|
||||
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
|
||||
Cc: stable@vger.kernel.org
|
||||
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
|
||||
---
|
||||
drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
|
||||
index f2d705e6a75a..ab6b0d0febab 100644
|
||||
@@ -418,6 +418,7 @@ static const struct pci_device_id pciidl
|
||||
{0x1002, 0x6986, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_POLARIS12},
|
||||
{0x1002, 0x6987, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_POLARIS12},
|
||||
{0x1002, 0x6995, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_POLARIS12},
|
||||
+ {0x1002, 0x6997, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_POLARIS12},
|
||||
{0x1002, 0x699F, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_POLARIS12},
|
||||
|
||||
{0, 0, 0}
|
||||
+32
@@ -0,0 +1,32 @@
|
||||
From c10c8f7c27103bd7ac02d041d9d6e97296d48fc1 Mon Sep 17 00:00:00 2001
|
||||
From: Alex Deucher <alexander.deucher@amd.com>
|
||||
Date: Fri, 10 Feb 2017 18:09:32 -0500
|
||||
Subject: [PATCH] drm/amdgpu/pm: check for headless before calling
|
||||
compute_clocks
|
||||
|
||||
Don't update display bandwidth on headless asics.
|
||||
|
||||
bug:
|
||||
https://bugs.freedesktop.org/show_bug.cgi?id=99387
|
||||
|
||||
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
|
||||
Cc: stable@vger.kernel.org
|
||||
---
|
||||
drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c | 3 ++-
|
||||
1 file changed, 2 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c
|
||||
index 95e026a..346e80a 100644
|
||||
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c
|
||||
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c
|
||||
@@ -1283,7 +1283,9 @@ void amdgpu_pm_compute_clocks(struct amd
|
||||
if (adev->pp_enabled) {
|
||||
int i = 0;
|
||||
|
||||
- amdgpu_display_bandwidth_update(adev);
|
||||
+ if (adev->mode_info.num_crtc)
|
||||
+ amdgpu_display_bandwidth_update(adev);
|
||||
+
|
||||
for (i = 0; i < AMDGPU_MAX_RINGS; i++) {
|
||||
struct amdgpu_ring *ring = adev->rings[i];
|
||||
if (ring && ring->ready)
|
||||
+81
@@ -0,0 +1,81 @@
|
||||
From f4309526576db325264b6dc9ee150ee70b330a42 Mon Sep 17 00:00:00 2001
|
||||
From: Junwei Zhang <Jerry.Zhang@amd.com>
|
||||
Date: Wed, 14 Dec 2016 15:40:48 -0500
|
||||
Subject: [PATCH] drm/amdgpu/powerplay: add Polaris12 support
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Signed-off-by: Junwei Zhang <Jerry.Zhang@amd.com>
|
||||
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
|
||||
Reviewed-by: Christian König <christian.koenig@amd.com>
|
||||
Reviewed-by: Ken Wang <Qingqing.Wang@amd.com>
|
||||
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
|
||||
---
|
||||
drivers/gpu/drm/amd/amdgpu/amdgpu_powerplay.c | 1 +
|
||||
drivers/gpu/drm/amd/powerplay/hwmgr/hwmgr.c | 3 ++-
|
||||
drivers/gpu/drm/amd/powerplay/hwmgr/smu7_powertune.c | 2 +-
|
||||
drivers/gpu/drm/amd/powerplay/smumgr/smumgr.c | 1 +
|
||||
4 files changed, 5 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_powerplay.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_powerplay.c
|
||||
index fc592c2..95a568d 100644
|
||||
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_powerplay.c
|
||||
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_powerplay.c
|
||||
@@ -98,6 +98,7 @@ static int amdgpu_pp_early_init(void *handle)
|
||||
switch (adev->asic_type) {
|
||||
case CHIP_POLARIS11:
|
||||
case CHIP_POLARIS10:
|
||||
+ case CHIP_POLARIS12:
|
||||
case CHIP_TONGA:
|
||||
case CHIP_FIJI:
|
||||
case CHIP_TOPAZ:
|
||||
diff --git a/drivers/gpu/drm/amd/powerplay/hwmgr/hwmgr.c b/drivers/gpu/drm/amd/powerplay/hwmgr/hwmgr.c
|
||||
index dc6700a..b036064 100644
|
||||
--- a/drivers/gpu/drm/amd/powerplay/hwmgr/hwmgr.c
|
||||
+++ b/drivers/gpu/drm/amd/powerplay/hwmgr/hwmgr.c
|
||||
@@ -95,6 +95,7 @@ int hwmgr_init(struct amd_pp_init *pp_init, struct pp_instance *handle)
|
||||
break;
|
||||
case CHIP_POLARIS11:
|
||||
case CHIP_POLARIS10:
|
||||
+ case CHIP_POLARIS12:
|
||||
polaris_set_asic_special_caps(hwmgr);
|
||||
hwmgr->feature_mask &= ~(PP_UVD_HANDSHAKE_MASK);
|
||||
break;
|
||||
@@ -745,7 +746,7 @@ int polaris_set_asic_special_caps(struct pp_hwmgr *hwmgr)
|
||||
phm_cap_set(hwmgr->platform_descriptor.platformCaps,
|
||||
PHM_PlatformCaps_TablelessHardwareInterface);
|
||||
|
||||
- if (hwmgr->chip_id == CHIP_POLARIS11)
|
||||
+ if ((hwmgr->chip_id == CHIP_POLARIS11) || (hwmgr->chip_id == CHIP_POLARIS12))
|
||||
phm_cap_set(hwmgr->platform_descriptor.platformCaps,
|
||||
PHM_PlatformCaps_SPLLShutdownSupport);
|
||||
return 0;
|
||||
diff --git a/drivers/gpu/drm/amd/powerplay/hwmgr/smu7_powertune.c b/drivers/gpu/drm/amd/powerplay/hwmgr/smu7_powertune.c
|
||||
index 26477f0..6cd1287 100644
|
||||
--- a/drivers/gpu/drm/amd/powerplay/hwmgr/smu7_powertune.c
|
||||
+++ b/drivers/gpu/drm/amd/powerplay/hwmgr/smu7_powertune.c
|
||||
@@ -521,7 +521,7 @@ int smu7_enable_didt_config(struct pp_hwmgr *hwmgr)
|
||||
PP_ASSERT_WITH_CODE((result == 0), "DIDT Config failed.", return result);
|
||||
result = smu7_program_pt_config_registers(hwmgr, DIDTConfig_Polaris10);
|
||||
PP_ASSERT_WITH_CODE((result == 0), "DIDT Config failed.", return result);
|
||||
- } else if (hwmgr->chip_id == CHIP_POLARIS11) {
|
||||
+ } else if ((hwmgr->chip_id == CHIP_POLARIS11) || (hwmgr->chip_id == CHIP_POLARIS12)) {
|
||||
result = smu7_program_pt_config_registers(hwmgr, GCCACConfig_Polaris11);
|
||||
PP_ASSERT_WITH_CODE((result == 0), "DIDT Config failed.", return result);
|
||||
result = smu7_program_pt_config_registers(hwmgr, DIDTConfig_Polaris11);
|
||||
diff --git a/drivers/gpu/drm/amd/powerplay/smumgr/smumgr.c b/drivers/gpu/drm/amd/powerplay/smumgr/smumgr.c
|
||||
index e5812aa..6e618aa 100644
|
||||
--- a/drivers/gpu/drm/amd/powerplay/smumgr/smumgr.c
|
||||
+++ b/drivers/gpu/drm/amd/powerplay/smumgr/smumgr.c
|
||||
@@ -65,6 +65,7 @@ int smum_init(struct amd_pp_init *pp_init, struct pp_instance *handle)
|
||||
break;
|
||||
case CHIP_POLARIS11:
|
||||
case CHIP_POLARIS10:
|
||||
+ case CHIP_POLARIS12:
|
||||
polaris10_smum_init(smumgr);
|
||||
break;
|
||||
default:
|
||||
--
|
||||
2.10.2
|
||||
|
||||
+42
@@ -0,0 +1,42 @@
|
||||
From 853277481178fdf14d1a4e9e6ac7174d6046176f Mon Sep 17 00:00:00 2001
|
||||
From: Jani Nikula <jani.nikula@intel.com>
|
||||
Date: Wed, 1 Feb 2017 15:46:09 +0200
|
||||
Subject: [PATCH] drm/i915: don't warn about Skylake CPU - KabyPoint PCH combo
|
||||
|
||||
Apparently there are machines out there with Skylake CPU and KabyPoint
|
||||
PCH. Judging from our driver code, there doesn't seem to be any code
|
||||
paths that would do anything different between SunrisePoint and
|
||||
KabyPoint PCHs, so it would seem okay to accept the combo without
|
||||
warnings.
|
||||
|
||||
Fixes: 22dea0be50b2 ("drm/i915: Introduce Kabypoint PCH for Kabylake H/DT.")
|
||||
References: https://lists.freedesktop.org/archives/intel-gfx/2017-February/118611.html
|
||||
Reported-by: Rainer Koenig <Rainer.Koenig@ts.fujitsu.com>
|
||||
Cc: Rainer Koenig <Rainer.Koenig@ts.fujitsu.com>
|
||||
Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
|
||||
Cc: <stable@vger.kernel.org> # v4.8+
|
||||
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
|
||||
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
|
||||
Link: http://patchwork.freedesktop.org/patch/msgid/1485956769-26015-1-git-send-email-jani.nikula@intel.com
|
||||
(cherry picked from commit 3aac4acb89710fe782c9e78e7b1febf76e112c6c)
|
||||
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
|
||||
[ rebased for 4.9 / tmb ]
|
||||
Signed-off-by: Thomas Backlund <tmb@mageia.org>
|
||||
---
|
||||
drivers/gpu/drm/i915/i915_drv.c | 3 ++-
|
||||
1 file changed, 2 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c
|
||||
index b2c4a0b..8d63098 100644
|
||||
--- a/drivers/gpu/drm/i915/i915_drv.c
|
||||
+++ b/drivers/gpu/drm/i915/i915_drv.c
|
||||
@@ -207,7 +207,8 @@ static void intel_detect_pch(struct drm_
|
||||
} else if (id == INTEL_PCH_KBP_DEVICE_ID_TYPE) {
|
||||
dev_priv->pch_type = PCH_KBP;
|
||||
DRM_DEBUG_KMS("Found KabyPoint PCH\n");
|
||||
- WARN_ON(!IS_KABYLAKE(dev));
|
||||
+ WARN_ON(!IS_SKYLAKE(dev) &&
|
||||
+ !IS_KABYLAKE(dev));
|
||||
} else if ((id == INTEL_PCH_P2X_DEVICE_ID_TYPE) ||
|
||||
(id == INTEL_PCH_P3X_DEVICE_ID_TYPE) ||
|
||||
((id == INTEL_PCH_QEMU_DEVICE_ID_TYPE) &&
|
||||
@@ -4112,11 +4112,11 @@ head: c99566fb810c9d8cae5e9cd39d1772b55e2f514c
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
--- linux/drivers/gpu/drm/Kconfig.gpu-drm-mach64.orig 2014-03-08 18:52:34.979768492 +0200
|
||||
+++ linux/drivers/gpu/drm/Kconfig 2014-03-08 18:55:18.769681473 +0200
|
||||
@@ -130,6 +130,17 @@ config DRM_I810
|
||||
|
||||
source "drivers/gpu/drm/i915/Kconfig"
|
||||
--- linux/drivers/gpu/drm/Kconfig.gpu-drm-mach64.orig
|
||||
+++ linux/drivers/gpu/drm/Kconfig
|
||||
@@ -267,6 +267,17 @@ config DRM_I810
|
||||
selected, the module will be called i810. AGP support is required
|
||||
for this driver to work.
|
||||
|
||||
+config DRM_MACH64
|
||||
+ tristate "ATI Rage Pro (Mach64)"
|
||||
@@ -4134,11 +4134,11 @@ head: c99566fb810c9d8cae5e9cd39d1772b55e2f514c
|
||||
depends on DRM && PCI
|
||||
--- linux/drivers/gpu/drm/Makefile.gpu-drm-mach64.orig
|
||||
+++ linux/drivers/gpu/drm/Makefile
|
||||
@@ -38,6 +38,7 @@ obj-$(CONFIG_DRM_R128) += r128/
|
||||
@@ -47,6 +47,7 @@ obj-$(CONFIG_DRM_R128) += r128/
|
||||
obj-$(CONFIG_HSA_AMD) += amd/amdkfd/
|
||||
obj-$(CONFIG_DRM_RADEON)+= radeon/
|
||||
obj-$(CONFIG_DRM_AMDGPU)+= amd/amdgpu/
|
||||
+obj-$(CONFIG_DRM_MACH64)+= mach64/
|
||||
obj-$(CONFIG_DRM_MGA) += mga/
|
||||
obj-$(CONFIG_DRM_I810) += i810/
|
||||
obj-$(CONFIG_DRM_I915) += i915/
|
||||
obj-$(CONFIG_DRM_I915) += i915/
|
||||
|
||||
@@ -1,47 +0,0 @@
|
||||
From fc8a601e1175ae351f662506030f9939cb7fdbfe Mon Sep 17 00:00:00 2001
|
||||
From: Alex Hung <alex.hung@canonical.com>
|
||||
Date: Mon, 13 Jun 2016 19:44:00 +0800
|
||||
Subject: [PATCH] hp-wmi: Fix wifi cannot be hard-unblocked
|
||||
|
||||
Several users reported wifi cannot be unblocked as discussed in [1].
|
||||
This patch removes the use of the 2009 flag by BIOS but uses the actual
|
||||
WMI function calls - it will be skipped if WMI reports unsupported.
|
||||
|
||||
[1] https://bugzilla.kernel.org/show_bug.cgi?id=69131
|
||||
|
||||
Signed-off-by: Alex Hung <alex.hung@canonical.com>
|
||||
Tested-by: Evgenii Shatokhin <eugene.shatokhin@yandex.ru>
|
||||
Cc: stable@vger.kernel.org
|
||||
Signed-off-by: Darren Hart <dvhart@linux.intel.com>
|
||||
---
|
||||
drivers/platform/x86/hp-wmi.c | 7 ++++++-
|
||||
1 file changed, 6 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/drivers/platform/x86/hp-wmi.c b/drivers/platform/x86/hp-wmi.c
|
||||
index 6f145f2..96ffda4 100644
|
||||
--- a/drivers/platform/x86/hp-wmi.c
|
||||
+++ b/drivers/platform/x86/hp-wmi.c
|
||||
@@ -718,6 +718,11 @@ static int __init hp_wmi_rfkill_setup(struct platform_device *device)
|
||||
if (err)
|
||||
return err;
|
||||
|
||||
+ err = hp_wmi_perform_query(HPWMI_WIRELESS_QUERY, 1, &wireless,
|
||||
+ sizeof(wireless), 0);
|
||||
+ if (err)
|
||||
+ return err;
|
||||
+
|
||||
if (wireless & 0x1) {
|
||||
wifi_rfkill = rfkill_alloc("hp-wifi", &device->dev,
|
||||
RFKILL_TYPE_WLAN,
|
||||
@@ -882,7 +887,7 @@ static int __init hp_wmi_bios_setup(struct platform_device *device)
|
||||
wwan_rfkill = NULL;
|
||||
rfkill2_count = 0;
|
||||
|
||||
- if (hp_wmi_bios_2009_later() || hp_wmi_rfkill_setup(device))
|
||||
+ if (hp_wmi_rfkill_setup(device))
|
||||
hp_wmi_rfkill2_setup(device);
|
||||
|
||||
err = device_create_file(&device->dev, &dev_attr_display);
|
||||
--
|
||||
2.9.2
|
||||
|
||||
@@ -1,95 +0,0 @@
|
||||
From a36aa80f3cb2540fb1dbad6240852de4365a2e82 Mon Sep 17 00:00:00 2001
|
||||
From: Alexander Shishkin <alexander.shishkin@linux.intel.com>
|
||||
Date: Thu, 30 Jun 2016 11:51:44 +0300
|
||||
Subject: [PATCH] intel_th: Fix a deadlock in modprobing
|
||||
|
||||
Driver initialization tries to request a hub (GTH) driver module from
|
||||
its probe callback, resulting in a deadlock.
|
||||
|
||||
This patch solves the problem by adding a deferred work for requesting
|
||||
the hub module.
|
||||
|
||||
Signed-off-by: Alexander Shishkin <alexander.shishkin@linux.intel.com>
|
||||
Cc: <stable@vger.kernel.org> # 4.4.x-
|
||||
---
|
||||
drivers/hwtracing/intel_th/core.c | 35 ++++++++++++++++++++++++++++++++++-
|
||||
drivers/hwtracing/intel_th/intel_th.h | 3 +++
|
||||
2 files changed, 37 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/drivers/hwtracing/intel_th/core.c b/drivers/hwtracing/intel_th/core.c
|
||||
index 1be543e..0b112ae 100644
|
||||
--- a/drivers/hwtracing/intel_th/core.c
|
||||
+++ b/drivers/hwtracing/intel_th/core.c
|
||||
@@ -465,6 +465,38 @@ static struct intel_th_subdevice {
|
||||
},
|
||||
};
|
||||
|
||||
+#ifdef CONFIG_MODULES
|
||||
+static void __intel_th_request_hub_module(struct work_struct *work)
|
||||
+{
|
||||
+ struct intel_th *th = container_of(work, struct intel_th,
|
||||
+ request_module_work);
|
||||
+
|
||||
+ request_module("intel_th_%s", th->hub->name);
|
||||
+}
|
||||
+
|
||||
+static int intel_th_request_hub_module(struct intel_th *th)
|
||||
+{
|
||||
+ INIT_WORK(&th->request_module_work, __intel_th_request_hub_module);
|
||||
+ schedule_work(&th->request_module_work);
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+static void intel_th_request_hub_module_flush(struct intel_th *th)
|
||||
+{
|
||||
+ flush_work(&th->request_module_work);
|
||||
+}
|
||||
+#else
|
||||
+static inline int intel_th_request_hub_module(struct intel_th *th)
|
||||
+{
|
||||
+ return -EINVAL;
|
||||
+}
|
||||
+
|
||||
+static inline void intel_th_request_hub_module_flush(struct intel_th *th)
|
||||
+{
|
||||
+}
|
||||
+#endif /* CONFIG_MODULES */
|
||||
+
|
||||
static int intel_th_populate(struct intel_th *th, struct resource *devres,
|
||||
unsigned int ndevres, int irq)
|
||||
{
|
||||
@@ -535,7 +567,7 @@ static int intel_th_populate(struct intel_th *th, struct resource *devres,
|
||||
/* need switch driver to be loaded to enumerate the rest */
|
||||
if (subdev->type == INTEL_TH_SWITCH && !req) {
|
||||
th->hub = thdev;
|
||||
- err = request_module("intel_th_%s", subdev->name);
|
||||
+ err = intel_th_request_hub_module(th);
|
||||
if (!err)
|
||||
req++;
|
||||
}
|
||||
@@ -652,6 +684,7 @@ void intel_th_free(struct intel_th *th)
|
||||
{
|
||||
int i;
|
||||
|
||||
+ intel_th_request_hub_module_flush(th);
|
||||
for (i = 0; i < TH_SUBDEVICE_MAX; i++)
|
||||
if (th->thdev[i] != th->hub)
|
||||
intel_th_device_remove(th->thdev[i]);
|
||||
diff --git a/drivers/hwtracing/intel_th/intel_th.h b/drivers/hwtracing/intel_th/intel_th.h
|
||||
index 0df22e3..0482848 100644
|
||||
--- a/drivers/hwtracing/intel_th/intel_th.h
|
||||
+++ b/drivers/hwtracing/intel_th/intel_th.h
|
||||
@@ -205,6 +205,9 @@ struct intel_th {
|
||||
|
||||
int id;
|
||||
int major;
|
||||
+#ifdef CONFIG_MODULES
|
||||
+ struct work_struct request_module_work;
|
||||
+#endif /* CONFIG_MODULES */
|
||||
#ifdef CONFIG_INTEL_TH_DEBUG
|
||||
struct dentry *dbg;
|
||||
#endif
|
||||
--
|
||||
2.9.2
|
||||
|
||||
@@ -1,32 +0,0 @@
|
||||
From 7a1a47ce35821b40f5b2ce46379ba14393bc3873 Mon Sep 17 00:00:00 2001
|
||||
From: Alexander Shishkin <alexander.shishkin@linux.intel.com>
|
||||
Date: Tue, 28 Jun 2016 18:55:23 +0300
|
||||
Subject: [PATCH] intel_th: pci: Add Kaby Lake PCH-H support
|
||||
|
||||
This adds Intel(R) Trace Hub PCI ID for Kaby Lake PCH-H.
|
||||
|
||||
Signed-off-by: Alexander Shishkin <alexander.shishkin@linux.intel.com>
|
||||
Cc: <stable@vger.kernel.org>
|
||||
---
|
||||
drivers/hwtracing/intel_th/pci.c | 5 +++++
|
||||
1 file changed, 5 insertions(+)
|
||||
|
||||
diff --git a/drivers/hwtracing/intel_th/pci.c b/drivers/hwtracing/intel_th/pci.c
|
||||
index 5e25c7e..0bba384 100644
|
||||
--- a/drivers/hwtracing/intel_th/pci.c
|
||||
+++ b/drivers/hwtracing/intel_th/pci.c
|
||||
@@ -80,6 +80,11 @@ static const struct pci_device_id intel_th_pci_id_table[] = {
|
||||
PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0x1a8e),
|
||||
.driver_data = (kernel_ulong_t)0,
|
||||
},
|
||||
+ {
|
||||
+ /* Kaby Lake PCH-H */
|
||||
+ PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0xa2a6),
|
||||
+ .driver_data = (kernel_ulong_t)0,
|
||||
+ },
|
||||
{ 0 },
|
||||
};
|
||||
|
||||
--
|
||||
2.9.2
|
||||
|
||||
+102
@@ -0,0 +1,102 @@
|
||||
From: Arindam Nath <arindam.nath@amd.com>
|
||||
|
||||
Change History
|
||||
--------------
|
||||
|
||||
v3:
|
||||
- add Fixes and CC tags
|
||||
- add link to Bugzilla
|
||||
|
||||
v2: changes suggested by Joerg
|
||||
- add flush flag to improve efficiency of flush operation
|
||||
|
||||
v1:
|
||||
- The idea behind flush queues is to defer the IOTLB flushing
|
||||
for domains for which the mappings are no longer valid. We
|
||||
add such domains in queue_add(), and when the queue size
|
||||
reaches FLUSH_QUEUE_SIZE, we perform __queue_flush().
|
||||
|
||||
Since we have already taken lock before __queue_flush()
|
||||
is called, we need to make sure the IOTLB flushing is
|
||||
performed as quickly as possible.
|
||||
|
||||
In the current implementation, we perform IOTLB flushing
|
||||
for all domains irrespective of which ones were actually
|
||||
added in the flush queue initially. This can be quite
|
||||
expensive especially for domains for which unmapping is
|
||||
not required at this point of time.
|
||||
|
||||
This patch makes use of domain information in
|
||||
'struct flush_queue_entry' to make sure we only flush
|
||||
IOTLBs for domains who need it, skipping others.
|
||||
|
||||
Bugzilla: https://bugs.freedesktop.org/101029
|
||||
Fixes: b1516a14657a ("iommu/amd: Implement flush queue")
|
||||
Cc: stable@vger.kernel.org
|
||||
Suggested-by: Joerg Roedel <joro@8bytes.org>
|
||||
Signed-off-by: Arindam Nath <arindam.nath@amd.com>
|
||||
---
|
||||
drivers/iommu/amd_iommu.c | 27 ++++++++++++++++++++-------
|
||||
drivers/iommu/amd_iommu_types.h | 2 ++
|
||||
2 files changed, 22 insertions(+), 7 deletions(-)
|
||||
|
||||
diff --git a/drivers/iommu/amd_iommu.c b/drivers/iommu/amd_iommu.c
|
||||
index 63cacf5..1edeebec 100644
|
||||
--- a/drivers/iommu/amd_iommu.c
|
||||
+++ b/drivers/iommu/amd_iommu.c
|
||||
@@ -2227,15 +2227,26 @@ static struct iommu_group *amd_iommu_device_group(struct device *dev)
|
||||
|
||||
static void __queue_flush(struct flush_queue *queue)
|
||||
{
|
||||
- struct protection_domain *domain;
|
||||
- unsigned long flags;
|
||||
int idx;
|
||||
|
||||
- /* First flush TLB of all known domains */
|
||||
- spin_lock_irqsave(&amd_iommu_pd_lock, flags);
|
||||
- list_for_each_entry(domain, &amd_iommu_pd_list, list)
|
||||
- domain_flush_tlb(domain);
|
||||
- spin_unlock_irqrestore(&amd_iommu_pd_lock, flags);
|
||||
+ /* First flush TLB of all domains which were added to flush queue */
|
||||
+ for (idx = 0; idx < queue->next; ++idx) {
|
||||
+ struct flush_queue_entry *entry;
|
||||
+
|
||||
+ entry = queue->entries + idx;
|
||||
+
|
||||
+ /*
|
||||
+ * There might be cases where multiple IOVA entries for the
|
||||
+ * same domain are queued in the flush queue. To avoid
|
||||
+ * flushing the same domain again, we check whether the
|
||||
+ * flag is set or not. This improves the efficiency of
|
||||
+ * flush operation.
|
||||
+ */
|
||||
+ if (!entry->dma_dom->domain.already_flushed) {
|
||||
+ entry->dma_dom->domain.already_flushed = true;
|
||||
+ domain_flush_tlb(&entry->dma_dom->domain);
|
||||
+ }
|
||||
+ }
|
||||
|
||||
/* Wait until flushes have completed */
|
||||
domain_flush_complete(NULL);
|
||||
@@ -2289,6 +2300,8 @@ static void queue_add(struct dma_ops_domain *dma_dom,
|
||||
pages = __roundup_pow_of_two(pages);
|
||||
address >>= PAGE_SHIFT;
|
||||
|
||||
+ dma_dom->domain.already_flushed = false;
|
||||
+
|
||||
queue = get_cpu_ptr(&flush_queue);
|
||||
spin_lock_irqsave(&queue->lock, flags);
|
||||
|
||||
diff --git a/drivers/iommu/amd_iommu_types.h b/drivers/iommu/amd_iommu_types.h
|
||||
index 4de8f41..4f5519d 100644
|
||||
--- a/drivers/iommu/amd_iommu_types.h
|
||||
+++ b/drivers/iommu/amd_iommu_types.h
|
||||
@@ -454,6 +454,8 @@ struct protection_domain {
|
||||
bool updated; /* complete domain flush required */
|
||||
unsigned dev_cnt; /* devices assigned to this domain */
|
||||
unsigned dev_iommu[MAX_IOMMUS]; /* per-IOMMU reference count */
|
||||
+ bool already_flushed; /* flag to avoid flushing the same domain again
|
||||
+ in a single invocation of __queue_flush() */
|
||||
};
|
||||
|
||||
/*
|
||||
-64
@@ -1,64 +0,0 @@
|
||||
From 2a00932f082aff93c3a55426e0c7af6d0ec03997 Mon Sep 17 00:00:00 2001
|
||||
From: Matthew Leach <matthew@mattleach.net>
|
||||
Date: Fri, 8 Jul 2016 09:04:27 -0300
|
||||
Subject: [PATCH] [media] media: usbtv: prevent access to free'd resources
|
||||
|
||||
When disconnecting the usbtv device, the sound card is unregistered
|
||||
from ALSA and the snd member of the usbtv struct is set to NULL. If
|
||||
the usbtv snd_trigger work is running, this can cause a race condition
|
||||
where the kernel will attempt to access free'd resources, shown in
|
||||
[1].
|
||||
|
||||
This patch fixes the disconnection code by cancelling any snd_trigger
|
||||
work before unregistering the sound card from ALSA and checking that
|
||||
the snd member still exists in the work function.
|
||||
|
||||
[1]:
|
||||
usb 3-1.2: USB disconnect, device number 6
|
||||
BUG: unable to handle kernel NULL pointer dereference at 0000000000000008
|
||||
IP: [<ffffffff81093850>] process_one_work+0x30/0x480
|
||||
PGD 405bbf067 PUD 405bbe067 PMD 0
|
||||
Call Trace:
|
||||
[<ffffffff81093ce8>] worker_thread+0x48/0x4e0
|
||||
[<ffffffff81093ca0>] ? process_one_work+0x480/0x480
|
||||
[<ffffffff81093ca0>] ? process_one_work+0x480/0x480
|
||||
[<ffffffff81099998>] kthread+0xd8/0xf0
|
||||
[<ffffffff815c73c2>] ret_from_fork+0x22/0x40
|
||||
[<ffffffff810998c0>] ? kthread_worker_fn+0x170/0x170
|
||||
---[ end trace 0f3dac5c1a38e610 ]---
|
||||
|
||||
Signed-off-by: Matthew Leach <matthew@mattleach.net>
|
||||
Tested-by: Peter Sutton <foxxy@foxdogstudios.com>
|
||||
Cc: stable@vger.kernel.org
|
||||
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
|
||||
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
|
||||
---
|
||||
drivers/media/usb/usbtv/usbtv-audio.c | 5 +++++
|
||||
1 file changed, 5 insertions(+)
|
||||
|
||||
diff --git a/drivers/media/usb/usbtv/usbtv-audio.c b/drivers/media/usb/usbtv/usbtv-audio.c
|
||||
index d4b4db3..1965ff1 100644
|
||||
--- a/drivers/media/usb/usbtv/usbtv-audio.c
|
||||
+++ b/drivers/media/usb/usbtv/usbtv-audio.c
|
||||
@@ -292,6 +292,9 @@ static void snd_usbtv_trigger(struct work_struct *work)
|
||||
{
|
||||
struct usbtv *chip = container_of(work, struct usbtv, snd_trigger);
|
||||
|
||||
+ if (!chip->snd)
|
||||
+ return;
|
||||
+
|
||||
if (atomic_read(&chip->snd_stream))
|
||||
usbtv_audio_start(chip);
|
||||
else
|
||||
@@ -392,6 +395,8 @@ err:
|
||||
|
||||
void usbtv_audio_free(struct usbtv *usbtv)
|
||||
{
|
||||
+ cancel_work_sync(&usbtv->snd_trigger);
|
||||
+
|
||||
if (usbtv->snd && usbtv->udev) {
|
||||
snd_card_free(usbtv->snd);
|
||||
usbtv->snd = NULL;
|
||||
--
|
||||
2.9.2
|
||||
|
||||
@@ -1,13 +0,0 @@
|
||||
diff --git a/drivers/media/video/pwc/pwc-if.c b/drivers/media/video/pwc/pwc-if.c
|
||||
index f976df4..32c883b 100644
|
||||
--- a/drivers/media/usb/pwc/pwc-if.c
|
||||
+++ b/drivers/media/usb/pwc/pwc-if.c
|
||||
@@ -119,7 +119,7 @@ static void usb_pwc_disconnect(struct us
|
||||
static void pwc_isoc_cleanup(struct pwc_device *pdev);
|
||||
|
||||
static struct usb_driver pwc_driver = {
|
||||
- .name = "Philips webcam", /* name */
|
||||
+ .name = "pwc", /* name */
|
||||
.id_table = pwc_device_table,
|
||||
.probe = usb_pwc_probe, /* probe() */
|
||||
.disconnect = usb_pwc_disconnect, /* disconnect() */
|
||||
-54
@@ -1,54 +0,0 @@
|
||||
From 126f40298446a82116e1f92a1aaf72b8c8228fae Mon Sep 17 00:00:00 2001
|
||||
From: Sakari Ailus <sakari.ailus@linux.intel.com>
|
||||
Date: Wed, 11 May 2016 18:44:32 -0300
|
||||
Subject: [PATCH] [media] vb2: core: Skip planes array verification if pb is
|
||||
NULL
|
||||
|
||||
An earlier patch fixing an input validation issue introduced another
|
||||
issue: vb2_core_dqbuf() is called with pb argument value NULL in some
|
||||
cases, causing a NULL pointer dereference. Fix this by skipping the
|
||||
verification as there's nothing to verify.
|
||||
|
||||
Fixes: e7e0c3e26587 ("[media] videobuf2-core: Check user space planes array in dqbuf")
|
||||
|
||||
Signed-off-by: David R <david@unsolicited.net>
|
||||
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
|
||||
Reviewed-by: Hans Verkuil <hans.verkuil@cisco.com>
|
||||
Cc: stable@vger.kernel.org # for v4.4 and later
|
||||
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
|
||||
---
|
||||
drivers/media/v4l2-core/videobuf2-core.c | 10 ++++++----
|
||||
1 file changed, 6 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/drivers/media/v4l2-core/videobuf2-core.c b/drivers/media/v4l2-core/videobuf2-core.c
|
||||
index 9fbcb67..633fc1a 100644
|
||||
--- a/drivers/media/v4l2-core/videobuf2-core.c
|
||||
+++ b/drivers/media/v4l2-core/videobuf2-core.c
|
||||
@@ -1648,7 +1648,7 @@ static int __vb2_get_done_vb(struct vb2_queue *q, struct vb2_buffer **vb,
|
||||
void *pb, int nonblocking)
|
||||
{
|
||||
unsigned long flags;
|
||||
- int ret;
|
||||
+ int ret = 0;
|
||||
|
||||
/*
|
||||
* Wait for at least one buffer to become available on the done_list.
|
||||
@@ -1664,10 +1664,12 @@ static int __vb2_get_done_vb(struct vb2_queue *q, struct vb2_buffer **vb,
|
||||
spin_lock_irqsave(&q->done_lock, flags);
|
||||
*vb = list_first_entry(&q->done_list, struct vb2_buffer, done_entry);
|
||||
/*
|
||||
- * Only remove the buffer from done_list if v4l2_buffer can handle all
|
||||
- * the planes.
|
||||
+ * Only remove the buffer from done_list if all planes can be
|
||||
+ * handled. Some cases such as V4L2 file I/O and DVB have pb
|
||||
+ * == NULL; skip the check then as there's nothing to verify.
|
||||
*/
|
||||
- ret = call_bufop(q, verify_planes_array, *vb, pb);
|
||||
+ if (pb)
|
||||
+ ret = call_bufop(q, verify_planes_array, *vb, pb);
|
||||
if (!ret)
|
||||
list_del(&(*vb)->done_entry);
|
||||
spin_unlock_irqrestore(&q->done_lock, flags);
|
||||
--
|
||||
2.9.2
|
||||
|
||||
-57
@@ -1,57 +0,0 @@
|
||||
From 83934b75c368f529d084815c463a7ef781dc9751 Mon Sep 17 00:00:00 2001
|
||||
From: Sakari Ailus <sakari.ailus@linux.intel.com>
|
||||
Date: Sun, 3 Apr 2016 16:31:03 -0300
|
||||
Subject: [PATCH] [media] videobuf2-v4l2: Verify planes array in buffer
|
||||
dequeueing
|
||||
|
||||
When a buffer is being dequeued using VIDIOC_DQBUF IOCTL, the exact buffer
|
||||
which will be dequeued is not known until the buffer has been removed from
|
||||
the queue. The number of planes is specific to a buffer, not to the queue.
|
||||
|
||||
This does lead to the situation where multi-plane buffers may be requested
|
||||
and queued with n planes, but VIDIOC_DQBUF IOCTL may be passed an argument
|
||||
struct with fewer planes.
|
||||
|
||||
__fill_v4l2_buffer() however uses the number of planes from the dequeued
|
||||
videobuf2 buffer, overwriting kernel memory (the m.planes array allocated
|
||||
in video_usercopy() in v4l2-ioctl.c) if the user provided fewer
|
||||
planes than the dequeued buffer had. Oops!
|
||||
|
||||
Fixes: b0e0e1f83de3 ("[media] media: videobuf2: Prepare to divide videobuf2")
|
||||
|
||||
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
|
||||
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
|
||||
Cc: stable@vger.kernel.org # for v4.4 and later
|
||||
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
|
||||
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
|
||||
---
|
||||
drivers/media/v4l2-core/videobuf2-v4l2.c | 6 ++++++
|
||||
1 file changed, 6 insertions(+)
|
||||
|
||||
diff --git a/drivers/media/v4l2-core/videobuf2-v4l2.c b/drivers/media/v4l2-core/videobuf2-v4l2.c
|
||||
index 0b1b8c7..7f366f1 100644
|
||||
--- a/drivers/media/v4l2-core/videobuf2-v4l2.c
|
||||
+++ b/drivers/media/v4l2-core/videobuf2-v4l2.c
|
||||
@@ -74,6 +74,11 @@ static int __verify_planes_array(struct vb2_buffer *vb, const struct v4l2_buffer
|
||||
return 0;
|
||||
}
|
||||
|
||||
+static int __verify_planes_array_core(struct vb2_buffer *vb, const void *pb)
|
||||
+{
|
||||
+ return __verify_planes_array(vb, pb);
|
||||
+}
|
||||
+
|
||||
/**
|
||||
* __verify_length() - Verify that the bytesused value for each plane fits in
|
||||
* the plane length and that the data offset doesn't exceed the bytesused value.
|
||||
@@ -437,6 +442,7 @@ static int __fill_vb2_buffer(struct vb2_buffer *vb,
|
||||
}
|
||||
|
||||
static const struct vb2_buf_ops v4l2_buf_ops = {
|
||||
+ .verify_planes_array = __verify_planes_array_core,
|
||||
.fill_user_buffer = __fill_v4l2_buffer,
|
||||
.fill_vb2_buffer = __fill_vb2_buffer,
|
||||
.copy_timestamp = __copy_timestamp,
|
||||
--
|
||||
2.9.2
|
||||
|
||||
-59
@@ -1,59 +0,0 @@
|
||||
From d9083160c2f6ee456ea867ea2279c1fc6124e56f Mon Sep 17 00:00:00 2001
|
||||
From: Sumit Saxena <sumit.saxena@broadcom.com>
|
||||
Date: Fri, 8 Jul 2016 03:30:16 -0700
|
||||
Subject: [PATCH] megaraid_sas: Do not fire MR_DCMD_PD_LIST_QUERY to
|
||||
controllers which do not support it
|
||||
|
||||
There was an issue reported by Lucz Geza on Dell Perc 6i. As per issue
|
||||
reported, megaraid_sas driver goes into an infinite error reporting loop
|
||||
as soon as there is a change in the status of one of the
|
||||
arrays (degrade, resync online etc ). Below are the error logs reported
|
||||
continuously-
|
||||
|
||||
Jun 25 08:49:30 ns8 kernel: [ 757.757017] megaraid_sas 0000:02:00.0: DCMD failed/not supported by firmware: megasas_get_pd_list 4115
|
||||
Jun 25 08:49:30 ns8 kernel: [ 757.778017] megaraid_sas 0000:02:00.0: DCMD failed/not supported by firmware: megasas_get_pd_list 4115
|
||||
Jun 25 08:49:30 ns8 kernel: [ 757.799017] megaraid_sas 0000:02:00.0: DCMD failed/not supported by firmware: megasas_get_pd_list 4115
|
||||
Jun 25 08:49:30 ns8 kernel: [ 757.820018] megaraid_sas 0000:02:00.0: DCMD failed/not supported by firmware: megasas_get_pd_list 4115
|
||||
Jun 25 08:49:30 ns8 kernel: [ 757.841018] megaraid_sas 0000:02:00.0: DCMD failed/not supported by firmware: megasas_get_pd_list 4115
|
||||
|
||||
This issue is very much specific to controllers which do not support
|
||||
DCMD- MR_DCMD_PD_LIST_QUERY. In case of any hotplugging/rescanning of
|
||||
drives, AEN thread will be scheduled by driver and fire DCMD-
|
||||
MR_DCMD_PD_LIST_QUERY and if this DCMD is failed then driver will fail
|
||||
this event processing and will not go ahead for further events. This
|
||||
will cause infinite loop of same event getting retried infinitely and
|
||||
causing above mentioned logs.
|
||||
|
||||
Fix for this problem is: not to fire DCMD MR_DCMD_PD_LIST_QUERY for
|
||||
controllers which do not support it and send DCMD SUCCESS status to AEN
|
||||
function so that it can go ahead with other event processing.
|
||||
|
||||
Reported-by: Lucz Geza <geza@lucz.com>
|
||||
Cc: <stable@vger.kernel.org>
|
||||
Signed-off-by: Sumit Saxena <sumit.saxena@broadcom.com>
|
||||
Reviewed-by: Tomas Henzl <thenzl@redhat.com>
|
||||
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
|
||||
---
|
||||
drivers/scsi/megaraid/megaraid_sas_base.c | 6 ++++++
|
||||
1 file changed, 6 insertions(+)
|
||||
|
||||
diff --git a/drivers/scsi/megaraid/megaraid_sas_base.c b/drivers/scsi/megaraid/megaraid_sas_base.c
|
||||
index f4b0690..2dab3dc 100644
|
||||
--- a/drivers/scsi/megaraid/megaraid_sas_base.c
|
||||
+++ b/drivers/scsi/megaraid/megaraid_sas_base.c
|
||||
@@ -4079,6 +4079,12 @@ megasas_get_pd_list(struct megasas_instance *instance)
|
||||
struct MR_PD_ADDRESS *pd_addr;
|
||||
dma_addr_t ci_h = 0;
|
||||
|
||||
+ if (instance->pd_list_not_supported) {
|
||||
+ dev_info(&instance->pdev->dev, "MR_DCMD_PD_LIST_QUERY "
|
||||
+ "not supported by firmware\n");
|
||||
+ return ret;
|
||||
+ }
|
||||
+
|
||||
cmd = megasas_get_cmd(instance);
|
||||
|
||||
if (!cmd) {
|
||||
--
|
||||
2.9.2
|
||||
|
||||
-43
@@ -1,43 +0,0 @@
|
||||
From 1bea0512c3394965de28a152149b90afd686fae5 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <zajec5@gmail.com>
|
||||
Date: Mon, 11 Jul 2016 23:01:36 +0200
|
||||
Subject: [PATCH] bcma: add PCI ID for Foxconn's BCM43142 device
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
After discovering there are 2 very different 14e4:4365 PCI devices we
|
||||
made ID tables less generic. Back then we believed there are only 2 such
|
||||
devices:
|
||||
1) 14e4:4365 1028:0016 with SoftMAC BCM43142 chipset
|
||||
2) 14e4:4365 14e4:4365 with FullMAC BCM4366 chipset
|
||||
|
||||
>From the recent report it appears there is also 14e4:4365 105b:e092
|
||||
which should be claimed by bcma. Add back support for it.
|
||||
|
||||
Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=121881
|
||||
Fixes: 515b399c9a20 ("bcma: claim only 14e4:4365 PCI Dell card with SoftMAC BCM43142")
|
||||
Reported-by: Igor Mammedov <imammedo@redhat.com>
|
||||
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
|
||||
Cc: Stable <stable@vger.kernel.org> [4.6+]
|
||||
Tested-by: Igor Mammedov <imammedo@redhat.com>
|
||||
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
|
||||
---
|
||||
drivers/bcma/host_pci.c | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/drivers/bcma/host_pci.c b/drivers/bcma/host_pci.c
|
||||
index cae5385..bd46569 100644
|
||||
--- a/drivers/bcma/host_pci.c
|
||||
+++ b/drivers/bcma/host_pci.c
|
||||
@@ -295,6 +295,7 @@ static const struct pci_device_id bcma_pci_bridge_tbl[] = {
|
||||
{ PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, 0x4359) },
|
||||
{ PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, 0x4360) },
|
||||
{ PCI_DEVICE_SUB(PCI_VENDOR_ID_BROADCOM, 0x4365, PCI_VENDOR_ID_DELL, 0x0016) },
|
||||
+ { PCI_DEVICE_SUB(PCI_VENDOR_ID_BROADCOM, 0x4365, PCI_VENDOR_ID_FOXCONN, 0xe092) },
|
||||
{ PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, 0x43a0) },
|
||||
{ PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, 0x43a9) },
|
||||
{ PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, 0x43aa) },
|
||||
--
|
||||
2.9.2
|
||||
|
||||
-61
@@ -1,61 +0,0 @@
|
||||
From 82bc9ab6a8f577d2174a736c33f3d4ecf7d9ef47 Mon Sep 17 00:00:00 2001
|
||||
From: Arend Van Spriel <arend.vanspriel@broadcom.com>
|
||||
Date: Fri, 15 Jul 2016 12:16:12 +0200
|
||||
Subject: [PATCH] brcmfmac: restore stopping netdev queue when bus clogs up
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
When the host-interface bus has hard time handling transmit packets
|
||||
it informs higher layer about this and it would stop the netdev
|
||||
queue when needed. However, since commit 9cd18359d31e ("brcmfmac:
|
||||
Make FWS queueing configurable.") this was broken. With this patch
|
||||
the behaviour is restored.
|
||||
|
||||
Cc: stable@vger.kernel.org # v4.5, v4.6, v4.7
|
||||
Fixes: 9cd18359d31e ("brcmfmac: Make FWS queueing configurable.")
|
||||
Tested-by: Per Förlin <per.forlin@gmail.com>
|
||||
Reviewed-by: Hante Meuleman <hante.meuleman@broadcom.com>
|
||||
Reviewed-by: Pieter-Paul Giesberts <pieter-paul.giesberts@broadcom.com>
|
||||
Reviewed-by: Franky Lin <franky.lin@broadcom.com>
|
||||
Signed-off-by: Arend van Spriel <arend.vanspriel@broadcom.com>
|
||||
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
|
||||
---
|
||||
.../broadcom/brcm80211/brcmfmac/fwsignal.c | 22 +++++++++++++++++-----
|
||||
1 file changed, 17 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/fwsignal.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/fwsignal.c
|
||||
index cd221ab..9f9024a 100644
|
||||
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/fwsignal.c
|
||||
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/fwsignal.c
|
||||
@@ -2469,10 +2469,22 @@ void brcmf_fws_bustxfail(struct brcmf_fws_info *fws, struct sk_buff *skb)
|
||||
void brcmf_fws_bus_blocked(struct brcmf_pub *drvr, bool flow_blocked)
|
||||
{
|
||||
struct brcmf_fws_info *fws = drvr->fws;
|
||||
+ struct brcmf_if *ifp;
|
||||
+ int i;
|
||||
|
||||
- fws->bus_flow_blocked = flow_blocked;
|
||||
- if (!flow_blocked)
|
||||
- brcmf_fws_schedule_deq(fws);
|
||||
- else
|
||||
- fws->stats.bus_flow_block++;
|
||||
+ if (fws->avoid_queueing) {
|
||||
+ for (i = 0; i < BRCMF_MAX_IFS; i++) {
|
||||
+ ifp = drvr->iflist[i];
|
||||
+ if (!ifp || !ifp->ndev)
|
||||
+ continue;
|
||||
+ brcmf_txflowblock_if(ifp, BRCMF_NETIF_STOP_REASON_FLOW,
|
||||
+ flow_blocked);
|
||||
+ }
|
||||
+ } else {
|
||||
+ fws->bus_flow_blocked = flow_blocked;
|
||||
+ if (!flow_blocked)
|
||||
+ brcmf_fws_schedule_deq(fws);
|
||||
+ else
|
||||
+ fws->stats.bus_flow_block++;
|
||||
+ }
|
||||
}
|
||||
--
|
||||
2.9.2
|
||||
|
||||
@@ -0,0 +1,85 @@
|
||||
|
||||
Make defines psd specific so they dont redefine in-kernel defines like
|
||||
HASH_SIZE.
|
||||
|
||||
Signed-off-by: Thomas Backlund <tmb@mageia.org>
|
||||
|
||||
|
||||
include/linux/netfilter_ipv4/ipt_psd.h | 14 +++++++-------
|
||||
net/ipv4/netfilter/ipt_psd.c | 14 +++++++-------
|
||||
2 files changed, 14 insertions(+), 14 deletions(-)
|
||||
|
||||
diff -Nurp linux-4.9.5-psd/include/linux/netfilter_ipv4/ipt_psd.h linux-4.9.5-psd-fix/include/linux/netfilter_ipv4/ipt_psd.h
|
||||
--- linux-4.9.5-psd/include/linux/netfilter_ipv4/ipt_psd.h 2017-01-20 21:47:19.788931403 +0200
|
||||
+++ linux-4.9.5-psd-fix/include/linux/netfilter_ipv4/ipt_psd.h 2017-01-20 21:58:09.995871253 +0200
|
||||
@@ -21,14 +21,14 @@
|
||||
#define SCAN_DELAY_THRESHOLD (300) /* old usage of HZ here was erroneously and broke under uml */
|
||||
|
||||
/*
|
||||
- * Keep track of up to LIST_SIZE source addresses, using a hash table of
|
||||
- * HASH_SIZE entries for faster lookups, but limiting hash collisions to
|
||||
- * HASH_MAX source addresses per the same hash value.
|
||||
+ * Keep track of up to PSD_LIST_SIZE source addresses, using a hash table of
|
||||
+ * PSD_HASH_SIZE entries for faster lookups, but limiting hash collisions to
|
||||
+ * PSD_HASH_MAX source addresses per the same hash value.
|
||||
*/
|
||||
-#define LIST_SIZE 0x100
|
||||
-#define HASH_LOG 9
|
||||
-#define HASH_SIZE (1 << HASH_LOG)
|
||||
-#define HASH_MAX 0x10
|
||||
+#define PSD_LIST_SIZE 0x100
|
||||
+#define PSD_HASH_LOG 9
|
||||
+#define PSD_HASH_SIZE (1 << PSD_HASH_LOG)
|
||||
+#define PSD_HASH_MAX 0x10
|
||||
|
||||
struct ipt_psd_info {
|
||||
unsigned int weight_threshold;
|
||||
diff -Nurp linux-4.9.5-psd/net/ipv4/netfilter/ipt_psd.c linux-4.9.5-psd-fix/net/ipv4/netfilter/ipt_psd.c
|
||||
--- linux-4.9.5-psd/net/ipv4/netfilter/ipt_psd.c 2017-01-20 21:47:19.792931402 +0200
|
||||
+++ linux-4.9.5-psd-fix/net/ipv4/netfilter/ipt_psd.c 2017-01-20 21:58:09.998871253 +0200
|
||||
@@ -74,8 +74,8 @@ struct host {
|
||||
*/
|
||||
static struct {
|
||||
spinlock_t lock;
|
||||
- struct host list[LIST_SIZE]; /* List of source addresses */
|
||||
- struct host *hash[HASH_SIZE]; /* Hash: pointers into the list */
|
||||
+ struct host list[PSD_LIST_SIZE]; /* List of source addresses */
|
||||
+ struct host *hash[PSD_HASH_SIZE]; /* Hash: pointers into the list */
|
||||
int index; /* Oldest entry to be replaced */
|
||||
} state;
|
||||
|
||||
@@ -91,9 +91,9 @@ static inline int hashfunc(struct in_add
|
||||
hash = 0;
|
||||
do {
|
||||
hash ^= value;
|
||||
- } while ((value >>= HASH_LOG));
|
||||
+ } while ((value >>= PSD_HASH_LOG));
|
||||
|
||||
- return hash & (HASH_SIZE - 1);
|
||||
+ return hash & (PSD_HASH_SIZE - 1);
|
||||
}
|
||||
|
||||
static bool
|
||||
@@ -245,11 +245,11 @@ ipt_psd_match(const struct sk_buff *pskb
|
||||
/* Got too many source addresses with the same hash value? Then remove the
|
||||
* oldest one from the hash table, so that they can't take too much of our
|
||||
* CPU time even with carefully chosen spoofed IP addresses. */
|
||||
- if (count >= HASH_MAX && last) last->next = NULL;
|
||||
+ if (count >= PSD_HASH_MAX && last) last->next = NULL;
|
||||
|
||||
/* We're going to re-use the oldest list entry, so remove it from the hash
|
||||
* table first (if it is really already in use, and isn't removed from the
|
||||
- * hash table already because of the HASH_MAX check above). */
|
||||
+ * hash table already because of the PSD_HASH_MAX check above). */
|
||||
|
||||
/* First, find it */
|
||||
if (state.list[state.index].src_addr.s_addr)
|
||||
@@ -273,7 +273,7 @@ ipt_psd_match(const struct sk_buff *pskb
|
||||
|
||||
/* Get our list entry */
|
||||
curr = &state.list[state.index++];
|
||||
- if (state.index >= LIST_SIZE) state.index = 0;
|
||||
+ if (state.index >= PSD_LIST_SIZE) state.index = 0;
|
||||
|
||||
/* Link it into the hash table */
|
||||
head = &state.hash[hash];
|
||||
-42
@@ -1,42 +0,0 @@
|
||||
From: Luca Coelho <luca-XPOmlcxoEMv1KXRcyAk9cg@public.gmane.org>
|
||||
Subject: [PATCH 13/56] iwlwifi: add new 8260 PCI IDs
|
||||
Date: Wed, 6 Jul 2016 13:40:08 +0300
|
||||
|
||||
From: Oren Givon <oren.givon-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
|
||||
|
||||
Add 3 new 8260 series PCI IDs:
|
||||
- (0x24F3, 0x10B0)
|
||||
- (0x24F3, 0xD0B0)
|
||||
- (0x24F3, 0xB0B0)
|
||||
|
||||
CC: <stable-u79uwXL29TY76Z2rM5mHXA@public.gmane.org> [4.1+]
|
||||
Signed-off-by: Oren Givon <oren.givon-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
|
||||
Signed-off-by: David Spinadel <david.spinadel-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
|
||||
Signed-off-by: Luca Coelho <luciano.coelho-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
|
||||
---
|
||||
drivers/net/wireless/intel/iwlwifi/pcie/drv.c | 3 +++
|
||||
1 file changed, 3 insertions(+)
|
||||
|
||||
diff --git a/drivers/net/wireless/intel/iwlwifi/pcie/drv.c b/drivers/net/wireless/intel/iwlwifi/pcie/drv.c
|
||||
index a588b05..1cae19d 100644
|
||||
--- a/drivers/net/wireless/intel/iwlwifi/pcie/drv.c
|
||||
+++ b/drivers/net/wireless/intel/iwlwifi/pcie/drv.c
|
||||
@@ -433,6 +433,7 @@ static const struct pci_device_id iwl_hw_card_ids[] = {
|
||||
/* 8000 Series */
|
||||
{IWL_PCI_DEVICE(0x24F3, 0x0010, iwl8260_2ac_cfg)},
|
||||
{IWL_PCI_DEVICE(0x24F3, 0x1010, iwl8260_2ac_cfg)},
|
||||
+ {IWL_PCI_DEVICE(0x24F3, 0x10B0, iwl8260_2ac_cfg)},
|
||||
{IWL_PCI_DEVICE(0x24F3, 0x0130, iwl8260_2ac_cfg)},
|
||||
{IWL_PCI_DEVICE(0x24F3, 0x1130, iwl8260_2ac_cfg)},
|
||||
{IWL_PCI_DEVICE(0x24F3, 0x0132, iwl8260_2ac_cfg)},
|
||||
@@ -454,6 +455,8 @@ static const struct pci_device_id iwl_hw_card_ids[] = {
|
||||
{IWL_PCI_DEVICE(0x24F3, 0xD010, iwl8260_2ac_cfg)},
|
||||
{IWL_PCI_DEVICE(0x24F3, 0xC050, iwl8260_2ac_cfg)},
|
||||
{IWL_PCI_DEVICE(0x24F3, 0xD050, iwl8260_2ac_cfg)},
|
||||
+ {IWL_PCI_DEVICE(0x24F3, 0xD0B0, iwl8260_2ac_cfg)},
|
||||
+ {IWL_PCI_DEVICE(0x24F3, 0xB0B0, iwl8260_2ac_cfg)},
|
||||
{IWL_PCI_DEVICE(0x24F3, 0x8010, iwl8260_2ac_cfg)},
|
||||
{IWL_PCI_DEVICE(0x24F3, 0x8110, iwl8260_2ac_cfg)},
|
||||
{IWL_PCI_DEVICE(0x24F3, 0x9010, iwl8260_2ac_cfg)},
|
||||
--
|
||||
2.8.1
|
||||
@@ -1,48 +0,0 @@
|
||||
From: Luca Coelho <luca@coelho.fi>
|
||||
Subject: [PATCH 14/56] iwlwifi: add new 8265
|
||||
Date: Wed, 6 Jul 2016 13:40:09 +0300
|
||||
|
||||
From: Oren Givon <oren.givon@intel.com>
|
||||
|
||||
Add 6 new 8265 series PCI IDs:
|
||||
- (0x24FD, 0x1130)
|
||||
- (0x24FD, 0x0130)
|
||||
- (0x24FD, 0x0910)
|
||||
- (0x24FD, 0x0930)
|
||||
- (0x24FD, 0x0950)
|
||||
- (0x24FD, 0x0850)
|
||||
|
||||
CC: <stable@vger.kernel.org> [4.6+]
|
||||
Signed-off-by: Oren Givon <oren.givon@intel.com>
|
||||
Signed-off-by: David Spinadel <david.spinadel@intel.com>
|
||||
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
|
||||
---
|
||||
drivers/net/wireless/intel/iwlwifi/pcie/drv.c | 6 ++++++
|
||||
1 file changed, 6 insertions(+)
|
||||
|
||||
diff --git a/drivers/net/wireless/intel/iwlwifi/pcie/drv.c b/drivers/net/wireless/intel/iwlwifi/pcie/drv.c
|
||||
index 1cae19d..6f020e4 100644
|
||||
--- a/drivers/net/wireless/intel/iwlwifi/pcie/drv.c
|
||||
+++ b/drivers/net/wireless/intel/iwlwifi/pcie/drv.c
|
||||
@@ -484,6 +484,8 @@ static const struct pci_device_id iwl_hw_card_ids[] = {
|
||||
{IWL_PCI_DEVICE(0x24FD, 0x0010, iwl8265_2ac_cfg)},
|
||||
{IWL_PCI_DEVICE(0x24FD, 0x0110, iwl8265_2ac_cfg)},
|
||||
{IWL_PCI_DEVICE(0x24FD, 0x1110, iwl8265_2ac_cfg)},
|
||||
+ {IWL_PCI_DEVICE(0x24FD, 0x1130, iwl8265_2ac_cfg)},
|
||||
+ {IWL_PCI_DEVICE(0x24FD, 0x0130, iwl8265_2ac_cfg)},
|
||||
{IWL_PCI_DEVICE(0x24FD, 0x1010, iwl8265_2ac_cfg)},
|
||||
{IWL_PCI_DEVICE(0x24FD, 0x0050, iwl8265_2ac_cfg)},
|
||||
{IWL_PCI_DEVICE(0x24FD, 0x0150, iwl8265_2ac_cfg)},
|
||||
@@ -494,6 +496,10 @@ static const struct pci_device_id iwl_hw_card_ids[] = {
|
||||
{IWL_PCI_DEVICE(0x24FD, 0x0810, iwl8265_2ac_cfg)},
|
||||
{IWL_PCI_DEVICE(0x24FD, 0x9110, iwl8265_2ac_cfg)},
|
||||
{IWL_PCI_DEVICE(0x24FD, 0x8130, iwl8265_2ac_cfg)},
|
||||
+ {IWL_PCI_DEVICE(0x24FD, 0x0910, iwl8265_2ac_cfg)},
|
||||
+ {IWL_PCI_DEVICE(0x24FD, 0x0930, iwl8265_2ac_cfg)},
|
||||
+ {IWL_PCI_DEVICE(0x24FD, 0x0950, iwl8265_2ac_cfg)},
|
||||
+ {IWL_PCI_DEVICE(0x24FD, 0x0850, iwl8265_2ac_cfg)},
|
||||
|
||||
/* 9000 Series */
|
||||
{IWL_PCI_DEVICE(0x2526, 0x0000, iwl9260_2ac_cfg)},
|
||||
--
|
||||
2.8.1
|
||||
-58
@@ -1,58 +0,0 @@
|
||||
From: Luca Coelho <luca-XPOmlcxoEMv1KXRcyAk9cg@public.gmane.org>
|
||||
Subject: [PATCH 28/56] iwlwifi: pcie: enable interrupts before releasing the NIC's CPU
|
||||
Date: Wed, 6 Jul 2016 13:40:23 +0300
|
||||
|
||||
From: Emmanuel Grumbach <emmanuel.grumbach-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
|
||||
|
||||
The NIC's CPU gets started after the firmware has been
|
||||
written to its memory. The first thing it does is to
|
||||
send an interrupt to let the driver know that it is
|
||||
running. In order to get that interrupt, the driver needs
|
||||
to make sure it is not masked. Of course, the interrupt
|
||||
needs to be enabled in the driver before the CPU starts to
|
||||
run.
|
||||
I mistakenly inversed those two steps leading to races
|
||||
which prevented the driver from getting the alive interrupt
|
||||
from the firmware.
|
||||
Fix that.
|
||||
|
||||
Cc: <stable-u79uwXL29TY76Z2rM5mHXA@public.gmane.org> [4.5+]
|
||||
Fixes: a6bd005fe92 ("iwlwifi: pcie: fix RF-Kill vs. firmware load race")
|
||||
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
|
||||
Signed-off-by: Luca Coelho <luciano.coelho-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
|
||||
---
|
||||
drivers/net/wireless/intel/iwlwifi/pcie/trans.c | 5 ++++-
|
||||
1 file changed, 4 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/drivers/net/wireless/intel/iwlwifi/pcie/trans.c b/drivers/net/wireless/intel/iwlwifi/pcie/trans.c
|
||||
index 3badebb..ac623c3 100644
|
||||
--- a/drivers/net/wireless/intel/iwlwifi/pcie/trans.c
|
||||
+++ b/drivers/net/wireless/intel/iwlwifi/pcie/trans.c
|
||||
@@ -801,6 +801,8 @@ static int iwl_pcie_load_cpu_sections_8000(struct iwl_trans *trans,
|
||||
|
||||
*first_ucode_section = last_read_idx;
|
||||
|
||||
+ iwl_enable_interrupts(trans);
|
||||
+
|
||||
if (cpu == 1)
|
||||
iwl_write_direct32(trans, FH_UCODE_LOAD_STATUS, 0xFFFF);
|
||||
else
|
||||
@@ -980,6 +982,8 @@ static int iwl_pcie_load_given_ucode(struct iwl_trans *trans,
|
||||
iwl_pcie_apply_destination(trans);
|
||||
}
|
||||
|
||||
+ iwl_enable_interrupts(trans);
|
||||
+
|
||||
/* release CPU reset */
|
||||
iwl_write32(trans, CSR_RESET, 0);
|
||||
|
||||
@@ -1215,7 +1219,6 @@ static int iwl_trans_pcie_start_fw(struct iwl_trans *trans,
|
||||
ret = iwl_pcie_load_given_ucode_8000(trans, fw);
|
||||
else
|
||||
ret = iwl_pcie_load_given_ucode(trans, fw);
|
||||
- iwl_enable_interrupts(trans);
|
||||
|
||||
/* re-check RF-Kill state since we may have missed the interrupt */
|
||||
hw_rfkill = iwl_is_rfkill_set(trans);
|
||||
--
|
||||
2.8.1
|
||||
-195
@@ -1,195 +0,0 @@
|
||||
From: Luca Coelho <luca@coelho.fi>
|
||||
Subject: [PATCH 48/56] iwlwifi: pcie: fix a race in firmware loading flow
|
||||
Date: Wed, 6 Jul 2016 13:40:43 +0300
|
||||
|
||||
From: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
|
||||
|
||||
Upon firmware load interrupt (FH_TX), the ISR re-enables the
|
||||
firmware load interrupt only to avoid races with other
|
||||
flows as described in the commit below. When the firmware
|
||||
is completely loaded, the thread that is loading the
|
||||
firmware will enable all the interrupts to make sure that
|
||||
the driver gets the ALIVE interrupt.
|
||||
The problem with that is that the thread that is loading
|
||||
the firmware is actually racing against the ISR and we can
|
||||
get to the following situation:
|
||||
|
||||
CPU0 CPU1
|
||||
iwl_pcie_load_given_ucode
|
||||
...
|
||||
iwl_pcie_load_firmware_chunk
|
||||
wait_for_interrupt
|
||||
<interrupt>
|
||||
ISR handles CSR_INT_BIT_FH_TX
|
||||
ISR wakes up the thread on CPU0
|
||||
/* enable all the interrupts
|
||||
* to get the ALIVE interrupt
|
||||
*/
|
||||
iwl_enable_interrupts
|
||||
ISR re-enables CSR_INT_BIT_FH_TX only
|
||||
/* start the firmware */
|
||||
iwl_write32(trans, CSR_RESET, 0);
|
||||
|
||||
BUG! ALIVE interrupt will never arrive since it has been
|
||||
masked by CPU1.
|
||||
|
||||
In order to fix that, change the ISR to first check if
|
||||
STATUS_INT_ENABLED is set. If so, re-enable all the
|
||||
interrupts. If STATUS_INT_ENABLED is clear, then we can
|
||||
check what specific interrupt happened and re-enable only
|
||||
that specific interrupt (RFKILL or FH_TX).
|
||||
|
||||
All the credit for the analysis goes to Kirtika who did the
|
||||
actual debugging work.
|
||||
|
||||
Cc: <stable@vger.kernel.org> [4.5+]
|
||||
Fixes: a6bd005fe92 ("iwlwifi: pcie: fix RF-Kill vs. firmware load race")
|
||||
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
|
||||
---
|
||||
drivers/net/wireless/intel/iwlwifi/pcie/internal.h | 21 +++++++++++++++++++--
|
||||
drivers/net/wireless/intel/iwlwifi/pcie/rx.c | 16 +++++++++-------
|
||||
drivers/net/wireless/intel/iwlwifi/pcie/trans.c | 8 --------
|
||||
3 files changed, 28 insertions(+), 17 deletions(-)
|
||||
|
||||
diff --git a/drivers/net/wireless/intel/iwlwifi/pcie/internal.h b/drivers/net/wireless/intel/iwlwifi/pcie/internal.h
|
||||
index f684b9d..54af3da 100644
|
||||
--- a/drivers/net/wireless/intel/iwlwifi/pcie/internal.h
|
||||
+++ b/drivers/net/wireless/intel/iwlwifi/pcie/internal.h
|
||||
@@ -500,7 +500,7 @@ void iwl_pcie_dump_csr(struct iwl_trans *trans);
|
||||
/*****************************************************
|
||||
* Helpers
|
||||
******************************************************/
|
||||
-static inline void iwl_disable_interrupts(struct iwl_trans *trans)
|
||||
+static inline void _iwl_disable_interrupts(struct iwl_trans *trans)
|
||||
{
|
||||
struct iwl_trans_pcie *trans_pcie = IWL_TRANS_GET_PCIE_TRANS(trans);
|
||||
|
||||
@@ -523,7 +523,16 @@ static inline void iwl_disable_interrupts(struct iwl_trans *trans)
|
||||
IWL_DEBUG_ISR(trans, "Disabled interrupts\n");
|
||||
}
|
||||
|
||||
-static inline void iwl_enable_interrupts(struct iwl_trans *trans)
|
||||
+static inline void iwl_disable_interrupts(struct iwl_trans *trans)
|
||||
+{
|
||||
+ struct iwl_trans_pcie *trans_pcie = IWL_TRANS_GET_PCIE_TRANS(trans);
|
||||
+
|
||||
+ spin_lock(&trans_pcie->irq_lock);
|
||||
+ _iwl_disable_interrupts(trans);
|
||||
+ spin_unlock(&trans_pcie->irq_lock);
|
||||
+}
|
||||
+
|
||||
+static inline void _iwl_enable_interrupts(struct iwl_trans *trans)
|
||||
{
|
||||
struct iwl_trans_pcie *trans_pcie = IWL_TRANS_GET_PCIE_TRANS(trans);
|
||||
|
||||
@@ -546,6 +555,14 @@ static inline void iwl_enable_interrupts(struct iwl_trans *trans)
|
||||
}
|
||||
}
|
||||
|
||||
+static inline void iwl_enable_interrupts(struct iwl_trans *trans)
|
||||
+{
|
||||
+ struct iwl_trans_pcie *trans_pcie = IWL_TRANS_GET_PCIE_TRANS(trans);
|
||||
+
|
||||
+ spin_lock(&trans_pcie->irq_lock);
|
||||
+ _iwl_enable_interrupts(trans);
|
||||
+ spin_unlock(&trans_pcie->irq_lock);
|
||||
+}
|
||||
static inline void iwl_enable_hw_int_msk_msix(struct iwl_trans *trans, u32 msk)
|
||||
{
|
||||
struct iwl_trans_pcie *trans_pcie = IWL_TRANS_GET_PCIE_TRANS(trans);
|
||||
diff --git a/drivers/net/wireless/intel/iwlwifi/pcie/rx.c b/drivers/net/wireless/intel/iwlwifi/pcie/rx.c
|
||||
index 0296c29..45f1b7e 100644
|
||||
--- a/drivers/net/wireless/intel/iwlwifi/pcie/rx.c
|
||||
+++ b/drivers/net/wireless/intel/iwlwifi/pcie/rx.c
|
||||
@@ -1535,7 +1535,7 @@ irqreturn_t iwl_pcie_irq_handler(int irq, void *dev_id)
|
||||
* have anything to service
|
||||
*/
|
||||
if (test_bit(STATUS_INT_ENABLED, &trans->status))
|
||||
- iwl_enable_interrupts(trans);
|
||||
+ _iwl_enable_interrupts(trans);
|
||||
spin_unlock(&trans_pcie->irq_lock);
|
||||
lock_map_release(&trans->sync_cmd_lockdep_map);
|
||||
return IRQ_NONE;
|
||||
@@ -1727,15 +1727,17 @@ irqreturn_t iwl_pcie_irq_handler(int irq, void *dev_id)
|
||||
inta & ~trans_pcie->inta_mask);
|
||||
}
|
||||
|
||||
+ spin_lock(&trans_pcie->irq_lock);
|
||||
+ /* only Re-enable all interrupt if disabled by irq */
|
||||
+ if (test_bit(STATUS_INT_ENABLED, &trans->status))
|
||||
+ _iwl_enable_interrupts(trans);
|
||||
/* we are loading the firmware, enable FH_TX interrupt only */
|
||||
- if (handled & CSR_INT_BIT_FH_TX)
|
||||
+ else if (handled & CSR_INT_BIT_FH_TX)
|
||||
iwl_enable_fw_load_int(trans);
|
||||
- /* only Re-enable all interrupt if disabled by irq */
|
||||
- else if (test_bit(STATUS_INT_ENABLED, &trans->status))
|
||||
- iwl_enable_interrupts(trans);
|
||||
/* Re-enable RF_KILL if it occurred */
|
||||
else if (handled & CSR_INT_BIT_RF_KILL)
|
||||
iwl_enable_rfkill_int(trans);
|
||||
+ spin_unlock(&trans_pcie->irq_lock);
|
||||
|
||||
out:
|
||||
lock_map_release(&trans->sync_cmd_lockdep_map);
|
||||
@@ -1799,7 +1801,7 @@ void iwl_pcie_reset_ict(struct iwl_trans *trans)
|
||||
return;
|
||||
|
||||
spin_lock(&trans_pcie->irq_lock);
|
||||
- iwl_disable_interrupts(trans);
|
||||
+ _iwl_disable_interrupts(trans);
|
||||
|
||||
memset(trans_pcie->ict_tbl, 0, ICT_SIZE);
|
||||
|
||||
@@ -1815,7 +1817,7 @@ void iwl_pcie_reset_ict(struct iwl_trans *trans)
|
||||
trans_pcie->use_ict = true;
|
||||
trans_pcie->ict_index = 0;
|
||||
iwl_write32(trans, CSR_INT, trans_pcie->inta_mask);
|
||||
- iwl_enable_interrupts(trans);
|
||||
+ _iwl_enable_interrupts(trans);
|
||||
spin_unlock(&trans_pcie->irq_lock);
|
||||
}
|
||||
|
||||
diff --git a/drivers/net/wireless/intel/iwlwifi/pcie/trans.c b/drivers/net/wireless/intel/iwlwifi/pcie/trans.c
|
||||
index 3b7a414..9e953a4 100644
|
||||
--- a/drivers/net/wireless/intel/iwlwifi/pcie/trans.c
|
||||
+++ b/drivers/net/wireless/intel/iwlwifi/pcie/trans.c
|
||||
@@ -1037,9 +1037,7 @@ static void _iwl_trans_pcie_stop_device(struct iwl_trans *trans, bool low_power)
|
||||
was_hw_rfkill = iwl_is_rfkill_set(trans);
|
||||
|
||||
/* tell the device to stop sending interrupts */
|
||||
- spin_lock(&trans_pcie->irq_lock);
|
||||
iwl_disable_interrupts(trans);
|
||||
- spin_unlock(&trans_pcie->irq_lock);
|
||||
|
||||
/* device going down, Stop using ICT table */
|
||||
iwl_pcie_disable_ict(trans);
|
||||
@@ -1083,9 +1081,7 @@ static void _iwl_trans_pcie_stop_device(struct iwl_trans *trans, bool low_power)
|
||||
* the time, unless the interrupt is ACKed even if the interrupt
|
||||
* should be masked. Re-ACK all the interrupts here.
|
||||
*/
|
||||
- spin_lock(&trans_pcie->irq_lock);
|
||||
iwl_disable_interrupts(trans);
|
||||
- spin_unlock(&trans_pcie->irq_lock);
|
||||
|
||||
/* clear all status bits */
|
||||
clear_bit(STATUS_SYNC_HCMD_ACTIVE, &trans->status);
|
||||
@@ -1578,15 +1574,11 @@ static void iwl_trans_pcie_op_mode_leave(struct iwl_trans *trans)
|
||||
mutex_lock(&trans_pcie->mutex);
|
||||
|
||||
/* disable interrupts - don't enable HW RF kill interrupt */
|
||||
- spin_lock(&trans_pcie->irq_lock);
|
||||
iwl_disable_interrupts(trans);
|
||||
- spin_unlock(&trans_pcie->irq_lock);
|
||||
|
||||
iwl_pcie_apm_stop(trans, true);
|
||||
|
||||
- spin_lock(&trans_pcie->irq_lock);
|
||||
iwl_disable_interrupts(trans);
|
||||
- spin_unlock(&trans_pcie->irq_lock);
|
||||
|
||||
iwl_pcie_disable_ict(trans);
|
||||
|
||||
--
|
||||
2.8.1
|
||||
|
||||
+37
@@ -0,0 +1,37 @@
|
||||
From 22b68b93ae2506bd56ee3bf232a51bc8ab955b56 Mon Sep 17 00:00:00 2001
|
||||
From: Larry Finger <Larry.Finger@lwfinger.net>
|
||||
Date: Mon, 19 Dec 2016 20:38:12 -0600
|
||||
Subject: [PATCH] rtlwifi: Fix kernel oops introduced with commit e49656147359
|
||||
|
||||
With commit e49656147359 {"rtlwifi: Use dev_kfree_skb_irq instead of
|
||||
kfree_skb"), the method used to free an skb was changed because the
|
||||
kfree_skb() was inside a spinlock. What was forgotten is that kfree_skb()
|
||||
guards against a NULL value for the argument. Routine dev_kfree_skb_irq()
|
||||
does not, and a test is needed to prevent kernel panics.
|
||||
|
||||
Fixes: e49656147359 ("rtlwifi: Use dev_kfree_skb_irq instead of kfree_skb")
|
||||
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
|
||||
Cc: Stable <stable@vger.kernel.org> # 4.9+
|
||||
Cc: Wei Yongjun <weiyongjun1@huawei.com>
|
||||
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
|
||||
---
|
||||
drivers/net/wireless/realtek/rtlwifi/core.c | 3 ++-
|
||||
1 file changed, 2 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/drivers/net/wireless/realtek/rtlwifi/core.c b/drivers/net/wireless/realtek/rtlwifi/core.c
|
||||
index 2caa4ad..ded1493 100644
|
||||
--- a/drivers/net/wireless/realtek/rtlwifi/core.c
|
||||
+++ b/drivers/net/wireless/realtek/rtlwifi/core.c
|
||||
@@ -1829,7 +1829,8 @@ bool rtl_cmd_send_packet(struct ieee80211_hw *hw, struct sk_buff *skb)
|
||||
|
||||
spin_lock_irqsave(&rtlpriv->locks.irq_th_lock, flags);
|
||||
pskb = __skb_dequeue(&ring->queue);
|
||||
- dev_kfree_skb_irq(pskb);
|
||||
+ if (pskb)
|
||||
+ dev_kfree_skb_irq(pskb);
|
||||
|
||||
/*this is wrong, fill_tx_cmddesc needs update*/
|
||||
pdesc = &ring->desc[0];
|
||||
--
|
||||
2.10.2
|
||||
|
||||
+34
@@ -0,0 +1,34 @@
|
||||
From e49656147359411fb7529a211e852e587e5970dd Mon Sep 17 00:00:00 2001
|
||||
From: Wei Yongjun <weiyongjun1@huawei.com>
|
||||
Date: Tue, 1 Nov 2016 14:48:40 +0000
|
||||
Subject: [PATCH] rtlwifi: Use dev_kfree_skb_irq instead of kfree_skb
|
||||
|
||||
It is not allowed to call kfree_skb() from hardware interrupt
|
||||
context or with interrupts being disabled, spin_lock_irqsave()
|
||||
make sure always in irq disable context. So the kfree_skb()
|
||||
should be replaced with dev_kfree_skb_irq().
|
||||
|
||||
This is detected by Coccinelle semantic patch.
|
||||
|
||||
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
|
||||
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
|
||||
---
|
||||
drivers/net/wireless/realtek/rtlwifi/core.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/drivers/net/wireless/realtek/rtlwifi/core.c b/drivers/net/wireless/realtek/rtlwifi/core.c
|
||||
index f95760c..a11e8f5 100644
|
||||
--- a/drivers/net/wireless/realtek/rtlwifi/core.c
|
||||
+++ b/drivers/net/wireless/realtek/rtlwifi/core.c
|
||||
@@ -1832,7 +1832,7 @@ bool rtl_cmd_send_packet(struct ieee80211_hw *hw, struct sk_buff *skb)
|
||||
|
||||
spin_lock_irqsave(&rtlpriv->locks.irq_th_lock, flags);
|
||||
pskb = __skb_dequeue(&ring->queue);
|
||||
- kfree_skb(pskb);
|
||||
+ dev_kfree_skb_irq(pskb);
|
||||
|
||||
/*this is wrong, fill_tx_cmddesc needs update*/
|
||||
pdesc = &ring->desc[0];
|
||||
--
|
||||
2.10.2
|
||||
|
||||
+43
@@ -0,0 +1,43 @@
|
||||
From: Joerg Roedel <jroedel@suse.de>
|
||||
|
||||
ATS is broken on these devices. Under invalidation load, the
|
||||
GPU does not reply to invalidations anymore, causing
|
||||
Completion-wait loop timeouts on the AMD IOMMU driver side.
|
||||
Fix it by not enabling ATS on these devices.
|
||||
|
||||
Note that below mentioned commit is not broken, it just
|
||||
triggers the issue because it might cause invalidation
|
||||
storms on devices.
|
||||
|
||||
Fixes: b1516a14657a ('iommu/amd: Implement flush queue')
|
||||
Reported-by: Daniel Drake <drake@endlessm.com>
|
||||
Cc: Daniel Drake <drake@endlessm.com>
|
||||
Cc: Alexander Deucher <Alexander.Deucher@amd.com>
|
||||
Signed-off-by: Joerg Roedel <jroedel@suse.de>
|
||||
---
|
||||
drivers/pci/ats.c | 8 ++++++++
|
||||
1 file changed, 8 insertions(+)
|
||||
|
||||
diff --git a/drivers/pci/ats.c b/drivers/pci/ats.c
|
||||
index eeb9fb2..711bdb2 100644
|
||||
--- a/drivers/pci/ats.c
|
||||
+++ b/drivers/pci/ats.c
|
||||
@@ -17,10 +17,18 @@
|
||||
|
||||
#include "pci.h"
|
||||
|
||||
+static const struct pci_device_id broken_ats_tbl[] = {
|
||||
+ { PCI_DEVICE(PCI_VENDOR_ID_AMD, 0x98e4) }, /* AMD Stoney GPU part */
|
||||
+ { 0 }
|
||||
+};
|
||||
+
|
||||
void pci_ats_init(struct pci_dev *dev)
|
||||
{
|
||||
int pos;
|
||||
|
||||
+ if (pci_match_id(broken_ats_tbl, dev))
|
||||
+ return;
|
||||
+
|
||||
pos = pci_find_ext_capability(dev, PCI_EXT_CAP_ID_ATS);
|
||||
if (!pos)
|
||||
return;
|
||||
-339
@@ -1,339 +0,0 @@
|
||||
From 0bd50d719b004110e791800450ad204399100a86 Mon Sep 17 00:00:00 2001
|
||||
From: Dan O'Donovan <dan@emutex.com>
|
||||
Date: Fri, 10 Jun 2016 13:23:34 +0100
|
||||
Subject: [PATCH] pinctrl: cherryview: prevent concurrent access to GPIO
|
||||
controllers
|
||||
|
||||
Due to a silicon issue on the Atom X5-Z8000 "Cherry Trail" processor
|
||||
series, a common lock must be used to prevent concurrent accesses
|
||||
across the 4 GPIO controllers managed by this driver.
|
||||
|
||||
See Intel Atom Z8000 Processor Series Specification Update
|
||||
(Rev. 005), errata #CHT34, for further information.
|
||||
|
||||
Cc: stable <stable@vger.kernel.org>
|
||||
Signed-off-by: Dan O'Donovan <dan@emutex.com>
|
||||
Acked-by: Mika Westerberg <mika.westerberg@linux.intel.com>
|
||||
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
|
||||
---
|
||||
drivers/pinctrl/intel/pinctrl-cherryview.c | 80 ++++++++++++++++--------------
|
||||
1 file changed, 44 insertions(+), 36 deletions(-)
|
||||
|
||||
diff --git a/drivers/pinctrl/intel/pinctrl-cherryview.c b/drivers/pinctrl/intel/pinctrl-cherryview.c
|
||||
index ac4f564..bf65c94 100644
|
||||
--- a/drivers/pinctrl/intel/pinctrl-cherryview.c
|
||||
+++ b/drivers/pinctrl/intel/pinctrl-cherryview.c
|
||||
@@ -160,7 +160,6 @@ struct chv_pin_context {
|
||||
* @pctldev: Pointer to the pin controller device
|
||||
* @chip: GPIO chip in this pin controller
|
||||
* @regs: MMIO registers
|
||||
- * @lock: Lock to serialize register accesses
|
||||
* @intr_lines: Stores mapping between 16 HW interrupt wires and GPIO
|
||||
* offset (in GPIO number space)
|
||||
* @community: Community this pinctrl instance represents
|
||||
@@ -174,7 +173,6 @@ struct chv_pinctrl {
|
||||
struct pinctrl_dev *pctldev;
|
||||
struct gpio_chip chip;
|
||||
void __iomem *regs;
|
||||
- raw_spinlock_t lock;
|
||||
unsigned intr_lines[16];
|
||||
const struct chv_community *community;
|
||||
u32 saved_intmask;
|
||||
@@ -657,6 +655,17 @@ static const struct chv_community *chv_communities[] = {
|
||||
&southeast_community,
|
||||
};
|
||||
|
||||
+/*
|
||||
+ * Lock to serialize register accesses
|
||||
+ *
|
||||
+ * Due to a silicon issue, a shared lock must be used to prevent
|
||||
+ * concurrent accesses across the 4 GPIO controllers.
|
||||
+ *
|
||||
+ * See Intel Atom Z8000 Processor Series Specification Update (Rev. 005),
|
||||
+ * errata #CHT34, for further information.
|
||||
+ */
|
||||
+static DEFINE_RAW_SPINLOCK(chv_lock);
|
||||
+
|
||||
static void __iomem *chv_padreg(struct chv_pinctrl *pctrl, unsigned offset,
|
||||
unsigned reg)
|
||||
{
|
||||
@@ -718,13 +727,13 @@ static void chv_pin_dbg_show(struct pinctrl_dev *pctldev, struct seq_file *s,
|
||||
u32 ctrl0, ctrl1;
|
||||
bool locked;
|
||||
|
||||
- raw_spin_lock_irqsave(&pctrl->lock, flags);
|
||||
+ raw_spin_lock_irqsave(&chv_lock, flags);
|
||||
|
||||
ctrl0 = readl(chv_padreg(pctrl, offset, CHV_PADCTRL0));
|
||||
ctrl1 = readl(chv_padreg(pctrl, offset, CHV_PADCTRL1));
|
||||
locked = chv_pad_locked(pctrl, offset);
|
||||
|
||||
- raw_spin_unlock_irqrestore(&pctrl->lock, flags);
|
||||
+ raw_spin_unlock_irqrestore(&chv_lock, flags);
|
||||
|
||||
if (ctrl0 & CHV_PADCTRL0_GPIOEN) {
|
||||
seq_puts(s, "GPIO ");
|
||||
@@ -787,14 +796,14 @@ static int chv_pinmux_set_mux(struct pinctrl_dev *pctldev, unsigned function,
|
||||
|
||||
grp = &pctrl->community->groups[group];
|
||||
|
||||
- raw_spin_lock_irqsave(&pctrl->lock, flags);
|
||||
+ raw_spin_lock_irqsave(&chv_lock, flags);
|
||||
|
||||
/* Check first that the pad is not locked */
|
||||
for (i = 0; i < grp->npins; i++) {
|
||||
if (chv_pad_locked(pctrl, grp->pins[i])) {
|
||||
dev_warn(pctrl->dev, "unable to set mode for locked pin %u\n",
|
||||
grp->pins[i]);
|
||||
- raw_spin_unlock_irqrestore(&pctrl->lock, flags);
|
||||
+ raw_spin_unlock_irqrestore(&chv_lock, flags);
|
||||
return -EBUSY;
|
||||
}
|
||||
}
|
||||
@@ -837,7 +846,7 @@ static int chv_pinmux_set_mux(struct pinctrl_dev *pctldev, unsigned function,
|
||||
pin, altfunc->mode, altfunc->invert_oe ? "" : "not ");
|
||||
}
|
||||
|
||||
- raw_spin_unlock_irqrestore(&pctrl->lock, flags);
|
||||
+ raw_spin_unlock_irqrestore(&chv_lock, flags);
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -851,13 +860,13 @@ static int chv_gpio_request_enable(struct pinctrl_dev *pctldev,
|
||||
void __iomem *reg;
|
||||
u32 value;
|
||||
|
||||
- raw_spin_lock_irqsave(&pctrl->lock, flags);
|
||||
+ raw_spin_lock_irqsave(&chv_lock, flags);
|
||||
|
||||
if (chv_pad_locked(pctrl, offset)) {
|
||||
value = readl(chv_padreg(pctrl, offset, CHV_PADCTRL0));
|
||||
if (!(value & CHV_PADCTRL0_GPIOEN)) {
|
||||
/* Locked so cannot enable */
|
||||
- raw_spin_unlock_irqrestore(&pctrl->lock, flags);
|
||||
+ raw_spin_unlock_irqrestore(&chv_lock, flags);
|
||||
return -EBUSY;
|
||||
}
|
||||
} else {
|
||||
@@ -897,7 +906,7 @@ static int chv_gpio_request_enable(struct pinctrl_dev *pctldev,
|
||||
chv_writel(value, reg);
|
||||
}
|
||||
|
||||
- raw_spin_unlock_irqrestore(&pctrl->lock, flags);
|
||||
+ raw_spin_unlock_irqrestore(&chv_lock, flags);
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -911,13 +920,13 @@ static void chv_gpio_disable_free(struct pinctrl_dev *pctldev,
|
||||
void __iomem *reg;
|
||||
u32 value;
|
||||
|
||||
- raw_spin_lock_irqsave(&pctrl->lock, flags);
|
||||
+ raw_spin_lock_irqsave(&chv_lock, flags);
|
||||
|
||||
reg = chv_padreg(pctrl, offset, CHV_PADCTRL0);
|
||||
value = readl(reg) & ~CHV_PADCTRL0_GPIOEN;
|
||||
chv_writel(value, reg);
|
||||
|
||||
- raw_spin_unlock_irqrestore(&pctrl->lock, flags);
|
||||
+ raw_spin_unlock_irqrestore(&chv_lock, flags);
|
||||
}
|
||||
|
||||
static int chv_gpio_set_direction(struct pinctrl_dev *pctldev,
|
||||
@@ -929,7 +938,7 @@ static int chv_gpio_set_direction(struct pinctrl_dev *pctldev,
|
||||
unsigned long flags;
|
||||
u32 ctrl0;
|
||||
|
||||
- raw_spin_lock_irqsave(&pctrl->lock, flags);
|
||||
+ raw_spin_lock_irqsave(&chv_lock, flags);
|
||||
|
||||
ctrl0 = readl(reg) & ~CHV_PADCTRL0_GPIOCFG_MASK;
|
||||
if (input)
|
||||
@@ -938,7 +947,7 @@ static int chv_gpio_set_direction(struct pinctrl_dev *pctldev,
|
||||
ctrl0 |= CHV_PADCTRL0_GPIOCFG_GPO << CHV_PADCTRL0_GPIOCFG_SHIFT;
|
||||
chv_writel(ctrl0, reg);
|
||||
|
||||
- raw_spin_unlock_irqrestore(&pctrl->lock, flags);
|
||||
+ raw_spin_unlock_irqrestore(&chv_lock, flags);
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -963,10 +972,10 @@ static int chv_config_get(struct pinctrl_dev *pctldev, unsigned pin,
|
||||
u16 arg = 0;
|
||||
u32 term;
|
||||
|
||||
- raw_spin_lock_irqsave(&pctrl->lock, flags);
|
||||
+ raw_spin_lock_irqsave(&chv_lock, flags);
|
||||
ctrl0 = readl(chv_padreg(pctrl, pin, CHV_PADCTRL0));
|
||||
ctrl1 = readl(chv_padreg(pctrl, pin, CHV_PADCTRL1));
|
||||
- raw_spin_unlock_irqrestore(&pctrl->lock, flags);
|
||||
+ raw_spin_unlock_irqrestore(&chv_lock, flags);
|
||||
|
||||
term = (ctrl0 & CHV_PADCTRL0_TERM_MASK) >> CHV_PADCTRL0_TERM_SHIFT;
|
||||
|
||||
@@ -1040,7 +1049,7 @@ static int chv_config_set_pull(struct chv_pinctrl *pctrl, unsigned pin,
|
||||
unsigned long flags;
|
||||
u32 ctrl0, pull;
|
||||
|
||||
- raw_spin_lock_irqsave(&pctrl->lock, flags);
|
||||
+ raw_spin_lock_irqsave(&chv_lock, flags);
|
||||
ctrl0 = readl(reg);
|
||||
|
||||
switch (param) {
|
||||
@@ -1063,7 +1072,7 @@ static int chv_config_set_pull(struct chv_pinctrl *pctrl, unsigned pin,
|
||||
pull = CHV_PADCTRL0_TERM_20K << CHV_PADCTRL0_TERM_SHIFT;
|
||||
break;
|
||||
default:
|
||||
- raw_spin_unlock_irqrestore(&pctrl->lock, flags);
|
||||
+ raw_spin_unlock_irqrestore(&chv_lock, flags);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
@@ -1081,7 +1090,7 @@ static int chv_config_set_pull(struct chv_pinctrl *pctrl, unsigned pin,
|
||||
pull = CHV_PADCTRL0_TERM_20K << CHV_PADCTRL0_TERM_SHIFT;
|
||||
break;
|
||||
default:
|
||||
- raw_spin_unlock_irqrestore(&pctrl->lock, flags);
|
||||
+ raw_spin_unlock_irqrestore(&chv_lock, flags);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
@@ -1089,12 +1098,12 @@ static int chv_config_set_pull(struct chv_pinctrl *pctrl, unsigned pin,
|
||||
break;
|
||||
|
||||
default:
|
||||
- raw_spin_unlock_irqrestore(&pctrl->lock, flags);
|
||||
+ raw_spin_unlock_irqrestore(&chv_lock, flags);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
chv_writel(ctrl0, reg);
|
||||
- raw_spin_unlock_irqrestore(&pctrl->lock, flags);
|
||||
+ raw_spin_unlock_irqrestore(&chv_lock, flags);
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -1160,9 +1169,9 @@ static int chv_gpio_get(struct gpio_chip *chip, unsigned offset)
|
||||
unsigned long flags;
|
||||
u32 ctrl0, cfg;
|
||||
|
||||
- raw_spin_lock_irqsave(&pctrl->lock, flags);
|
||||
+ raw_spin_lock_irqsave(&chv_lock, flags);
|
||||
ctrl0 = readl(chv_padreg(pctrl, pin, CHV_PADCTRL0));
|
||||
- raw_spin_unlock_irqrestore(&pctrl->lock, flags);
|
||||
+ raw_spin_unlock_irqrestore(&chv_lock, flags);
|
||||
|
||||
cfg = ctrl0 & CHV_PADCTRL0_GPIOCFG_MASK;
|
||||
cfg >>= CHV_PADCTRL0_GPIOCFG_SHIFT;
|
||||
@@ -1180,7 +1189,7 @@ static void chv_gpio_set(struct gpio_chip *chip, unsigned offset, int value)
|
||||
void __iomem *reg;
|
||||
u32 ctrl0;
|
||||
|
||||
- raw_spin_lock_irqsave(&pctrl->lock, flags);
|
||||
+ raw_spin_lock_irqsave(&chv_lock, flags);
|
||||
|
||||
reg = chv_padreg(pctrl, pin, CHV_PADCTRL0);
|
||||
ctrl0 = readl(reg);
|
||||
@@ -1192,7 +1201,7 @@ static void chv_gpio_set(struct gpio_chip *chip, unsigned offset, int value)
|
||||
|
||||
chv_writel(ctrl0, reg);
|
||||
|
||||
- raw_spin_unlock_irqrestore(&pctrl->lock, flags);
|
||||
+ raw_spin_unlock_irqrestore(&chv_lock, flags);
|
||||
}
|
||||
|
||||
static int chv_gpio_get_direction(struct gpio_chip *chip, unsigned offset)
|
||||
@@ -1202,9 +1211,9 @@ static int chv_gpio_get_direction(struct gpio_chip *chip, unsigned offset)
|
||||
u32 ctrl0, direction;
|
||||
unsigned long flags;
|
||||
|
||||
- raw_spin_lock_irqsave(&pctrl->lock, flags);
|
||||
+ raw_spin_lock_irqsave(&chv_lock, flags);
|
||||
ctrl0 = readl(chv_padreg(pctrl, pin, CHV_PADCTRL0));
|
||||
- raw_spin_unlock_irqrestore(&pctrl->lock, flags);
|
||||
+ raw_spin_unlock_irqrestore(&chv_lock, flags);
|
||||
|
||||
direction = ctrl0 & CHV_PADCTRL0_GPIOCFG_MASK;
|
||||
direction >>= CHV_PADCTRL0_GPIOCFG_SHIFT;
|
||||
@@ -1242,14 +1251,14 @@ static void chv_gpio_irq_ack(struct irq_data *d)
|
||||
int pin = chv_gpio_offset_to_pin(pctrl, irqd_to_hwirq(d));
|
||||
u32 intr_line;
|
||||
|
||||
- raw_spin_lock(&pctrl->lock);
|
||||
+ raw_spin_lock(&chv_lock);
|
||||
|
||||
intr_line = readl(chv_padreg(pctrl, pin, CHV_PADCTRL0));
|
||||
intr_line &= CHV_PADCTRL0_INTSEL_MASK;
|
||||
intr_line >>= CHV_PADCTRL0_INTSEL_SHIFT;
|
||||
chv_writel(BIT(intr_line), pctrl->regs + CHV_INTSTAT);
|
||||
|
||||
- raw_spin_unlock(&pctrl->lock);
|
||||
+ raw_spin_unlock(&chv_lock);
|
||||
}
|
||||
|
||||
static void chv_gpio_irq_mask_unmask(struct irq_data *d, bool mask)
|
||||
@@ -1260,7 +1269,7 @@ static void chv_gpio_irq_mask_unmask(struct irq_data *d, bool mask)
|
||||
u32 value, intr_line;
|
||||
unsigned long flags;
|
||||
|
||||
- raw_spin_lock_irqsave(&pctrl->lock, flags);
|
||||
+ raw_spin_lock_irqsave(&chv_lock, flags);
|
||||
|
||||
intr_line = readl(chv_padreg(pctrl, pin, CHV_PADCTRL0));
|
||||
intr_line &= CHV_PADCTRL0_INTSEL_MASK;
|
||||
@@ -1273,7 +1282,7 @@ static void chv_gpio_irq_mask_unmask(struct irq_data *d, bool mask)
|
||||
value |= BIT(intr_line);
|
||||
chv_writel(value, pctrl->regs + CHV_INTMASK);
|
||||
|
||||
- raw_spin_unlock_irqrestore(&pctrl->lock, flags);
|
||||
+ raw_spin_unlock_irqrestore(&chv_lock, flags);
|
||||
}
|
||||
|
||||
static void chv_gpio_irq_mask(struct irq_data *d)
|
||||
@@ -1307,7 +1316,7 @@ static unsigned chv_gpio_irq_startup(struct irq_data *d)
|
||||
unsigned long flags;
|
||||
u32 intsel, value;
|
||||
|
||||
- raw_spin_lock_irqsave(&pctrl->lock, flags);
|
||||
+ raw_spin_lock_irqsave(&chv_lock, flags);
|
||||
intsel = readl(chv_padreg(pctrl, pin, CHV_PADCTRL0));
|
||||
intsel &= CHV_PADCTRL0_INTSEL_MASK;
|
||||
intsel >>= CHV_PADCTRL0_INTSEL_SHIFT;
|
||||
@@ -1322,7 +1331,7 @@ static unsigned chv_gpio_irq_startup(struct irq_data *d)
|
||||
irq_set_handler_locked(d, handler);
|
||||
pctrl->intr_lines[intsel] = offset;
|
||||
}
|
||||
- raw_spin_unlock_irqrestore(&pctrl->lock, flags);
|
||||
+ raw_spin_unlock_irqrestore(&chv_lock, flags);
|
||||
}
|
||||
|
||||
chv_gpio_irq_unmask(d);
|
||||
@@ -1338,7 +1347,7 @@ static int chv_gpio_irq_type(struct irq_data *d, unsigned type)
|
||||
unsigned long flags;
|
||||
u32 value;
|
||||
|
||||
- raw_spin_lock_irqsave(&pctrl->lock, flags);
|
||||
+ raw_spin_lock_irqsave(&chv_lock, flags);
|
||||
|
||||
/*
|
||||
* Pins which can be used as shared interrupt are configured in
|
||||
@@ -1387,7 +1396,7 @@ static int chv_gpio_irq_type(struct irq_data *d, unsigned type)
|
||||
else if (type & IRQ_TYPE_LEVEL_MASK)
|
||||
irq_set_handler_locked(d, handle_level_irq);
|
||||
|
||||
- raw_spin_unlock_irqrestore(&pctrl->lock, flags);
|
||||
+ raw_spin_unlock_irqrestore(&chv_lock, flags);
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -1499,7 +1508,6 @@ static int chv_pinctrl_probe(struct platform_device *pdev)
|
||||
if (i == ARRAY_SIZE(chv_communities))
|
||||
return -ENODEV;
|
||||
|
||||
- raw_spin_lock_init(&pctrl->lock);
|
||||
pctrl->dev = &pdev->dev;
|
||||
|
||||
#ifdef CONFIG_PM_SLEEP
|
||||
--
|
||||
2.9.2
|
||||
|
||||
+179
@@ -0,0 +1,179 @@
|
||||
From ba714a9c1dea85e0bf2899d02dfeb9c70040427c Mon Sep 17 00:00:00 2001
|
||||
From: Thomas Gleixner <tglx@linutronix.de>
|
||||
Date: Tue, 23 May 2017 23:23:32 +0200
|
||||
Subject: [PATCH] pinctrl/amd: Use regular interrupt instead of chained
|
||||
|
||||
The AMD pinctrl driver uses a chained interrupt to demultiplex the GPIO
|
||||
interrupts. Kevin Vandeventer reported, that his new AMD Ryzen locks up
|
||||
hard on boot when the AMD pinctrl driver is initialized. The reason is an
|
||||
interrupt storm. It's not clear whether that's caused by hardware or
|
||||
firmware or both.
|
||||
|
||||
Using chained interrupts on X86 is a dangerous endavour. If a system is
|
||||
misconfigured or the hardware buggy there is no safety net to catch an
|
||||
interrupt storm.
|
||||
|
||||
Convert the driver to use a regular interrupt for the demultiplex
|
||||
handler. This allows the interrupt storm detector to catch the malfunction
|
||||
and lets the system boot up.
|
||||
|
||||
This should be backported to stable because it's likely that more users run
|
||||
into this problem as the AMD Ryzen machines are spreading.
|
||||
|
||||
Reported-by: Kevin Vandeventer
|
||||
Link: https://bugzilla.suse.com/show_bug.cgi?id=1034261
|
||||
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
|
||||
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
|
||||
Backported to 4.9 by: Borislav Petkov <bp@alien8.de>
|
||||
|
||||
---
|
||||
drivers/pinctrl/pinctrl-amd.c | 91 +++++++++++++++++++------------------------
|
||||
1 file changed, 41 insertions(+), 50 deletions(-)
|
||||
|
||||
|
||||
Date: Thu, 22 Jun 2017 11:16:31 +0200
|
||||
From:
|
||||
To: Thomas Backlund <tmb@mageia.org>
|
||||
Cc: stable <stable@vger.kernel.org>, Thomas Gleixner <tglx@linutronix.de>,
|
||||
Linus Walleij <linus.walleij@linaro.org>,
|
||||
"Shah, Nehal-bakulchandra" <Nehal-bakulchandra.Shah@amd.com>,
|
||||
"Xue, Ken" <Ken.Xue@amd.com>,
|
||||
"S-k, Shyam-sundar" <Shyam-sundar.S-k@amd.com>,
|
||||
Sherry Hurwitz <sherry.hurwitz@amd.com>
|
||||
Subject: Re: ba714a9c1dea ("pinctrl/amd: Use regular interrupt instead of chained")
|
||||
|
||||
On Thu, Jun 22, 2017 at 12:03:50PM +0300, Thomas Backlund wrote:
|
||||
> If it's intended for 4.9 -longterm, a proper backport is needed.
|
||||
|
||||
Something like this, I guess. But I need to find a box to test it.
|
||||
|
||||
Regards/Gruss,
|
||||
Boris.
|
||||
|
||||
diff --git a/drivers/pinctrl/pinctrl-amd.c b/drivers/pinctrl/pinctrl-amd.c
|
||||
index c9a146948192..531e2224f38f 100644
|
||||
--- a/drivers/pinctrl/pinctrl-amd.c
|
||||
+++ b/drivers/pinctrl/pinctrl-amd.c
|
||||
@@ -476,64 +476,54 @@ static struct irq_chip amd_gpio_irqchip = {
|
||||
.irq_set_type = amd_gpio_irq_set_type,
|
||||
};
|
||||
|
||||
-static void amd_gpio_irq_handler(struct irq_desc *desc)
|
||||
+#define PIN_IRQ_PENDING (BIT(INTERRUPT_STS_OFF) | BIT(WAKE_STS_OFF))
|
||||
+
|
||||
+static irqreturn_t amd_gpio_irq_handler(int irq, void *dev_id)
|
||||
{
|
||||
- u32 i;
|
||||
- u32 off;
|
||||
- u32 reg;
|
||||
- u32 pin_reg;
|
||||
- u64 reg64;
|
||||
- int handled = 0;
|
||||
- unsigned int irq;
|
||||
+ struct amd_gpio *gpio_dev = dev_id;
|
||||
+ struct gpio_chip *gc = &gpio_dev->gc;
|
||||
+ irqreturn_t ret = IRQ_NONE;
|
||||
+ unsigned int i, irqnr;
|
||||
unsigned long flags;
|
||||
- struct irq_chip *chip = irq_desc_get_chip(desc);
|
||||
- struct gpio_chip *gc = irq_desc_get_handler_data(desc);
|
||||
- struct amd_gpio *gpio_dev = gpiochip_get_data(gc);
|
||||
+ u32 *regs, regval;
|
||||
+ u64 status, mask;
|
||||
|
||||
- chained_irq_enter(chip, desc);
|
||||
- /*enable GPIO interrupt again*/
|
||||
+ /* Read the wake status */
|
||||
spin_lock_irqsave(&gpio_dev->lock, flags);
|
||||
- reg = readl(gpio_dev->base + WAKE_INT_STATUS_REG1);
|
||||
- reg64 = reg;
|
||||
- reg64 = reg64 << 32;
|
||||
-
|
||||
- reg = readl(gpio_dev->base + WAKE_INT_STATUS_REG0);
|
||||
- reg64 |= reg;
|
||||
+ status = readl(gpio_dev->base + WAKE_INT_STATUS_REG1);
|
||||
+ status <<= 32;
|
||||
+ status |= readl(gpio_dev->base + WAKE_INT_STATUS_REG0);
|
||||
spin_unlock_irqrestore(&gpio_dev->lock, flags);
|
||||
|
||||
- /*
|
||||
- * first 46 bits indicates interrupt status.
|
||||
- * one bit represents four interrupt sources.
|
||||
- */
|
||||
- for (off = 0; off < 46 ; off++) {
|
||||
- if (reg64 & BIT(off)) {
|
||||
- for (i = 0; i < 4; i++) {
|
||||
- pin_reg = readl(gpio_dev->base +
|
||||
- (off * 4 + i) * 4);
|
||||
- if ((pin_reg & BIT(INTERRUPT_STS_OFF)) ||
|
||||
- (pin_reg & BIT(WAKE_STS_OFF))) {
|
||||
- irq = irq_find_mapping(gc->irqdomain,
|
||||
- off * 4 + i);
|
||||
- generic_handle_irq(irq);
|
||||
- writel(pin_reg,
|
||||
- gpio_dev->base
|
||||
- + (off * 4 + i) * 4);
|
||||
- handled++;
|
||||
- }
|
||||
- }
|
||||
+ /* Bit 0-45 contain the relevant status bits */
|
||||
+ status &= (1ULL << 46) - 1;
|
||||
+ regs = gpio_dev->base;
|
||||
+ for (mask = 1, irqnr = 0; status; mask <<= 1, regs += 4, irqnr += 4) {
|
||||
+ if (!(status & mask))
|
||||
+ continue;
|
||||
+ status &= ~mask;
|
||||
+
|
||||
+ /* Each status bit covers four pins */
|
||||
+ for (i = 0; i < 4; i++) {
|
||||
+ regval = readl(regs + i);
|
||||
+ if (!(regval & PIN_IRQ_PENDING))
|
||||
+ continue;
|
||||
+ irq = irq_find_mapping(gc->irqdomain, irqnr + i);
|
||||
+ generic_handle_irq(irq);
|
||||
+ /* Clear interrupt */
|
||||
+ writel(regval, regs + i);
|
||||
+ ret = IRQ_HANDLED;
|
||||
}
|
||||
}
|
||||
|
||||
- if (handled == 0)
|
||||
- handle_bad_irq(desc);
|
||||
-
|
||||
+ /* Signal EOI to the GPIO unit */
|
||||
spin_lock_irqsave(&gpio_dev->lock, flags);
|
||||
- reg = readl(gpio_dev->base + WAKE_INT_MASTER_REG);
|
||||
- reg |= EOI_MASK;
|
||||
- writel(reg, gpio_dev->base + WAKE_INT_MASTER_REG);
|
||||
+ regval = readl(gpio_dev->base + WAKE_INT_MASTER_REG);
|
||||
+ regval |= EOI_MASK;
|
||||
+ writel(regval, gpio_dev->base + WAKE_INT_MASTER_REG);
|
||||
spin_unlock_irqrestore(&gpio_dev->lock, flags);
|
||||
|
||||
- chained_irq_exit(chip, desc);
|
||||
+ return ret;
|
||||
}
|
||||
|
||||
static int amd_get_groups_count(struct pinctrl_dev *pctldev)
|
||||
@@ -801,10 +791,11 @@ static int amd_gpio_probe(struct platform_device *pdev)
|
||||
goto out2;
|
||||
}
|
||||
|
||||
- gpiochip_set_chained_irqchip(&gpio_dev->gc,
|
||||
- &amd_gpio_irqchip,
|
||||
- irq_base,
|
||||
- amd_gpio_irq_handler);
|
||||
+ ret = devm_request_irq(&pdev->dev, irq_base, amd_gpio_irq_handler, 0,
|
||||
+ KBUILD_MODNAME, gpio_dev);
|
||||
+ if (ret)
|
||||
+ goto out2;
|
||||
+
|
||||
|
||||
platform_set_drvdata(pdev, gpio_dev);
|
||||
|
||||
|
||||
--
|
||||
Regards/Gruss,
|
||||
Boris.
|
||||
|
||||
Good mailing practices for 400: avoid top-posting and trim the reply.
|
||||
+37
@@ -0,0 +1,37 @@
|
||||
From f35823619db8bbaa2afea8705f239c3cecb9d22f Mon Sep 17 00:00:00 2001
|
||||
From: Santeri Toivonen <santeri.toivonen@vatsul.com>
|
||||
Date: Tue, 4 Apr 2017 21:09:00 +0300
|
||||
Subject: [PATCH] platform/x86: asus-nb-wmi: Add wapf4 quirk for the X302UA
|
||||
|
||||
Asus laptop X302UA starts up with Wi-Fi disabled,
|
||||
without a way to enable it. Set wapf=4 to fix the problem.
|
||||
|
||||
Signed-off-by: Santeri Toivonen <santeri.toivonen@vatsul.com>
|
||||
Signed-off-by: Darren Hart (VMware) <dvhart@infradead.org>
|
||||
---
|
||||
drivers/platform/x86/asus-nb-wmi.c | 9 +++++++++
|
||||
1 file changed, 9 insertions(+)
|
||||
|
||||
diff --git a/drivers/platform/x86/asus-nb-wmi.c b/drivers/platform/x86/asus-nb-wmi.c
|
||||
index dea98ffb6f60..1ae58d906536 100644
|
||||
--- a/drivers/platform/x86/asus-nb-wmi.c
|
||||
+++ b/drivers/platform/x86/asus-nb-wmi.c
|
||||
@@ -144,6 +144,15 @@ static const struct dmi_system_id asus_quirks[] = {
|
||||
},
|
||||
{
|
||||
.callback = dmi_matched,
|
||||
+ .ident = "ASUSTeK COMPUTER INC. X302UA",
|
||||
+ .matches = {
|
||||
+ DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."),
|
||||
+ DMI_MATCH(DMI_PRODUCT_NAME, "X302UA"),
|
||||
+ },
|
||||
+ .driver_data = &quirk_asus_wapf4,
|
||||
+ },
|
||||
+ {
|
||||
+ .callback = dmi_matched,
|
||||
.ident = "ASUSTeK COMPUTER INC. X401U",
|
||||
.matches = {
|
||||
DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."),
|
||||
--
|
||||
2.13.2
|
||||
|
||||
@@ -38,20 +38,14 @@ x86-increase-default-minimum-vmalloc-area-by-64MB-to-192MB.patch
|
||||
# slows down boot
|
||||
Revert-cpufreq-pcc-Enable-autoload-of-pcc-cpufreq-fo.patch
|
||||
|
||||
#
|
||||
Revert-cpufreq-pcc-cpufreq-update-default-value-of-c.patch
|
||||
|
||||
# breaks nvidia304
|
||||
Revert-x86-mm-mtrr-Remove-kernel-internal-MTRR-inter.patch
|
||||
|
||||
#
|
||||
x86-power-64-Fix-hibernation-return-address-corrupti.patch
|
||||
|
||||
###
|
||||
### Core
|
||||
###
|
||||
base-cacheinfo-silence-DT-warnings.patch
|
||||
|
||||
# fixes crash on boot on some Amd systems
|
||||
iommu-amd-flush-IOTLB-for-specific-domains-only-v3.patch
|
||||
|
||||
###
|
||||
### i2c
|
||||
###
|
||||
@@ -66,6 +60,9 @@ base-cacheinfo-silence-DT-warnings.patch
|
||||
pci-add-ALI-M5229-ide-compatibility-mode-quirk.patch
|
||||
pci-quirks-drop-devinit-exit.patch
|
||||
|
||||
# Stoney iommu hang
|
||||
pci-Blacklist-AMD-Stoney-GPU-devices-for-ATS.patch
|
||||
|
||||
###
|
||||
### PNP core
|
||||
###
|
||||
@@ -83,6 +80,12 @@ acpi-processor-M720SR-limit-to-C2.patch
|
||||
# backlight fixes
|
||||
ACPI-video-Add-a-quirk-to-force-acpi-video-backlight.patch
|
||||
|
||||
# drop obsolete warn
|
||||
acpi-do-not-warn-if-_BQC-does-not-exist.patch
|
||||
|
||||
# silence useless acpi warnings
|
||||
acpi-ACPICA-Events-Fix-acpi_ev_initialize_region-return-v.patch
|
||||
|
||||
###
|
||||
### Block
|
||||
###
|
||||
@@ -125,11 +128,17 @@ ata-prefer-ata-drivers-over-ide-drivers-when-both-are-built.patch
|
||||
# Nice SSD speedup
|
||||
block-Make-CFQ-default-to-IOPS-mode-on-SSDs.patch
|
||||
|
||||
# ahci ids
|
||||
ahci-add-new-Intel-device-IDs.patch
|
||||
# Include new BFQ I/O scheduler
|
||||
# (See http://algo.ing.unimo.it/people/paolo/disk_sched)
|
||||
block-cgroups-kconfig-build-bits-for-BFQ-v7r11-4.5.0.patch
|
||||
block-introduce-the-BFQ-v7r11-I-O-sched-for-4.5.0.patch
|
||||
block-bfq-add-Early-Queue-Merge-EQM-to-BFQ-v7r11-for.patch
|
||||
block-Turn-into-BFQ-v8r7-for-4.9.0.patch
|
||||
block-update-bfq-from-v8r7-to-v8r10.patch
|
||||
block-update-bfq-from-v8r10-to-v8r11.patch
|
||||
|
||||
#
|
||||
megaraid_sas-Do-not-fire-MR_DCMD_PD_LIST_QUERY-to-co.patch
|
||||
# new macbooks
|
||||
block-nvme-detect-NVMe-controller-in-recent-MacBooks.patch
|
||||
|
||||
###
|
||||
### Char
|
||||
@@ -138,18 +147,25 @@ megaraid_sas-Do-not-fire-MR_DCMD_PD_LIST_QUERY-to-co.patch
|
||||
# hard locks Dell R720xd
|
||||
Revert-ipmi-Start-the-timer-and-thread-on-internal-m.patch
|
||||
|
||||
# tpm_crb fixes for SkyLake
|
||||
char-tpm-tpm_crb-implement-tpm-crb-idle-state.patch
|
||||
char-tmp-tpm_crb-fix-Intel-PTT-hw-bug-during-idle-state.patch
|
||||
char-tpm-tpm_crb-open-code-the-crb_init-into-acpi_add.patch
|
||||
char-tmp-tpm_crb-implement-runtime-pm-for-tpm_crb.patch
|
||||
|
||||
###
|
||||
### File-system
|
||||
###
|
||||
|
||||
# aufs from: http://aufs.sourceforge.net/ (mga#8314)
|
||||
fs-aufs-4.7.patch
|
||||
fs-aufs-4.7-modular.patch
|
||||
fs-aufs-4.7-ver-fix.patch
|
||||
fs-aufs-4.9.patch
|
||||
fs-aufs-4.9-modular.patch
|
||||
|
||||
# ext4
|
||||
fs-ext4-don-t-call-ext4_should_journal_data-on-the-jour.patch
|
||||
fs-ext4-fix-deadlock-during-page-writeback.patch
|
||||
# needed for mdadm: imsm: enable bad block support for imsm metadata
|
||||
fs-seq_file-reset-iterator-to-first-record-for-zero-off.patch
|
||||
|
||||
# performance regression fix
|
||||
fs-jbd2-Fix-dbench4-performance-regression-for-nobarrier-mounts.patch
|
||||
|
||||
###
|
||||
### FireWire
|
||||
@@ -184,6 +200,19 @@ gpu-drm-mach64-linux-3.14-buildfix.patch
|
||||
gpu-drm-mach64-3.17-buildfix.patch
|
||||
gpu-drm-mach64-3.18-buildfix.patch
|
||||
|
||||
#
|
||||
gpu-drm-i915-don-t-warn-about-Skylake-CPU-KabyPoint-PCH-.patch
|
||||
|
||||
# Amd polaris12 support
|
||||
gpu-drm-amd-amdgpu-add-Polaris12-PCI-ID.patch
|
||||
gpu-drm-amd-amdgpu-add-Polaris12-support-v3.patch
|
||||
gpu-drm-amdgpu-powerplay-add-Polaris12-support.patch
|
||||
gpu-drm-amd-amdgpu-add-POLARIS12-PCI-ID.patch
|
||||
gpu-drm-amdgpu-add-Polaris12-DID.patch
|
||||
|
||||
# fix crash
|
||||
gpu-drm-amdgpu-pm-check-for-headless-before-calling-comp.patch
|
||||
|
||||
###
|
||||
### Hardware Monitoring
|
||||
###
|
||||
@@ -234,16 +263,21 @@ net-netfilter-IFWLOG-remove-unused-label.patch
|
||||
net-netfilter-psd.patch
|
||||
net-netfilter-psd-mdv.patch
|
||||
net-netfilter-psd-2.6.35-buildfix.patch
|
||||
net-netfilter-psd-fix-redefines.patch
|
||||
|
||||
# iwlwifi fixes
|
||||
net-wireless-iwlwifi-add-new-8260-PCI-IDs.patch
|
||||
net-wireless-iwlwifi-add-new-8265.patch
|
||||
net-wireless-iwlwifi-pcie-enable-interrupts-before-releasing-the-NICs-CPU.patch
|
||||
net-wireless-iwlwifi-pcie-fix-a-race-in-firmware-loading-flow.patch
|
||||
# rtlwifi fixes
|
||||
net-wireless-rtlwifi-Use-dev_kfree_skb_irq-instead-of-kfree_skb.patch
|
||||
net-wireless-rtlwifi-Fix-kernel-oops-introduced-with-commit-e4965.patch
|
||||
|
||||
#
|
||||
net-bcma-add-PCI-ID-for-Foxconn-s-BCM43142-device.patch
|
||||
net-brcmfmac-restore-stopping-netdev-queue-when-bus-clog.patch
|
||||
# update rtl8xxxu for mga#20508
|
||||
net-wireless-realtek-rtl8xxxu-linux-4.11-rc.patch
|
||||
|
||||
###
|
||||
### pinctrl
|
||||
###
|
||||
|
||||
# fix non-booting Ryzen+ due to interrupt storm
|
||||
pinctrl_amd-Use-regular-interrupt-instead-of-chained.patch
|
||||
|
||||
###
|
||||
### Platform drivers
|
||||
@@ -255,13 +289,8 @@ platform-x86-add-shuttle-wmi-driver.patch
|
||||
platform-x86-shuttle-wmi-drop-devinit-exit.patch
|
||||
platform-x86-shuttle-wmi-4.2-buildfix.patch
|
||||
|
||||
#
|
||||
hp-wmi-Fix-wifi-cannot-be-hard-unblocked.patch
|
||||
|
||||
Bluetooth-Add-support-of-13d3-3490-AR3012-device.patch
|
||||
intel_th-Fix-a-deadlock-in-modprobing.patch
|
||||
intel_th-pci-Add-Kaby-Lake-PCH-H-support.patch
|
||||
pinctrl-cherryview-prevent-concurrent-access-to-GPIO.patch
|
||||
# X302UA no wifi
|
||||
platform-x86-asus-nb-wmi-Add-wapf4-quirk-for-the-X30.patch
|
||||
|
||||
###
|
||||
### RTC
|
||||
@@ -278,6 +307,27 @@ include-kbuild-export-pci_ids.patch
|
||||
### Sound
|
||||
###
|
||||
|
||||
# new codecs
|
||||
sound-ALSA-hda-realtek-Add-new-codec-ID-ALC299.patch
|
||||
sound-ALSA-hda-realtek-New-codec-support-of-ALC1220.patch
|
||||
sound-ALSA-hda-realtek-new-id-for-alc1220.patch
|
||||
sound-ALSA-hda-realtek-Remove-ALC285-device-ID.patch
|
||||
sound-ALSA-hda-realtek-New-codecs-support-for-ALC215-ALC28.patch
|
||||
|
||||
# add support for Gigabyte GA-AX370 Gaming 5 with dual codecs (TTL: 4.12)
|
||||
sound-ALSA-hda-A-new-flag-to-enforce-prefix-to-each-pin.patch
|
||||
sound-ALSA-hda-Allow-to-enable-disable-vmaster-build-expli.patch
|
||||
sound-ALSA-hda-Support-Gigabyte-Gaming-board-with-dual-Rea.patch
|
||||
sound-ALSA-hda-Use-a-helper-function-for-renaming-kctl-nam.patch
|
||||
# another dual codec system
|
||||
sound-ALSA-hda-Apply-dual-codec-quirk-for-MSI-Z270-Gaming-.patch
|
||||
sound-ALSA-hda-Fix-applying-MSI-dual-codec-mobo-quirk.patch
|
||||
|
||||
# intel
|
||||
sound-ALSA-hda-Add-Geminilake-id-to-SKL_PLUS.patch
|
||||
sound-ALSA-hda-Add-Coffelake-PCI-ID.patch
|
||||
sound-ALSA-hda-Apply-quirks-to-Broxton-T-too.patch
|
||||
|
||||
###
|
||||
### Staging
|
||||
###
|
||||
@@ -300,13 +350,6 @@ hid-usbhid-IBM-BladeCenterHS20-quirk.patch
|
||||
usb-storage-unusual_devs-add-id.patch
|
||||
usb-storage-unusual_devs-add-id-2.6.37-buildfix.patch
|
||||
|
||||
#
|
||||
usb-dwc3-fix-for-the-isoc-transfer-EP_BUSY-flag.patch
|
||||
usb-renesas_usbhs-fix-NULL-pointer-dereference-in-xf.patch
|
||||
|
||||
#
|
||||
HID-uhid-fix-timeout-when-probe-races-with-IO.patch
|
||||
|
||||
###
|
||||
### V4L
|
||||
###
|
||||
@@ -314,11 +357,6 @@ HID-uhid-fix-timeout-when-probe-races-with-IO.patch
|
||||
# pwc driver name in /proc/bus/devices, /sys fix and "advertisement" removal
|
||||
media-usb-pwc-lie-in-proc-usb-devices.patch
|
||||
|
||||
#
|
||||
media-media-usbtv-prevent-access-to-free-d-resources.patch
|
||||
media-vb2-core-Skip-planes-array-verification-if-pb-.patch
|
||||
media-videobuf2-v4l2-Verify-planes-array-in-buffer-d.patch
|
||||
|
||||
###
|
||||
### Video
|
||||
###
|
||||
@@ -369,7 +407,9 @@ video-mageia-logo.patch
|
||||
|
||||
# add rtl8723bs support (mga#15874)
|
||||
3rd-rtl8723bs.patch
|
||||
3rd-rtl8723bs-4.7-buildfix.patch
|
||||
|
||||
# add rtl8812 support (mga#21043)
|
||||
3rd-rtl8812au.patch
|
||||
|
||||
###
|
||||
### Security
|
||||
@@ -387,10 +427,6 @@ video-mageia-logo.patch
|
||||
### ARM
|
||||
###
|
||||
|
||||
# RPi2 support
|
||||
# Read MAC address from DT
|
||||
arm-0001-ARM-bcm2835-dt-Add-the-ethernet-to-the-device-trees.patch
|
||||
|
||||
###
|
||||
### IA64
|
||||
###
|
||||
@@ -399,6 +435,14 @@ arm-0001-ARM-bcm2835-dt-Add-the-ethernet-to-the-device-trees.patch
|
||||
### Tools
|
||||
###
|
||||
|
||||
# wipe powerpc refrence so we can nuke dangling symlinks (mga#17676)
|
||||
tools-testing-selftest-Makefile-remove-powerpc-reference.patch
|
||||
|
||||
# perf build fixes
|
||||
tools-build-Make-fixdep-parsing-wait-for-last-target.patch
|
||||
tools-perf-tools-Force-fixdep-compilation-at-the-start-of-.patch
|
||||
tools-perf-tools-Move-perf-build-related-variables-under-n.patch
|
||||
|
||||
###
|
||||
### UAPI
|
||||
###
|
||||
|
||||
+68
@@ -0,0 +1,68 @@
|
||||
From 9f3dadb156692e15933a4a97ef659f65151be4a1 Mon Sep 17 00:00:00 2001
|
||||
From: Takashi Iwai <tiwai@suse.de>
|
||||
Date: Mon, 10 Apr 2017 17:12:33 +0200
|
||||
Subject: [PATCH 1/4] ALSA: hda - A new flag to enforce prefix to each pin
|
||||
|
||||
This is a preliminary patch for a smooth multi-codec support, and it
|
||||
introduces a new flag, force_pin_prefix, to struct hda_codec.
|
||||
This flag is used to force to add the pin location prefix to each
|
||||
input pin. For example, when there is only one microphone pin,
|
||||
usually the auto-parser assigns the string "Mic". With this flag on,
|
||||
it'll be like "Front Mic". Also, the creation of "Master" or "PCM"
|
||||
playback volume for a single pin is suppressed, too.
|
||||
|
||||
Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=195305
|
||||
Signed-off-by: Takashi Iwai <tiwai@suse.de>
|
||||
---
|
||||
sound/pci/hda/hda_auto_parser.c | 1 +
|
||||
sound/pci/hda/hda_codec.h | 1 +
|
||||
sound/pci/hda/hda_generic.c | 2 ++
|
||||
3 files changed, 4 insertions(+)
|
||||
|
||||
diff --git a/sound/pci/hda/hda_auto_parser.c b/sound/pci/hda/hda_auto_parser.c
|
||||
index a03cf68..d3ea731 100644
|
||||
--- a/sound/pci/hda/hda_auto_parser.c
|
||||
+++ b/sound/pci/hda/hda_auto_parser.c
|
||||
@@ -580,6 +580,7 @@ const char *hda_get_autocfg_input_label(struct hda_codec *codec,
|
||||
has_multiple_pins = 1;
|
||||
if (has_multiple_pins && type == AUTO_PIN_MIC)
|
||||
has_multiple_pins &= check_mic_location_need(codec, cfg, input);
|
||||
+ has_multiple_pins |= codec->force_pin_prefix;
|
||||
return hda_get_input_pin_label(codec, &cfg->inputs[input],
|
||||
cfg->inputs[input].pin,
|
||||
has_multiple_pins);
|
||||
diff --git a/sound/pci/hda/hda_codec.h b/sound/pci/hda/hda_codec.h
|
||||
index f17f252..d6fb2d5 100644
|
||||
--- a/sound/pci/hda/hda_codec.h
|
||||
+++ b/sound/pci/hda/hda_codec.h
|
||||
@@ -256,6 +256,7 @@ struct hda_codec {
|
||||
unsigned int dump_coef:1; /* dump processing coefs in codec proc file */
|
||||
unsigned int power_save_node:1; /* advanced PM for each widget */
|
||||
unsigned int auto_runtime_pm:1; /* enable automatic codec runtime pm */
|
||||
+ unsigned int force_pin_prefix:1; /* Add location prefix */
|
||||
#ifdef CONFIG_PM
|
||||
unsigned long power_on_acct;
|
||||
unsigned long power_off_acct;
|
||||
diff --git a/sound/pci/hda/hda_generic.c b/sound/pci/hda/hda_generic.c
|
||||
index e7c8f4f..4438328 100644
|
||||
--- a/sound/pci/hda/hda_generic.c
|
||||
+++ b/sound/pci/hda/hda_generic.c
|
||||
@@ -1125,6 +1125,7 @@ static const char *get_line_out_pfx(struct hda_codec *codec, int ch,
|
||||
|
||||
*index = 0;
|
||||
if (cfg->line_outs == 1 && !spec->multi_ios &&
|
||||
+ !codec->force_pin_prefix &&
|
||||
!cfg->hp_outs && !cfg->speaker_outs)
|
||||
return spec->vmaster_mute.hook ? "PCM" : "Master";
|
||||
|
||||
@@ -1132,6 +1133,7 @@ static const char *get_line_out_pfx(struct hda_codec *codec, int ch,
|
||||
* use it master (or "PCM" if a vmaster hook is present)
|
||||
*/
|
||||
if (spec->multiout.num_dacs == 1 && !spec->mixer_nid &&
|
||||
+ !codec->force_pin_prefix &&
|
||||
!spec->multiout.hp_out_nid[0] && !spec->multiout.extra_out_nid[0])
|
||||
return spec->vmaster_mute.hook ? "PCM" : "Master";
|
||||
|
||||
--
|
||||
2.10.2
|
||||
|
||||
@@ -0,0 +1,45 @@
|
||||
From e79b0006c45c9b0b22f3ea54ff6e256b34c1f208 Mon Sep 17 00:00:00 2001
|
||||
From: Megha Dey <megha.dey@intel.com>
|
||||
Date: Wed, 14 Jun 2017 09:51:56 +0530
|
||||
Subject: [PATCH] ALSA: hda - Add Coffelake PCI ID
|
||||
|
||||
Coffelake is another Intel part, so need to add PCI ID for it.
|
||||
|
||||
Signed-off-by: Megha Dey <megha.dey@intel.com>
|
||||
Signed-off-by: Subhransu S. Prusty <subhransu.s.prusty@intel.com>
|
||||
Acked-by: Vinod Koul <vinod.koul@intel.com>
|
||||
Cc: <stable@vger.kernel.org>
|
||||
Signed-off-by: Takashi Iwai <tiwai@suse.de>
|
||||
---
|
||||
sound/pci/hda/hda_intel.c | 6 +++++-
|
||||
1 file changed, 5 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/sound/pci/hda/hda_intel.c b/sound/pci/hda/hda_intel.c
|
||||
index 1770f085c2a6..e3c696c46a21 100644
|
||||
--- a/sound/pci/hda/hda_intel.c
|
||||
+++ b/sound/pci/hda/hda_intel.c
|
||||
@@ -371,9 +371,10 @@ enum {
|
||||
#define IS_KBL_H(pci) ((pci)->vendor == 0x8086 && (pci)->device == 0xa2f0)
|
||||
#define IS_BXT(pci) ((pci)->vendor == 0x8086 && (pci)->device == 0x5a98)
|
||||
#define IS_GLK(pci) ((pci)->vendor == 0x8086 && (pci)->device == 0x3198)
|
||||
+#define IS_CFL(pci) ((pci)->vendor == 0x8086 && (pci)->device == 0xa348)
|
||||
#define IS_SKL_PLUS(pci) (IS_SKL(pci) || IS_SKL_LP(pci) || IS_BXT(pci)) || \
|
||||
IS_KBL(pci) || IS_KBL_LP(pci) || IS_KBL_H(pci) || \
|
||||
- IS_GLK(pci)
|
||||
+ IS_GLK(pci) || IS_CFL(pci)
|
||||
|
||||
static char *driver_short_names[] = {
|
||||
[AZX_DRIVER_ICH] = "HDA Intel",
|
||||
@@ -2378,6 +2379,9 @@ static const struct pci_device_id azx_ids[] = {
|
||||
/* Kabylake-H */
|
||||
{ PCI_DEVICE(0x8086, 0xa2f0),
|
||||
.driver_data = AZX_DRIVER_PCH | AZX_DCAPS_INTEL_SKYLAKE },
|
||||
+ /* Coffelake */
|
||||
+ { PCI_DEVICE(0x8086, 0xa348),
|
||||
+ .driver_data = AZX_DRIVER_PCH | AZX_DCAPS_INTEL_SKYLAKE},
|
||||
/* Broxton-P(Apollolake) */
|
||||
{ PCI_DEVICE(0x8086, 0x5a98),
|
||||
.driver_data = AZX_DRIVER_PCH | AZX_DCAPS_INTEL_BROXTON },
|
||||
--
|
||||
2.13.1
|
||||
|
||||
+36
@@ -0,0 +1,36 @@
|
||||
From 12ee4022f67f8854061b46e5c0a7ad6258ab66c2 Mon Sep 17 00:00:00 2001
|
||||
From: "Subhransu S. Prusty" <subhransu.s.prusty@intel.com>
|
||||
Date: Wed, 12 Apr 2017 09:54:00 +0530
|
||||
Subject: [PATCH] ALSA: hda: Add Geminilake id to SKL_PLUS
|
||||
|
||||
Geminilake is Skylake family platform. So add it's id to skl_plus check.
|
||||
|
||||
Fixes: 126cfa2f5e15 ("ALSA: hda: Add Geminilake HDMI codec ID")
|
||||
Signed-off-by: Subhransu S. Prusty <subhransu.s.prusty@intel.com>
|
||||
Cc: Senthilnathan Veppur <senthilnathanx.veppur@intel.com>
|
||||
Cc: Vinod Koul <vinod.koul@intel.com>
|
||||
Cc: Takashi Iwai <tiwai@suse.de>
|
||||
Signed-off-by: Takashi Iwai <tiwai@suse.de>
|
||||
---
|
||||
sound/pci/hda/hda_intel.c | 4 +++-
|
||||
1 file changed, 3 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/sound/pci/hda/hda_intel.c b/sound/pci/hda/hda_intel.c
|
||||
index 59ab34fa0bc8..b786fbab029f 100644
|
||||
--- a/sound/pci/hda/hda_intel.c
|
||||
+++ b/sound/pci/hda/hda_intel.c
|
||||
@@ -370,8 +370,10 @@ enum {
|
||||
#define IS_KBL_LP(pci) ((pci)->vendor == 0x8086 && (pci)->device == 0x9d71)
|
||||
#define IS_KBL_H(pci) ((pci)->vendor == 0x8086 && (pci)->device == 0xa2f0)
|
||||
#define IS_BXT(pci) ((pci)->vendor == 0x8086 && (pci)->device == 0x5a98)
|
||||
+#define IS_GLK(pci) ((pci)->vendor == 0x8086 && (pci)->device == 0x3198)
|
||||
#define IS_SKL_PLUS(pci) (IS_SKL(pci) || IS_SKL_LP(pci) || IS_BXT(pci)) || \
|
||||
- IS_KBL(pci) || IS_KBL_LP(pci) || IS_KBL_H(pci)
|
||||
+ IS_KBL(pci) || IS_KBL_LP(pci) || IS_KBL_H(pci) || \
|
||||
+ IS_GLK(pci)
|
||||
|
||||
static char *driver_short_names[] = {
|
||||
[AZX_DRIVER_ICH] = "HDA Intel",
|
||||
--
|
||||
2.13.1
|
||||
|
||||
+78
@@ -0,0 +1,78 @@
|
||||
From 7480316c265c9fcdbf73b1b8dec061b893b7e987 Mon Sep 17 00:00:00 2001
|
||||
From: Takashi Iwai <tiwai@suse.de>
|
||||
Date: Mon, 10 Apr 2017 17:37:34 +0200
|
||||
Subject: [PATCH 2/4] ALSA: hda - Allow to enable/disable vmaster build
|
||||
explicitly
|
||||
|
||||
Another preliminary patch for the dual-codec support: since the
|
||||
support of vmaster over multiple codecs is difficult, simply disable
|
||||
it by a new flag to hda_codec struct. A new user hint is added as
|
||||
well for consistency.
|
||||
|
||||
Signed-off-by: Takashi Iwai <tiwai@suse.de>
|
||||
---
|
||||
Documentation/sound/hd-audio/notes.rst | 2 ++
|
||||
sound/pci/hda/hda_generic.c | 7 +++++--
|
||||
sound/pci/hda/hda_generic.h | 1 +
|
||||
3 files changed, 8 insertions(+), 2 deletions(-)
|
||||
|
||||
#diff --git a/Documentation/sound/hd-audio/notes.rst b/Documentation/sound/hd-audio/notes.rst
|
||||
#index 9eeb9b4..f59c3cd 100644
|
||||
#--- a/Documentation/sound/hd-audio/notes.rst
|
||||
#+++ b/Documentation/sound/hd-audio/notes.rst
|
||||
#@@ -494,6 +494,8 @@ add_hp_mic (bool)
|
||||
# hp_mic_detect (bool)
|
||||
# enable/disable the hp/mic shared input for a single built-in mic
|
||||
# case; default true
|
||||
#+vmaster (bool)
|
||||
#+ enable/disable the virtual Master control; default true
|
||||
# mixer_nid (int)
|
||||
# specifies the widget NID of the analog-loopback mixer
|
||||
#
|
||||
diff --git a/sound/pci/hda/hda_generic.c b/sound/pci/hda/hda_generic.c
|
||||
index 4438328..2842c82 100644
|
||||
--- a/sound/pci/hda/hda_generic.c
|
||||
+++ b/sound/pci/hda/hda_generic.c
|
||||
@@ -196,6 +196,9 @@ static void parse_user_hints(struct hda_codec *codec)
|
||||
val = snd_hda_get_bool_hint(codec, "hp_mic_detect");
|
||||
if (val >= 0)
|
||||
spec->suppress_hp_mic_detect = !val;
|
||||
+ val = snd_hda_get_bool_hint(codec, "vmaster");
|
||||
+ if (val >= 0)
|
||||
+ spec->suppress_vmaster = !val;
|
||||
|
||||
if (!snd_hda_get_int_hint(codec, "mixer_nid", &val))
|
||||
spec->mixer_nid = val;
|
||||
@@ -5033,7 +5036,7 @@ int snd_hda_gen_build_controls(struct hda_codec *codec)
|
||||
}
|
||||
|
||||
/* if we have no master control, let's create it */
|
||||
- if (!spec->no_analog &&
|
||||
+ if (!spec->no_analog && !spec->suppress_vmaster &&
|
||||
!snd_hda_find_mixer_ctl(codec, "Master Playback Volume")) {
|
||||
err = snd_hda_add_vmaster(codec, "Master Playback Volume",
|
||||
spec->vmaster_tlv, slave_pfxs,
|
||||
@@ -5041,7 +5044,7 @@ int snd_hda_gen_build_controls(struct hda_codec *codec)
|
||||
if (err < 0)
|
||||
return err;
|
||||
}
|
||||
- if (!spec->no_analog &&
|
||||
+ if (!spec->no_analog && !spec->suppress_vmaster &&
|
||||
!snd_hda_find_mixer_ctl(codec, "Master Playback Switch")) {
|
||||
err = __snd_hda_add_vmaster(codec, "Master Playback Switch",
|
||||
NULL, slave_pfxs,
|
||||
diff --git a/sound/pci/hda/hda_generic.h b/sound/pci/hda/hda_generic.h
|
||||
index f66fc7e..6177231 100644
|
||||
--- a/sound/pci/hda/hda_generic.h
|
||||
+++ b/sound/pci/hda/hda_generic.h
|
||||
@@ -229,6 +229,7 @@ struct hda_gen_spec {
|
||||
unsigned int add_jack_modes:1; /* add i/o jack mode enum ctls */
|
||||
unsigned int power_down_unused:1; /* power down unused widgets */
|
||||
unsigned int dac_min_mute:1; /* minimal = mute for DACs */
|
||||
+ unsigned int suppress_vmaster:1; /* don't create vmaster kctls */
|
||||
|
||||
/* other internal flags */
|
||||
unsigned int no_analog:1; /* digital I/O only */
|
||||
--
|
||||
2.10.2
|
||||
|
||||
+28
@@ -0,0 +1,28 @@
|
||||
From 63691587f7b0028326ddd1226c378aaaeca4d4e4 Mon Sep 17 00:00:00 2001
|
||||
From: Takashi Iwai <tiwai@suse.de>
|
||||
Date: Mon, 22 May 2017 16:32:46 +0200
|
||||
Subject: [PATCH] ALSA: hda - Apply dual-codec quirk for MSI Z270-Gaming mobo
|
||||
|
||||
MSI Z270-Gamin mobo has also two ALC1220 codecs like Gigabyte AZ370-
|
||||
Gaming mobo. Apply the same quirk to this one.
|
||||
|
||||
Signed-off-by: Takashi Iwai <tiwai@suse.de>
|
||||
---
|
||||
sound/pci/hda/patch_realtek.c | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
|
||||
index 9c22ad694534..3fdd5af190a4 100644
|
||||
--- a/sound/pci/hda/patch_realtek.c
|
||||
+++ b/sound/pci/hda/patch_realtek.c
|
||||
@@ -2328,6 +2328,7 @@ static const struct snd_pci_quirk alc882_fixup_tbl[] = {
|
||||
SND_PCI_QUIRK_VENDOR(0x1462, "MSI", ALC882_FIXUP_GPIO3),
|
||||
SND_PCI_QUIRK(0x1458, 0xa002, "Gigabyte EP45-DS3/Z87X-UD3H", ALC889_FIXUP_FRONT_HP_NO_PRESENCE),
|
||||
SND_PCI_QUIRK(0x1458, 0xa0b8, "Gigabyte AZ370-Gaming", ALC1220_FIXUP_GB_DUAL_CODECS),
|
||||
+ SND_PCI_QUIRK(0x1462, 0xda57, "MSI Z270-Gaming", ALC1220_FIXUP_GB_DUAL_CODECS),
|
||||
SND_PCI_QUIRK(0x147b, 0x107a, "Abit AW9D-MAX", ALC882_FIXUP_ABIT_AW9D_MAX),
|
||||
SND_PCI_QUIRK_VENDOR(0x1558, "Clevo laptop", ALC882_FIXUP_EAPD),
|
||||
SND_PCI_QUIRK(0x161f, 0x2054, "Medion laptop", ALC883_FIXUP_EAPD),
|
||||
--
|
||||
2.13.1
|
||||
|
||||
+38
@@ -0,0 +1,38 @@
|
||||
From c7ecb9068e6772c43941ce609f08bc53f36e1dce Mon Sep 17 00:00:00 2001
|
||||
From: Takashi Iwai <tiwai@suse.de>
|
||||
Date: Wed, 14 Jun 2017 07:37:14 +0200
|
||||
Subject: [PATCH] ALSA: hda - Apply quirks to Broxton-T, too
|
||||
|
||||
Broxton-T was a forgotten child and we didn't apply the quirks for
|
||||
Skylake+ properly. Meanwhile, a quirk for reducing the DMA latency
|
||||
seems specific to the early Broxton model, so we leave as is.
|
||||
|
||||
Cc: <stable@vger.kernel.org>
|
||||
Signed-off-by: Takashi Iwai <tiwai@suse.de>
|
||||
---
|
||||
sound/pci/hda/hda_intel.c | 7 ++++---
|
||||
1 file changed, 4 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/sound/pci/hda/hda_intel.c b/sound/pci/hda/hda_intel.c
|
||||
index e3c696c46a21..01eb1dc7b5b3 100644
|
||||
--- a/sound/pci/hda/hda_intel.c
|
||||
+++ b/sound/pci/hda/hda_intel.c
|
||||
@@ -370,11 +370,12 @@ enum {
|
||||
#define IS_KBL_LP(pci) ((pci)->vendor == 0x8086 && (pci)->device == 0x9d71)
|
||||
#define IS_KBL_H(pci) ((pci)->vendor == 0x8086 && (pci)->device == 0xa2f0)
|
||||
#define IS_BXT(pci) ((pci)->vendor == 0x8086 && (pci)->device == 0x5a98)
|
||||
+#define IS_BXT_T(pci) ((pci)->vendor == 0x8086 && (pci)->device == 0x1a98)
|
||||
#define IS_GLK(pci) ((pci)->vendor == 0x8086 && (pci)->device == 0x3198)
|
||||
#define IS_CFL(pci) ((pci)->vendor == 0x8086 && (pci)->device == 0xa348)
|
||||
-#define IS_SKL_PLUS(pci) (IS_SKL(pci) || IS_SKL_LP(pci) || IS_BXT(pci)) || \
|
||||
- IS_KBL(pci) || IS_KBL_LP(pci) || IS_KBL_H(pci) || \
|
||||
- IS_GLK(pci) || IS_CFL(pci)
|
||||
+#define IS_SKL_PLUS(pci) (IS_SKL(pci) || IS_SKL_LP(pci) || IS_BXT(pci) || \
|
||||
+ IS_BXT_T(pci) || IS_KBL(pci) || IS_KBL_LP(pci) || \
|
||||
+ IS_KBL_H(pci) || IS_GLK(pci) || IS_CFL(pci))
|
||||
|
||||
static char *driver_short_names[] = {
|
||||
[AZX_DRIVER_ICH] = "HDA Intel",
|
||||
--
|
||||
2.13.1
|
||||
|
||||
+42
@@ -0,0 +1,42 @@
|
||||
From d2c3b14e1f0dcebdb695617c0c1342a36b914a47 Mon Sep 17 00:00:00 2001
|
||||
From: Takashi Iwai <tiwai@suse.de>
|
||||
Date: Thu, 1 Jun 2017 09:35:30 +0200
|
||||
Subject: [PATCH] ALSA: hda - Fix applying MSI dual-codec mobo quirk
|
||||
|
||||
The previous commit [63691587f7b0: ALSA: hda - Apply dual-codec quirk
|
||||
for MSI Z270-Gaming mobo] attempted to apply the existing dual-codec
|
||||
quirk for a MSI mobo. But it turned out that this isn't applied
|
||||
properly due to the MSI-vendor quirk before this entry. I overlooked
|
||||
such two MSI entries just because they were put in the wrong position,
|
||||
although we have a list ordered by PCI SSID numbers.
|
||||
|
||||
This patch fixes it by rearranging the unordered entries.
|
||||
|
||||
Fixes: 63691587f7b0 ("ALSA: hda - Apply dual-codec quirk for MSI Z270-Gaming mobo")
|
||||
Reported-by: Rudolf Schmidt <info@rudolfschmidt.com>
|
||||
Signed-off-by: Takashi Iwai <tiwai@suse.de>
|
||||
---
|
||||
sound/pci/hda/patch_realtek.c | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
|
||||
index 918e45268915..a57988d617e9 100644
|
||||
--- a/sound/pci/hda/patch_realtek.c
|
||||
+++ b/sound/pci/hda/patch_realtek.c
|
||||
@@ -2324,11 +2324,11 @@ static const struct snd_pci_quirk alc882_fixup_tbl[] = {
|
||||
SND_PCI_QUIRK(0x106b, 0x4a00, "Macbook 5,2", ALC889_FIXUP_MBA11_VREF),
|
||||
|
||||
SND_PCI_QUIRK(0x1071, 0x8258, "Evesham Voyaeger", ALC882_FIXUP_EAPD),
|
||||
- SND_PCI_QUIRK(0x1462, 0x7350, "MSI-7350", ALC889_FIXUP_CD),
|
||||
- SND_PCI_QUIRK_VENDOR(0x1462, "MSI", ALC882_FIXUP_GPIO3),
|
||||
SND_PCI_QUIRK(0x1458, 0xa002, "Gigabyte EP45-DS3/Z87X-UD3H", ALC889_FIXUP_FRONT_HP_NO_PRESENCE),
|
||||
SND_PCI_QUIRK(0x1458, 0xa0b8, "Gigabyte AZ370-Gaming", ALC1220_FIXUP_GB_DUAL_CODECS),
|
||||
+ SND_PCI_QUIRK(0x1462, 0x7350, "MSI-7350", ALC889_FIXUP_CD),
|
||||
SND_PCI_QUIRK(0x1462, 0xda57, "MSI Z270-Gaming", ALC1220_FIXUP_GB_DUAL_CODECS),
|
||||
+ SND_PCI_QUIRK_VENDOR(0x1462, "MSI", ALC882_FIXUP_GPIO3),
|
||||
SND_PCI_QUIRK(0x147b, 0x107a, "Abit AW9D-MAX", ALC882_FIXUP_ABIT_AW9D_MAX),
|
||||
SND_PCI_QUIRK_VENDOR(0x1558, "Clevo laptop", ALC882_FIXUP_EAPD),
|
||||
SND_PCI_QUIRK(0x161f, 0x2054, "Medion laptop", ALC883_FIXUP_EAPD),
|
||||
--
|
||||
2.13.1
|
||||
|
||||
+122
@@ -0,0 +1,122 @@
|
||||
From 7beb3a6e9335d13872f24566b451f8371edd238f Mon Sep 17 00:00:00 2001
|
||||
From: Takashi Iwai <tiwai@suse.de>
|
||||
Date: Mon, 10 Apr 2017 18:05:52 +0200
|
||||
Subject: [PATCH 3/4] ALSA: hda - Support Gigabyte Gaming board with dual
|
||||
Realtek codecs
|
||||
|
||||
This patch adds some workarounds to make Gigabyte GA-AX370 Gaming 5
|
||||
board working without the conflicts of kctls, etc. In general, the
|
||||
dual codec configs result in the conflicts of the following stuff:
|
||||
- Master controls
|
||||
- Capture controls
|
||||
- Analog loopback controls
|
||||
In addition, the auto-mute and the auto-mic can't work well among
|
||||
multiple codecs.
|
||||
|
||||
The current "solution" is to disable all these features, and use UCM
|
||||
for a better PulseAudio management. For a dedicated UCM profile, the
|
||||
patch overrides the card longname so that the system an get a unique
|
||||
profile path.
|
||||
|
||||
Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=195305
|
||||
Signed-off-by: Takashi Iwai <tiwai@suse.de>
|
||||
---
|
||||
sound/pci/hda/patch_realtek.c | 61 +++++++++++++++++++++++++++++++++++++++++++
|
||||
1 file changed, 61 insertions(+)
|
||||
|
||||
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
|
||||
index 9371f1a..e81cf83 100644
|
||||
--- a/sound/pci/hda/patch_realtek.c
|
||||
+++ b/sound/pci/hda/patch_realtek.c
|
||||
@@ -1800,6 +1800,7 @@ enum {
|
||||
ALC882_FIXUP_NO_PRIMARY_HP,
|
||||
ALC887_FIXUP_ASUS_BASS,
|
||||
ALC887_FIXUP_BASS_CHMAP,
|
||||
+ ALC1220_FIXUP_GB_DUAL_CODECS,
|
||||
};
|
||||
|
||||
static void alc889_fixup_coef(struct hda_codec *codec,
|
||||
@@ -1962,6 +1963,61 @@ static void alc882_fixup_no_primary_hp(struct hda_codec *codec,
|
||||
static void alc_fixup_bass_chmap(struct hda_codec *codec,
|
||||
const struct hda_fixup *fix, int action);
|
||||
|
||||
+/* For dual-codec configuration, we need to disable some features to avoid
|
||||
+ * conflicts of kctls and PCM streams
|
||||
+ */
|
||||
+static void alc_fixup_dual_codecs(struct hda_codec *codec,
|
||||
+ const struct hda_fixup *fix, int action)
|
||||
+{
|
||||
+ struct alc_spec *spec = codec->spec;
|
||||
+
|
||||
+ if (action != HDA_FIXUP_ACT_PRE_PROBE)
|
||||
+ return;
|
||||
+ /* disable vmaster */
|
||||
+ spec->gen.suppress_vmaster = 1;
|
||||
+ /* auto-mute and auto-mic switch don't work with multiple codecs */
|
||||
+ spec->gen.suppress_auto_mute = 1;
|
||||
+ spec->gen.suppress_auto_mic = 1;
|
||||
+ /* disable aamix as well */
|
||||
+ spec->gen.mixer_nid = 0;
|
||||
+ /* add location prefix to avoid conflicts */
|
||||
+ codec->force_pin_prefix = 1;
|
||||
+}
|
||||
+
|
||||
+static void rename_ctl(struct hda_codec *codec, const char *oldname,
|
||||
+ const char *newname)
|
||||
+{
|
||||
+ struct snd_kcontrol *kctl;
|
||||
+
|
||||
+ kctl = snd_hda_find_mixer_ctl(codec, oldname);
|
||||
+ if (kctl)
|
||||
+ strcpy(kctl->id.name, newname);
|
||||
+}
|
||||
+
|
||||
+static void alc1220_fixup_gb_dual_codecs(struct hda_codec *codec,
|
||||
+ const struct hda_fixup *fix,
|
||||
+ int action)
|
||||
+{
|
||||
+ alc_fixup_dual_codecs(codec, fix, action);
|
||||
+ switch (action) {
|
||||
+ case HDA_FIXUP_ACT_PRE_PROBE:
|
||||
+ /* override card longname to provide a unique UCM profile */
|
||||
+ strcpy(codec->card->longname, "HDAudio-Gigabyte-ALC1220DualCodecs");
|
||||
+ break;
|
||||
+ case HDA_FIXUP_ACT_BUILD:
|
||||
+ /* rename Capture controls depending on the codec */
|
||||
+ rename_ctl(codec, "Capture Volume",
|
||||
+ codec->addr == 0 ?
|
||||
+ "Rear-Panel Capture Volume" :
|
||||
+ "Front-Panel Capture Volume");
|
||||
+ rename_ctl(codec, "Capture Switch",
|
||||
+ codec->addr == 0 ?
|
||||
+ "Rear-Panel Capture Switch" :
|
||||
+ "Front-Panel Capture Switch");
|
||||
+ break;
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
static const struct hda_fixup alc882_fixups[] = {
|
||||
[ALC882_FIXUP_ABIT_AW9D_MAX] = {
|
||||
.type = HDA_FIXUP_PINS,
|
||||
@@ -2198,6 +2254,10 @@ static const struct hda_fixup alc882_fixups[] = {
|
||||
.type = HDA_FIXUP_FUNC,
|
||||
.v.func = alc_fixup_bass_chmap,
|
||||
},
|
||||
+ [ALC1220_FIXUP_GB_DUAL_CODECS] = {
|
||||
+ .type = HDA_FIXUP_FUNC,
|
||||
+ .v.func = alc1220_fixup_gb_dual_codecs,
|
||||
+ },
|
||||
};
|
||||
|
||||
static const struct snd_pci_quirk alc882_fixup_tbl[] = {
|
||||
@@ -2267,6 +2327,7 @@ static const struct snd_pci_quirk alc882_fixup_tbl[] = {
|
||||
SND_PCI_QUIRK(0x1462, 0x7350, "MSI-7350", ALC889_FIXUP_CD),
|
||||
SND_PCI_QUIRK_VENDOR(0x1462, "MSI", ALC882_FIXUP_GPIO3),
|
||||
SND_PCI_QUIRK(0x1458, 0xa002, "Gigabyte EP45-DS3/Z87X-UD3H", ALC889_FIXUP_FRONT_HP_NO_PRESENCE),
|
||||
+ SND_PCI_QUIRK(0x1458, 0xa0b8, "Gigabyte AZ370-Gaming", ALC1220_FIXUP_GB_DUAL_CODECS),
|
||||
SND_PCI_QUIRK(0x147b, 0x107a, "Abit AW9D-MAX", ALC882_FIXUP_ABIT_AW9D_MAX),
|
||||
SND_PCI_QUIRK_VENDOR(0x1558, "Clevo laptop", ALC882_FIXUP_EAPD),
|
||||
SND_PCI_QUIRK(0x161f, 0x2054, "Medion laptop", ALC883_FIXUP_EAPD),
|
||||
--
|
||||
2.10.2
|
||||
|
||||
+42
@@ -0,0 +1,42 @@
|
||||
From 56798e6b3a2264b58d50b93cfd66586ede77d661 Mon Sep 17 00:00:00 2001
|
||||
From: Takashi Iwai <tiwai@suse.de>
|
||||
Date: Tue, 11 Apr 2017 08:10:52 +0200
|
||||
Subject: [PATCH 4/4] ALSA: hda - Use a helper function for renaming kctl names
|
||||
|
||||
Signed-off-by: Takashi Iwai <tiwai@suse.de>
|
||||
---
|
||||
sound/pci/hda/patch_realtek.c | 11 ++++-------
|
||||
1 file changed, 4 insertions(+), 7 deletions(-)
|
||||
|
||||
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
|
||||
index e81cf83..57eeefd 100644
|
||||
--- a/sound/pci/hda/patch_realtek.c
|
||||
+++ b/sound/pci/hda/patch_realtek.c
|
||||
@@ -4724,7 +4724,6 @@ static void alc282_fixup_asus_tx300(struct hda_codec *codec,
|
||||
{ 0x1b, 0x21114000 }, /* dock speaker pin */
|
||||
{}
|
||||
};
|
||||
- struct snd_kcontrol *kctl;
|
||||
|
||||
switch (action) {
|
||||
case HDA_FIXUP_ACT_PRE_PROBE:
|
||||
@@ -4739,12 +4738,10 @@ static void alc282_fixup_asus_tx300(struct hda_codec *codec,
|
||||
/* this is a bit tricky; give more sane names for the main
|
||||
* (tablet) speaker and the dock speaker, respectively
|
||||
*/
|
||||
- kctl = snd_hda_find_mixer_ctl(codec, "Speaker Playback Switch");
|
||||
- if (kctl)
|
||||
- strcpy(kctl->id.name, "Dock Speaker Playback Switch");
|
||||
- kctl = snd_hda_find_mixer_ctl(codec, "Bass Speaker Playback Switch");
|
||||
- if (kctl)
|
||||
- strcpy(kctl->id.name, "Speaker Playback Switch");
|
||||
+ rename_ctl(codec, "Speaker Playback Switch",
|
||||
+ "Dock Speaker Playback Switch");
|
||||
+ rename_ctl(codec, "Bass Speaker Playback Switch",
|
||||
+ "Speaker Playback Switch");
|
||||
break;
|
||||
}
|
||||
}
|
||||
--
|
||||
2.10.2
|
||||
|
||||
+102
@@ -0,0 +1,102 @@
|
||||
From 28f1f9b26cee161ddd3985b3eb78e3ffada08dda Mon Sep 17 00:00:00 2001
|
||||
From: Kailang Yang <kailang@realtek.com>
|
||||
Date: Wed, 4 Jan 2017 14:49:07 +0800
|
||||
Subject: [PATCH] ALSA: hda/realtek - Add new codec ID ALC299
|
||||
|
||||
ALC299 was similar as ALC225.
|
||||
Add headset support for ALC299.
|
||||
ALC3271 was for Dell rename.
|
||||
|
||||
Signed-off-by: Kailang Yang <kailang@realtek.com>
|
||||
Signed-off-by: Takashi Iwai <tiwai@suse.de>
|
||||
---
|
||||
sound/pci/hda/patch_realtek.c | 10 ++++++++++
|
||||
1 file changed, 10 insertions(+)
|
||||
|
||||
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
|
||||
index 1ae29fd..3c69647 100644
|
||||
--- a/sound/pci/hda/patch_realtek.c
|
||||
+++ b/sound/pci/hda/patch_realtek.c
|
||||
@@ -337,6 +337,7 @@ static void alc_fill_eapd_coef(struct hda_codec *codec)
|
||||
case 0x10ec0288:
|
||||
case 0x10ec0295:
|
||||
case 0x10ec0298:
|
||||
+ case 0x10ec0299:
|
||||
alc_update_coef_idx(codec, 0x10, 1<<9, 0);
|
||||
break;
|
||||
case 0x10ec0285:
|
||||
@@ -912,6 +913,7 @@ static struct alc_codec_rename_pci_table rename_pci_tbl[] = {
|
||||
{ 0x10ec0256, 0x1028, 0, "ALC3246" },
|
||||
{ 0x10ec0225, 0x1028, 0, "ALC3253" },
|
||||
{ 0x10ec0295, 0x1028, 0, "ALC3254" },
|
||||
+ { 0x10ec0299, 0x1028, 0, "ALC3271" },
|
||||
{ 0x10ec0670, 0x1025, 0, "ALC669X" },
|
||||
{ 0x10ec0676, 0x1025, 0, "ALC679X" },
|
||||
{ 0x10ec0282, 0x1043, 0, "ALC3229" },
|
||||
@@ -3716,6 +3718,7 @@ static void alc_headset_mode_unplugged(struct hda_codec *codec)
|
||||
break;
|
||||
case 0x10ec0225:
|
||||
case 0x10ec0295:
|
||||
+ case 0x10ec0299:
|
||||
alc_process_coef_fw(codec, coef0225);
|
||||
break;
|
||||
case 0x10ec0867:
|
||||
@@ -3823,6 +3826,7 @@ static void alc_headset_mode_mic_in(struct hda_codec *codec, hda_nid_t hp_pin,
|
||||
break;
|
||||
case 0x10ec0225:
|
||||
case 0x10ec0295:
|
||||
+ case 0x10ec0299:
|
||||
alc_update_coef_idx(codec, 0x45, 0x3f<<10, 0x31<<10);
|
||||
snd_hda_set_pin_ctl_cache(codec, hp_pin, 0);
|
||||
alc_process_coef_fw(codec, coef0225);
|
||||
@@ -3881,6 +3885,7 @@ static void alc_headset_mode_default(struct hda_codec *codec)
|
||||
switch (codec->core.vendor_id) {
|
||||
case 0x10ec0225:
|
||||
case 0x10ec0295:
|
||||
+ case 0x10ec0299:
|
||||
alc_process_coef_fw(codec, coef0225);
|
||||
break;
|
||||
case 0x10ec0255:
|
||||
@@ -3996,6 +4001,7 @@ static void alc_headset_mode_ctia(struct hda_codec *codec)
|
||||
break;
|
||||
case 0x10ec0225:
|
||||
case 0x10ec0295:
|
||||
+ case 0x10ec0299:
|
||||
alc_process_coef_fw(codec, coef0225);
|
||||
break;
|
||||
case 0x10ec0867:
|
||||
@@ -4089,6 +4095,7 @@ static void alc_headset_mode_omtp(struct hda_codec *codec)
|
||||
break;
|
||||
case 0x10ec0225:
|
||||
case 0x10ec0295:
|
||||
+ case 0x10ec0299:
|
||||
alc_process_coef_fw(codec, coef0225);
|
||||
break;
|
||||
}
|
||||
@@ -4173,6 +4180,7 @@ static void alc_determine_headset_type(struct hda_codec *codec)
|
||||
break;
|
||||
case 0x10ec0225:
|
||||
case 0x10ec0295:
|
||||
+ case 0x10ec0299:
|
||||
alc_process_coef_fw(codec, coef0225);
|
||||
msleep(800);
|
||||
val = alc_read_coef_idx(codec, 0x46);
|
||||
@@ -6219,6 +6227,7 @@ static int patch_alc269(struct hda_codec *codec)
|
||||
break;
|
||||
case 0x10ec0225:
|
||||
case 0x10ec0295:
|
||||
+ case 0x10ec0299:
|
||||
spec->codec_variant = ALC269_TYPE_ALC225;
|
||||
break;
|
||||
case 0x10ec0234:
|
||||
@@ -7256,6 +7265,7 @@ static const struct hda_device_id snd_hda_id_realtek[] = {
|
||||
HDA_CODEC_ENTRY(0x10ec0294, "ALC294", patch_alc269),
|
||||
HDA_CODEC_ENTRY(0x10ec0295, "ALC295", patch_alc269),
|
||||
HDA_CODEC_ENTRY(0x10ec0298, "ALC298", patch_alc269),
|
||||
+ HDA_CODEC_ENTRY(0x10ec0299, "ALC299", patch_alc269),
|
||||
HDA_CODEC_REV_ENTRY(0x10ec0861, 0x100340, "ALC660", patch_alc861),
|
||||
HDA_CODEC_ENTRY(0x10ec0660, "ALC660-VD", patch_alc861vd),
|
||||
HDA_CODEC_ENTRY(0x10ec0861, "ALC861", patch_alc861),
|
||||
--
|
||||
2.10.2
|
||||
|
||||
+45
@@ -0,0 +1,45 @@
|
||||
From a535ad57d0e6b959cd79914a1127caade36a9459 Mon Sep 17 00:00:00 2001
|
||||
From: Kailang Yang <kailang@realtek.com>
|
||||
Date: Mon, 16 Jan 2017 16:59:26 +0800
|
||||
Subject: [PATCH] ALSA: hda/realtek - New codec support of ALC1220
|
||||
|
||||
Add support for new codec of ALC1220.
|
||||
It's compatible with ALC882 & co.
|
||||
|
||||
Signed-off-by: Kailang Yang <kailang@realtek.com>
|
||||
Signed-off-by: Takashi Iwai <tiwai@suse.de>
|
||||
---
|
||||
sound/pci/hda/patch_realtek.c | 3 +++
|
||||
1 file changed, 3 insertions(+)
|
||||
|
||||
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
|
||||
index 3c69647..1c88da8 100644
|
||||
--- a/sound/pci/hda/patch_realtek.c
|
||||
+++ b/sound/pci/hda/patch_realtek.c
|
||||
@@ -380,6 +380,7 @@ static void alc_fill_eapd_coef(struct hda_codec *codec)
|
||||
break;
|
||||
case 0x10ec0899:
|
||||
case 0x10ec0900:
|
||||
+ case 0x10ec1220:
|
||||
alc_update_coef_idx(codec, 0x7, 1<<1, 0);
|
||||
break;
|
||||
}
|
||||
@@ -2310,6 +2311,7 @@ static int patch_alc882(struct hda_codec *codec)
|
||||
case 0x10ec0882:
|
||||
case 0x10ec0885:
|
||||
case 0x10ec0900:
|
||||
+ case 0x10ec1220:
|
||||
break;
|
||||
default:
|
||||
/* ALC883 and variants */
|
||||
@@ -7297,6 +7299,7 @@ static const struct hda_device_id snd_hda_id_realtek[] = {
|
||||
HDA_CODEC_ENTRY(0x10ec0892, "ALC892", patch_alc662),
|
||||
HDA_CODEC_ENTRY(0x10ec0899, "ALC898", patch_alc882),
|
||||
HDA_CODEC_ENTRY(0x10ec0900, "ALC1150", patch_alc882),
|
||||
+ HDA_CODEC_ENTRY(0x10ec1220, "ALC1220", patch_alc882),
|
||||
{} /* terminator */
|
||||
};
|
||||
MODULE_DEVICE_TABLE(hdaudio, snd_hda_id_realtek);
|
||||
--
|
||||
2.10.2
|
||||
|
||||
+85
@@ -0,0 +1,85 @@
|
||||
From 0a6f0600efc3df0179a33188c30b5026bd9d1c27 Mon Sep 17 00:00:00 2001
|
||||
From: Kailang Yang <kailang@realtek.com>
|
||||
Date: Fri, 30 Jun 2017 16:00:48 +0800
|
||||
Subject: [PATCH] ALSA: hda/realtek - New codecs support for
|
||||
ALC215/ALC285/ALC289
|
||||
|
||||
Add new codecs support for ALC215 ALC285 ALC289.
|
||||
|
||||
Signed-off-by: Kailang Yang <kailang@realtek.com>
|
||||
Signed-off-by: Takashi Iwai <tiwai@suse.de>
|
||||
---
|
||||
sound/pci/hda/patch_realtek.c | 14 ++++++++++++++
|
||||
1 file changed, 14 insertions(+)
|
||||
|
||||
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
|
||||
index 80c7c832d442..c39bc497650c 100644
|
||||
--- a/sound/pci/hda/patch_realtek.c
|
||||
+++ b/sound/pci/hda/patch_realtek.c
|
||||
@@ -327,6 +327,7 @@ static void alc_fill_eapd_coef(struct hd
|
||||
case 0x10ec0292:
|
||||
alc_update_coef_idx(codec, 0x4, 1<<15, 0);
|
||||
break;
|
||||
+ case 0x10ec0215:
|
||||
case 0x10ec0225:
|
||||
case 0x10ec0233:
|
||||
case 0x10ec0255:
|
||||
@@ -335,8 +336,10 @@ static void alc_fill_eapd_coef(struct hd
|
||||
case 0x10ec0283:
|
||||
case 0x10ec0286:
|
||||
case 0x10ec0288:
|
||||
+ case 0x10ec0285:
|
||||
case 0x10ec0295:
|
||||
case 0x10ec0298:
|
||||
+ case 0x10ec0289:
|
||||
case 0x10ec0299:
|
||||
alc_update_coef_idx(codec, 0x10, 1<<9, 0);
|
||||
break;
|
||||
@@ -2723,6 +2726,7 @@ enum {
|
||||
ALC269_TYPE_ALC298,
|
||||
ALC269_TYPE_ALC255,
|
||||
ALC269_TYPE_ALC256,
|
||||
+ ALC269_TYPE_ALC215,
|
||||
ALC269_TYPE_ALC225,
|
||||
ALC269_TYPE_ALC294,
|
||||
ALC269_TYPE_ALC700,
|
||||
@@ -2755,6 +2759,7 @@ static int alc269_parse_auto_config(stru
|
||||
case ALC269_TYPE_ALC298:
|
||||
case ALC269_TYPE_ALC255:
|
||||
case ALC269_TYPE_ALC256:
|
||||
+ case ALC269_TYPE_ALC215:
|
||||
case ALC269_TYPE_ALC225:
|
||||
case ALC269_TYPE_ALC294:
|
||||
case ALC269_TYPE_ALC700:
|
||||
@@ -6298,6 +6303,12 @@ static int patch_alc269(struct hda_codec
|
||||
spec->gen.mixer_nid = 0; /* ALC256 does not have any loopback mixer path */
|
||||
alc_update_coef_idx(codec, 0x36, 1 << 13, 1 << 5); /* Switch pcbeep path to Line in path*/
|
||||
break;
|
||||
+ case 0x10ec0215:
|
||||
+ case 0x10ec0285:
|
||||
+ case 0x10ec0289:
|
||||
+ spec->codec_variant = ALC269_TYPE_ALC215;
|
||||
+ spec->gen.mixer_nid = 0;
|
||||
+ break;
|
||||
case 0x10ec0225:
|
||||
case 0x10ec0295:
|
||||
case 0x10ec0299:
|
||||
@@ -7267,6 +7278,7 @@ static int patch_alc680(struct hda_codec
|
||||
* patch entries
|
||||
*/
|
||||
static const struct hda_device_id snd_hda_id_realtek[] = {
|
||||
+ HDA_CODEC_ENTRY(0x10ec0215, "ALC215", patch_alc269),
|
||||
HDA_CODEC_ENTRY(0x10ec0221, "ALC221", patch_alc269),
|
||||
HDA_CODEC_ENTRY(0x10ec0225, "ALC225", patch_alc269),
|
||||
HDA_CODEC_ENTRY(0x10ec0231, "ALC231", patch_alc269),
|
||||
@@ -7289,8 +7301,10 @@ static const struct hda_device_id snd_hd
|
||||
HDA_CODEC_ENTRY(0x10ec0282, "ALC282", patch_alc269),
|
||||
HDA_CODEC_ENTRY(0x10ec0283, "ALC283", patch_alc269),
|
||||
HDA_CODEC_ENTRY(0x10ec0284, "ALC284", patch_alc269),
|
||||
+ HDA_CODEC_ENTRY(0x10ec0285, "ALC285", patch_alc269),
|
||||
HDA_CODEC_ENTRY(0x10ec0286, "ALC286", patch_alc269),
|
||||
HDA_CODEC_ENTRY(0x10ec0288, "ALC288", patch_alc269),
|
||||
+ HDA_CODEC_ENTRY(0x10ec0289, "ALC289", patch_alc269),
|
||||
HDA_CODEC_ENTRY(0x10ec0290, "ALC290", patch_alc269),
|
||||
HDA_CODEC_ENTRY(0x10ec0292, "ALC292", patch_alc269),
|
||||
HDA_CODEC_ENTRY(0x10ec0293, "ALC293", patch_alc269),
|
||||
+68
@@ -0,0 +1,68 @@
|
||||
From 4731d5de4b1ca8d2565782cc3aeac392db07c075 Mon Sep 17 00:00:00 2001
|
||||
From: Kailang Yang <kailang@realtek.com>
|
||||
Date: Fri, 30 Jun 2017 15:22:57 +0800
|
||||
Subject: [PATCH] ALSA: hda/realtek - Remove ALC285 device ID
|
||||
|
||||
0x0285 Device ID was not used.
|
||||
It just assigned for alias of ALC293 as backup.
|
||||
So, remove it first.
|
||||
Because our new codec will use this device ID.
|
||||
|
||||
Signed-off-by: Kailang Yang <kailang@realtek.com>
|
||||
Signed-off-by: Takashi Iwai <tiwai@suse.de>
|
||||
---
|
||||
sound/pci/hda/patch_realtek.c | 9 +++------
|
||||
1 file changed, 3 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
|
||||
index c79491a1cd47..80c7c832d442 100644
|
||||
--- a/sound/pci/hda/patch_realtek.c
|
||||
+++ b/sound/pci/hda/patch_realtek.c
|
||||
@@ -340,7 +340,6 @@ static void alc_fill_eapd_coef(struct hda_codec *codec)
|
||||
case 0x10ec0299:
|
||||
alc_update_coef_idx(codec, 0x10, 1<<9, 0);
|
||||
break;
|
||||
- case 0x10ec0285:
|
||||
case 0x10ec0293:
|
||||
alc_update_coef_idx(codec, 0xa, 1<<13, 0);
|
||||
break;
|
||||
@@ -2738,7 +2737,7 @@ enum {
|
||||
ALC269_TYPE_ALC282,
|
||||
ALC269_TYPE_ALC283,
|
||||
ALC269_TYPE_ALC284,
|
||||
- ALC269_TYPE_ALC285,
|
||||
+ ALC269_TYPE_ALC293,
|
||||
ALC269_TYPE_ALC286,
|
||||
ALC269_TYPE_ALC298,
|
||||
ALC269_TYPE_ALC255,
|
||||
@@ -2764,7 +2763,7 @@ static int alc269_parse_auto_config(struct hda_codec *codec)
|
||||
case ALC269_TYPE_ALC269VC:
|
||||
case ALC269_TYPE_ALC280:
|
||||
case ALC269_TYPE_ALC284:
|
||||
- case ALC269_TYPE_ALC285:
|
||||
+ case ALC269_TYPE_ALC293:
|
||||
ssids = alc269va_ssids;
|
||||
break;
|
||||
case ALC269_TYPE_ALC269VB:
|
||||
@@ -6678,9 +6677,8 @@ static int patch_alc269(struct hda_codec *codec)
|
||||
case 0x10ec0292:
|
||||
spec->codec_variant = ALC269_TYPE_ALC284;
|
||||
break;
|
||||
- case 0x10ec0285:
|
||||
case 0x10ec0293:
|
||||
- spec->codec_variant = ALC269_TYPE_ALC285;
|
||||
+ spec->codec_variant = ALC269_TYPE_ALC293;
|
||||
break;
|
||||
case 0x10ec0286:
|
||||
case 0x10ec0288:
|
||||
@@ -7752,7 +7750,6 @@ static const struct hda_device_id snd_hda_id_realtek[] = {
|
||||
HDA_CODEC_ENTRY(0x10ec0282, "ALC282", patch_alc269),
|
||||
HDA_CODEC_ENTRY(0x10ec0283, "ALC283", patch_alc269),
|
||||
HDA_CODEC_ENTRY(0x10ec0284, "ALC284", patch_alc269),
|
||||
- HDA_CODEC_ENTRY(0x10ec0285, "ALC285", patch_alc269),
|
||||
HDA_CODEC_ENTRY(0x10ec0286, "ALC286", patch_alc269),
|
||||
HDA_CODEC_ENTRY(0x10ec0288, "ALC288", patch_alc269),
|
||||
HDA_CODEC_ENTRY(0x10ec0290, "ALC290", patch_alc269),
|
||||
--
|
||||
2.13.2
|
||||
|
||||
+30
@@ -0,0 +1,30 @@
|
||||
From a7498943b45d43f4a1abf37b75908c1edf840230 Mon Sep 17 00:00:00 2001
|
||||
From: Kailang Yang <kailang@realtek.com>
|
||||
Date: Tue, 11 Jul 2017 15:15:47 +0800
|
||||
Subject: [PATCH] ALSA: hda/realtek - New codec device ID for ALC1220
|
||||
|
||||
Codec ID is 0x1168.
|
||||
It is another ALC1220 codec.
|
||||
|
||||
Signed-off-by: Kailang Yang <kailang@realtek.com>
|
||||
|
||||
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
|
||||
index e2116d2..45d58fc 100644
|
||||
--- a/sound/pci/hda/patch_realtek.c
|
||||
+++ b/sound/pci/hda/patch_realtek.c
|
||||
@@ -380,6 +380,7 @@ static void alc_fill_eapd_coef(struct hd
|
||||
break;
|
||||
case 0x10ec0899:
|
||||
case 0x10ec0900:
|
||||
+ case 0x10ec1168:
|
||||
case 0x10ec1220:
|
||||
alc_update_coef_idx(codec, 0x7, 1<<1, 0);
|
||||
break;
|
||||
@@ -7331,6 +7332,7 @@ static const struct hda_device_id snd_hd
|
||||
HDA_CODEC_ENTRY(0x10ec0892, "ALC892", patch_alc662),
|
||||
HDA_CODEC_ENTRY(0x10ec0899, "ALC898", patch_alc882),
|
||||
HDA_CODEC_ENTRY(0x10ec0900, "ALC1150", patch_alc882),
|
||||
+ HDA_CODEC_ENTRY(0x10ec1168, "ALC1220", patch_alc882),
|
||||
HDA_CODEC_ENTRY(0x10ec1220, "ALC1220", patch_alc882),
|
||||
{} /* terminator */
|
||||
};
|
||||
+51
@@ -0,0 +1,51 @@
|
||||
From 1cd6472e3f8d3fdee0fd19f7088807b284d3080f Mon Sep 17 00:00:00 2001
|
||||
From: Jiri Olsa <jolsa@redhat.com>
|
||||
Date: Thu, 1 Dec 2016 14:00:25 +0100
|
||||
Subject: [PATCH] tools build: Make fixdep parsing wait for last target
|
||||
|
||||
The fixdep tool, among other things, replaces the target of the object
|
||||
in the gcc generated dependency output file.
|
||||
|
||||
The parsing code assumes there's only single target in the rule but this
|
||||
is not always the case as described in here:
|
||||
|
||||
https://gcc.gnu.org/ml/gcc-help/2016-11/msg00099.html
|
||||
|
||||
Make the fixdep code smart enough to skip all the possible targets.
|
||||
|
||||
Signed-off-by: Jiri Olsa <jolsa@kernel.org>
|
||||
Tested-by: Arnaldo Carvalho de Melo <acme@redhat.com>
|
||||
Acked-by: Peter Foley <pefoley2@pefoley.com>
|
||||
Cc: Wang Nan <wangnan0@huawei.com>
|
||||
Link: http://lkml.kernel.org/r/20161201130025.GA16430@krava
|
||||
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
|
||||
---
|
||||
tools/build/fixdep.c | 5 +++--
|
||||
1 file changed, 3 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/tools/build/fixdep.c b/tools/build/fixdep.c
|
||||
index 1521d36..734d154 100644
|
||||
--- a/tools/build/fixdep.c
|
||||
+++ b/tools/build/fixdep.c
|
||||
@@ -49,7 +49,7 @@ static void parse_dep_file(void *map, size_t len)
|
||||
char *end = m + len;
|
||||
char *p;
|
||||
char s[PATH_MAX];
|
||||
- int is_target;
|
||||
+ int is_target, has_target = 0;
|
||||
int saw_any_target = 0;
|
||||
int is_first_dep = 0;
|
||||
|
||||
@@ -67,7 +67,8 @@ static void parse_dep_file(void *map, size_t len)
|
||||
if (is_target) {
|
||||
/* The /next/ file is the first dependency */
|
||||
is_first_dep = 1;
|
||||
- } else {
|
||||
+ has_target = 1;
|
||||
+ } else if (has_target) {
|
||||
/* Save this token/filename */
|
||||
memcpy(s, m, p-m);
|
||||
s[p - m] = 0;
|
||||
--
|
||||
2.10.2
|
||||
|
||||
+237
@@ -0,0 +1,237 @@
|
||||
From abb26210a39522a6645bce3f438ed9a26bedb11b Mon Sep 17 00:00:00 2001
|
||||
From: Jiri Olsa <jolsa@kernel.org>
|
||||
Date: Tue, 6 Dec 2016 14:18:49 +0100
|
||||
Subject: [PATCH] perf tools: Force fixdep compilation at the start of the
|
||||
build
|
||||
|
||||
The fixdep tool needs to be built before everything else, because it fixes
|
||||
every object dependency file.
|
||||
|
||||
We handle this currently by making all objects to depend on fixdep, which is
|
||||
error prone and is easily forgotten when new object is added.
|
||||
|
||||
Instead of this, this patch force fixdep tool to be built as the first target
|
||||
in the separate make session. This way we don't need to handle extra fixdep
|
||||
dependencies and we are certain there's no fixdep race with any parallel make
|
||||
job.
|
||||
|
||||
Committer notes:
|
||||
|
||||
Testing it:
|
||||
|
||||
Before:
|
||||
|
||||
$ rm -rf /tmp/build/perf/ ; mkdir -p /tmp/build/perf ; make -k O=/tmp/build/perf -C tools/perf install-bin
|
||||
make: Entering directory '/home/acme/git/linux/tools/perf'
|
||||
BUILD: Doing 'make -j4' parallel build
|
||||
|
||||
Auto-detecting system features:
|
||||
... dwarf: [ on ]
|
||||
... dwarf_getlocations: [ on ]
|
||||
... glibc: [ on ]
|
||||
... gtk2: [ on ]
|
||||
... libaudit: [ on ]
|
||||
... libbfd: [ on ]
|
||||
... libelf: [ on ]
|
||||
... libnuma: [ on ]
|
||||
... numa_num_possible_cpus: [ on ]
|
||||
... libperl: [ on ]
|
||||
... libpython: [ on ]
|
||||
... libslang: [ on ]
|
||||
... libcrypto: [ on ]
|
||||
... libunwind: [ on ]
|
||||
... libdw-dwarf-unwind: [ on ]
|
||||
... zlib: [ on ]
|
||||
... lzma: [ on ]
|
||||
... get_cpuid: [ on ]
|
||||
... bpf: [ on ]
|
||||
|
||||
GEN /tmp/build/perf/common-cmds.h
|
||||
HOSTCC /tmp/build/perf/fixdep.o
|
||||
HOSTLD /tmp/build/perf/fixdep-in.o
|
||||
LINK /tmp/build/perf/fixdep
|
||||
MKDIR /tmp/build/perf/pmu-events/
|
||||
HOSTCC /tmp/build/perf/pmu-events/json.o
|
||||
MKDIR /tmp/build/perf/pmu-events/
|
||||
HOSTCC /tmp/build/perf/pmu-events/jsmn.o
|
||||
HOSTCC /tmp/build/perf/pmu-events/jevents.o
|
||||
HOSTLD /tmp/build/perf/pmu-events/jevents-in.o
|
||||
PERF_VERSION = 4.9.rc8.g868cd5
|
||||
CC /tmp/build/perf/perf-read-vdso32
|
||||
<SNIP>
|
||||
|
||||
After:
|
||||
|
||||
$ rm -rf /tmp/build/perf/ ; mkdir -p /tmp/build/perf ; make -k O=/tmp/build/perf -C tools/perf install-bin
|
||||
make: Entering directory '/home/acme/git/linux/tools/perf'
|
||||
BUILD: Doing 'make -j4' parallel build
|
||||
HOSTCC /tmp/build/perf/fixdep.o
|
||||
HOSTLD /tmp/build/perf/fixdep-in.o
|
||||
LINK /tmp/build/perf/fixdep
|
||||
|
||||
Auto-detecting system features:
|
||||
... dwarf: [ on ]
|
||||
... dwarf_getlocations: [ on ]
|
||||
... glibc: [ on ]
|
||||
... gtk2: [ on ]
|
||||
... libaudit: [ on ]
|
||||
... libbfd: [ on ]
|
||||
... libelf: [ on ]
|
||||
... libnuma: [ on ]
|
||||
... numa_num_possible_cpus: [ on ]
|
||||
... libperl: [ on ]
|
||||
... libpython: [ on ]
|
||||
... libslang: [ on ]
|
||||
... libcrypto: [ on ]
|
||||
... libunwind: [ on ]
|
||||
... libdw-dwarf-unwind: [ on ]
|
||||
... zlib: [ on ]
|
||||
... lzma: [ on ]
|
||||
... get_cpuid: [ on ]
|
||||
... bpf: [ on ]
|
||||
|
||||
GEN /tmp/build/perf/common-cmds.h
|
||||
MKDIR /tmp/build/perf/fd/
|
||||
CC /tmp/build/perf/fd/array.o
|
||||
LD /tmp/build/perf/fd/libapi-in.o
|
||||
MKDIR /tmp/build/perf/fs/
|
||||
CC /tmp/build/perf/event-parse.o
|
||||
CC /tmp/build/perf/fs/fs.o
|
||||
PERF_VERSION = 4.9.rc8.g57a92f
|
||||
CC /tmp/build/perf/event-plugin.o
|
||||
MKDIR /tmp/build/perf/fs/
|
||||
CC /tmp/build/perf/fs/tracing_path.o
|
||||
<SNIP>
|
||||
|
||||
Signed-off-by: Jiri Olsa <jolsa@kernel.org>
|
||||
Tested-by: Arnaldo Carvalho de Melo <acme@redhat.com>
|
||||
Cc: David Ahern <dsahern@gmail.com>
|
||||
Cc: Namhyung Kim <namhyung@kernel.org>
|
||||
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
|
||||
Link: http://lkml.kernel.org/r/1481030331-31944-3-git-send-email-jolsa@kernel.org
|
||||
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
|
||||
---
|
||||
tools/perf/Makefile.perf | 50 ++++++++++++++++++++++++++++++++++++------------
|
||||
1 file changed, 38 insertions(+), 12 deletions(-)
|
||||
|
||||
diff --git a/tools/perf/Makefile.perf b/tools/perf/Makefile.perf
|
||||
index 9e5a6e1..33b1d9f 100644
|
||||
--- a/tools/perf/Makefile.perf
|
||||
+++ b/tools/perf/Makefile.perf
|
||||
@@ -177,6 +177,35 @@ ifeq ($(filter-out $(NON_CONFIG_TARGETS)
|
||||
endif
|
||||
endif
|
||||
|
||||
+# The fixdep build - we force fixdep tool to be built as
|
||||
+# the first target in the separate make session not to be
|
||||
+# disturbed by any parallel make jobs. Once fixdep is done
|
||||
+# we issue the requested build with FIXDEP=1 variable.
|
||||
+#
|
||||
+# The fixdep build is disabled for $(NON_CONFIG_TARGETS)
|
||||
+# targets, because it's not necessary.
|
||||
+
|
||||
+ifdef FIXDEP
|
||||
+ force_fixdep := 0
|
||||
+else
|
||||
+ force_fixdep := $(config)
|
||||
+endif
|
||||
+
|
||||
+export srctree OUTPUT RM CC CXX LD AR CFLAGS CXXFLAGS V BISON FLEX AWK
|
||||
+export HOSTCC HOSTLD HOSTAR
|
||||
+
|
||||
+include $(srctree)/tools/build/Makefile.include
|
||||
+
|
||||
+ifeq ($(force_fixdep),1)
|
||||
+goals := $(filter-out all sub-make, $(MAKECMDGOALS))
|
||||
+
|
||||
+$(goals) all: sub-make
|
||||
+
|
||||
+sub-make: fixdep
|
||||
+ $(Q)$(MAKE) FIXDEP=1 -f Makefile.perf $(goals)
|
||||
+
|
||||
+else # force_fixdep
|
||||
+
|
||||
# Set FEATURE_TESTS to 'all' so all possible feature checkers are executed.
|
||||
# Without this setting the output feature dump file misses some features, for
|
||||
# example, liberty. Select all checkers so we won't get an incomplete feature
|
||||
@@ -348,10 +377,6 @@ strip: $(PROGRAMS) $(OUTPUT)perf
|
||||
|
||||
PERF_IN := $(OUTPUT)perf-in.o
|
||||
|
||||
-export srctree OUTPUT RM CC LD AR CFLAGS V BISON FLEX AWK
|
||||
-export HOSTCC HOSTLD HOSTAR
|
||||
-include $(srctree)/tools/build/Makefile.include
|
||||
-
|
||||
JEVENTS := $(OUTPUT)pmu-events/jevents
|
||||
JEVENTS_IN := $(OUTPUT)pmu-events/jevents-in.o
|
||||
|
||||
@@ -470,7 +495,7 @@ $(OUTPUT)perf: $(PERFLIBS) $(PERF_IN) $(
|
||||
$(QUIET_LINK)$(CC) $(CFLAGS) $(LDFLAGS) $(LIBTRACEEVENT_DYNAMIC_LIST_LDFLAGS) \
|
||||
$(PERF_IN) $(PMU_EVENTS_IN) $(LIBS) -o $@
|
||||
|
||||
-$(GTK_IN): fixdep FORCE
|
||||
+$(GTK_IN): FORCE
|
||||
$(Q)$(MAKE) $(build)=gtk
|
||||
|
||||
$(OUTPUT)libperf-gtk.so: $(GTK_IN) $(PERFLIBS)
|
||||
@@ -515,7 +540,7 @@ endif
|
||||
__build-dir = $(subst $(OUTPUT),,$(dir $@))
|
||||
build-dir = $(if $(__build-dir),$(__build-dir),.)
|
||||
|
||||
-prepare: $(OUTPUT)PERF-VERSION-FILE $(OUTPUT)common-cmds.h fixdep archheaders
|
||||
+prepare: $(OUTPUT)PERF-VERSION-FILE $(OUTPUT)common-cmds.h archheaders
|
||||
|
||||
$(OUTPUT)%.o: %.c prepare FORCE
|
||||
$(Q)$(MAKE) -f $(srctree)/tools/build/Makefile.build dir=$(build-dir) $@
|
||||
@@ -555,7 +580,7 @@ $(patsubst perf-%,%.o,$(PROGRAMS)): $(wi
|
||||
|
||||
LIBPERF_IN := $(OUTPUT)libperf-in.o
|
||||
|
||||
-$(LIBPERF_IN): prepare fixdep FORCE
|
||||
+$(LIBPERF_IN): prepare FORCE
|
||||
$(Q)$(MAKE) $(build)=libperf
|
||||
|
||||
$(LIB_FILE): $(LIBPERF_IN)
|
||||
@@ -563,10 +588,10 @@ $(LIB_FILE): $(LIBPERF_IN)
|
||||
|
||||
LIBTRACEEVENT_FLAGS += plugin_dir=$(plugindir_SQ)
|
||||
|
||||
-$(LIBTRACEEVENT): fixdep FORCE
|
||||
+$(LIBTRACEEVENT): FORCE
|
||||
$(Q)$(MAKE) -C $(TRACE_EVENT_DIR) $(LIBTRACEEVENT_FLAGS) O=$(OUTPUT) $(OUTPUT)libtraceevent.a
|
||||
|
||||
-libtraceevent_plugins: fixdep FORCE
|
||||
+libtraceevent_plugins: FORCE
|
||||
$(Q)$(MAKE) -C $(TRACE_EVENT_DIR) $(LIBTRACEEVENT_FLAGS) O=$(OUTPUT) plugins
|
||||
|
||||
$(LIBTRACEEVENT_DYNAMIC_LIST): libtraceevent_plugins
|
||||
@@ -579,21 +604,21 @@ $(LIBTRACEEVENT)-clean:
|
||||
install-traceevent-plugins: libtraceevent_plugins
|
||||
$(Q)$(MAKE) -C $(TRACE_EVENT_DIR) $(LIBTRACEEVENT_FLAGS) O=$(OUTPUT) install_plugins
|
||||
|
||||
-$(LIBAPI): fixdep FORCE
|
||||
+$(LIBAPI): FORCE
|
||||
$(Q)$(MAKE) -C $(LIB_DIR) O=$(OUTPUT) $(OUTPUT)libapi.a
|
||||
|
||||
$(LIBAPI)-clean:
|
||||
$(call QUIET_CLEAN, libapi)
|
||||
$(Q)$(MAKE) -C $(LIB_DIR) O=$(OUTPUT) clean >/dev/null
|
||||
|
||||
-$(LIBBPF): fixdep FORCE
|
||||
+$(LIBBPF): FORCE
|
||||
$(Q)$(MAKE) -C $(BPF_DIR) O=$(OUTPUT) $(OUTPUT)libbpf.a FEATURES_DUMP=$(FEATURE_DUMP_EXPORT)
|
||||
|
||||
$(LIBBPF)-clean:
|
||||
$(call QUIET_CLEAN, libbpf)
|
||||
$(Q)$(MAKE) -C $(BPF_DIR) O=$(OUTPUT) clean >/dev/null
|
||||
|
||||
-$(LIBSUBCMD): fixdep FORCE
|
||||
+$(LIBSUBCMD): FORCE
|
||||
$(Q)$(MAKE) -C $(SUBCMD_DIR) O=$(OUTPUT) $(OUTPUT)libsubcmd.a
|
||||
|
||||
$(LIBSUBCMD)-clean:
|
||||
@@ -790,3 +815,4 @@ FORCE:
|
||||
.PHONY: $(GIT-HEAD-PHONY) TAGS tags cscope FORCE prepare
|
||||
.PHONY: libtraceevent_plugins archheaders
|
||||
|
||||
+endif # force_fixdep
|
||||
+49
@@ -0,0 +1,49 @@
|
||||
From 8ac1eb7bab7c8d9d6f00b3e2a408611c45d9dff0 Mon Sep 17 00:00:00 2001
|
||||
From: Jiri Olsa <jolsa@kernel.org>
|
||||
Date: Tue, 6 Dec 2016 14:18:50 +0100
|
||||
Subject: [PATCH] perf tools: Move perf build related variables under non
|
||||
fixdep leg
|
||||
|
||||
Because there's no need for them in fixdep build.
|
||||
|
||||
Signed-off-by: Jiri Olsa <jolsa@kernel.org>
|
||||
Cc: David Ahern <dsahern@gmail.com>
|
||||
Cc: Namhyung Kim <namhyung@kernel.org>
|
||||
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
|
||||
Link: http://lkml.kernel.org/r/1481030331-31944-4-git-send-email-jolsa@kernel.org
|
||||
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
|
||||
---
|
||||
tools/perf/Makefile.perf | 10 +++++-----
|
||||
1 file changed, 5 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/tools/perf/Makefile.perf b/tools/perf/Makefile.perf
|
||||
index 33b1d9f..8f1c258 100644
|
||||
--- a/tools/perf/Makefile.perf
|
||||
+++ b/tools/perf/Makefile.perf
|
||||
@@ -164,11 +164,6 @@ BISON = bison
|
||||
STRIP = strip
|
||||
AWK = awk
|
||||
|
||||
-LIB_DIR = $(srctree)/tools/lib/api/
|
||||
-TRACE_EVENT_DIR = $(srctree)/tools/lib/traceevent/
|
||||
-BPF_DIR = $(srctree)/tools/lib/bpf/
|
||||
-SUBCMD_DIR = $(srctree)/tools/lib/subcmd/
|
||||
-
|
||||
# include Makefile.config by default and rule out
|
||||
# non-config cases
|
||||
config := 1
|
||||
@@ -210,6 +205,11 @@ sub-make: fixdep
|
||||
|
||||
else # force_fixdep
|
||||
|
||||
+LIB_DIR = $(srctree)/tools/lib/api/
|
||||
+TRACE_EVENT_DIR = $(srctree)/tools/lib/traceevent/
|
||||
+BPF_DIR = $(srctree)/tools/lib/bpf/
|
||||
+SUBCMD_DIR = $(srctree)/tools/lib/subcmd/
|
||||
+
|
||||
# Set FEATURE_TESTS to 'all' so all possible feature checkers are executed.
|
||||
# Without this setting the output feature dump file misses some features, for
|
||||
# example, liberty. Select all checkers so we won't get an incomplete feature
|
||||
--
|
||||
2.10.2
|
||||
|
||||
+10
@@ -0,0 +1,10 @@
|
||||
--- linux/tools/testing/selftests/Makefile.orig
|
||||
+++ linux/tools/testing/selftests/Makefile
|
||||
@@ -16,7 +16,6 @@ TARGETS += mount
|
||||
TARGETS += mqueue
|
||||
TARGETS += net
|
||||
TARGETS += nsfs
|
||||
-TARGETS += powerpc
|
||||
TARGETS += pstore
|
||||
TARGETS += ptrace
|
||||
TARGETS += seccomp
|
||||
-42
@@ -1,42 +0,0 @@
|
||||
From 9cad39fe4e4a4fe95d8ea5a7b0692b0a6e89e38b Mon Sep 17 00:00:00 2001
|
||||
From: Konrad Leszczynski <konrad.leszczynski@intel.com>
|
||||
Date: Mon, 8 Feb 2016 16:13:12 +0100
|
||||
Subject: [PATCH] usb: dwc3: fix for the isoc transfer EP_BUSY flag
|
||||
|
||||
commit f3af36511e60 ("usb: dwc3: gadget: always
|
||||
enable IOC on bulk/interrupt transfers") ended up
|
||||
regressing Isochronous endpoints by clearing
|
||||
DWC3_EP_BUSY flag too early, which resulted in
|
||||
choppy audio playback over USB.
|
||||
|
||||
Fix that by partially reverting original commit and
|
||||
making sure that we check for isochronous endpoints.
|
||||
|
||||
Fixes: f3af36511e60 ("usb: dwc3: gadget: always enable IOC
|
||||
on bulk/interrupt transfers")
|
||||
Cc: <stable@vger.kernel.org>
|
||||
Signed-off-by: Konrad Leszczynski <konrad.leszczynski@intel.com>
|
||||
Signed-off-by: Rafal Redzimski <rafal.f.redzimski@intel.com>
|
||||
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
|
||||
---
|
||||
drivers/usb/dwc3/gadget.c | 4 ++++
|
||||
1 file changed, 4 insertions(+)
|
||||
|
||||
diff --git a/drivers/usb/dwc3/gadget.c b/drivers/usb/dwc3/gadget.c
|
||||
index 5e7b2ba..867adc9 100644
|
||||
--- a/drivers/usb/dwc3/gadget.c
|
||||
+++ b/drivers/usb/dwc3/gadget.c
|
||||
@@ -2058,6 +2058,10 @@ static int dwc3_cleanup_done_reqs(struct dwc3 *dwc, struct dwc3_ep *dep,
|
||||
return 1;
|
||||
}
|
||||
|
||||
+ if (usb_endpoint_xfer_isoc(dep->endpoint.desc))
|
||||
+ if ((event->status & DEPEVT_STATUS_IOC) &&
|
||||
+ (trb->ctrl & DWC3_TRB_CTRL_IOC))
|
||||
+ return 0;
|
||||
return 1;
|
||||
}
|
||||
|
||||
--
|
||||
2.9.2
|
||||
|
||||
-80
@@ -1,80 +0,0 @@
|
||||
From 4fdef698383db07d829da567e0e405fc41ff3a89 Mon Sep 17 00:00:00 2001
|
||||
From: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
|
||||
Date: Wed, 8 Jun 2016 16:32:49 +0900
|
||||
Subject: [PATCH] usb: renesas_usbhs: fix NULL pointer dereference in
|
||||
xfer_work()
|
||||
|
||||
This patch fixes an issue that the xfer_work() is possible to cause
|
||||
NULL pointer dereference if the usb cable is disconnected while data
|
||||
transfer is running.
|
||||
|
||||
In such case, a gadget driver may call usb_ep_disable()) before
|
||||
xfer_work() is actually called. In this case, the usbhs_pkt_pop()
|
||||
will call usbhsf_fifo_unselect(), and then usbhs_pipe_to_fifo()
|
||||
in xfer_work() will return NULL.
|
||||
|
||||
Fixes: e73a989 ("usb: renesas_usbhs: add DMAEngine support")
|
||||
Cc: <stable@vger.kernel.org> # v3.1+
|
||||
Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
|
||||
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
|
||||
---
|
||||
drivers/usb/renesas_usbhs/fifo.c | 18 ++++++++++++++----
|
||||
1 file changed, 14 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/drivers/usb/renesas_usbhs/fifo.c b/drivers/usb/renesas_usbhs/fifo.c
|
||||
index 7be4e7d..280ed5f 100644
|
||||
--- a/drivers/usb/renesas_usbhs/fifo.c
|
||||
+++ b/drivers/usb/renesas_usbhs/fifo.c
|
||||
@@ -810,20 +810,27 @@ static void xfer_work(struct work_struct *work)
|
||||
{
|
||||
struct usbhs_pkt *pkt = container_of(work, struct usbhs_pkt, work);
|
||||
struct usbhs_pipe *pipe = pkt->pipe;
|
||||
- struct usbhs_fifo *fifo = usbhs_pipe_to_fifo(pipe);
|
||||
+ struct usbhs_fifo *fifo;
|
||||
struct usbhs_priv *priv = usbhs_pipe_to_priv(pipe);
|
||||
struct dma_async_tx_descriptor *desc;
|
||||
- struct dma_chan *chan = usbhsf_dma_chan_get(fifo, pkt);
|
||||
+ struct dma_chan *chan;
|
||||
struct device *dev = usbhs_priv_to_dev(priv);
|
||||
enum dma_transfer_direction dir;
|
||||
+ unsigned long flags;
|
||||
|
||||
+ usbhs_lock(priv, flags);
|
||||
+ fifo = usbhs_pipe_to_fifo(pipe);
|
||||
+ if (!fifo)
|
||||
+ goto xfer_work_end;
|
||||
+
|
||||
+ chan = usbhsf_dma_chan_get(fifo, pkt);
|
||||
dir = usbhs_pipe_is_dir_in(pipe) ? DMA_DEV_TO_MEM : DMA_MEM_TO_DEV;
|
||||
|
||||
desc = dmaengine_prep_slave_single(chan, pkt->dma + pkt->actual,
|
||||
pkt->trans, dir,
|
||||
DMA_PREP_INTERRUPT | DMA_CTRL_ACK);
|
||||
if (!desc)
|
||||
- return;
|
||||
+ goto xfer_work_end;
|
||||
|
||||
desc->callback = usbhsf_dma_complete;
|
||||
desc->callback_param = pipe;
|
||||
@@ -831,7 +838,7 @@ static void xfer_work(struct work_struct *work)
|
||||
pkt->cookie = dmaengine_submit(desc);
|
||||
if (pkt->cookie < 0) {
|
||||
dev_err(dev, "Failed to submit dma descriptor\n");
|
||||
- return;
|
||||
+ goto xfer_work_end;
|
||||
}
|
||||
|
||||
dev_dbg(dev, " %s %d (%d/ %d)\n",
|
||||
@@ -842,6 +849,9 @@ static void xfer_work(struct work_struct *work)
|
||||
usbhs_pipe_set_trans_count_if_bulk(pipe, pkt->trans);
|
||||
dma_async_issue_pending(chan);
|
||||
usbhs_pipe_enable(pipe);
|
||||
+
|
||||
+xfer_work_end:
|
||||
+ usbhs_unlock(priv, flags);
|
||||
}
|
||||
|
||||
/*
|
||||
--
|
||||
2.9.2
|
||||
|
||||
-101
@@ -1,101 +0,0 @@
|
||||
From 4ce827b4cc58bec7952591b96cce2b28553e4d5b Mon Sep 17 00:00:00 2001
|
||||
From: Josh Poimboeuf <jpoimboe@redhat.com>
|
||||
Date: Thu, 28 Jul 2016 23:15:21 +0200
|
||||
Subject: [PATCH] x86/power/64: Fix hibernation return address corruption
|
||||
|
||||
In kernel bug 150021, a kernel panic was reported when restoring a
|
||||
hibernate image. Only a picture of the oops was reported, so I can't
|
||||
paste the whole thing here. But here are the most interesting parts:
|
||||
|
||||
kernel tried to execute NX-protected page - exploit attempt? (uid: 0)
|
||||
BUG: unable to handle kernel paging request at ffff8804615cfd78
|
||||
...
|
||||
RIP: ffff8804615cfd78
|
||||
RSP: ffff8804615f0000
|
||||
RBP: ffff8804615cfdc0
|
||||
...
|
||||
Call Trace:
|
||||
do_signal+0x23
|
||||
exit_to_usermode_loop+0x64
|
||||
...
|
||||
|
||||
The RIP is on the same page as RBP, so it apparently started executing
|
||||
on the stack.
|
||||
|
||||
The bug was bisected to commit ef0f3ed5a4ac (x86/asm/power: Create
|
||||
stack frames in hibernate_asm_64.S), which in retrospect seems quite
|
||||
dangerous, since that code saves and restores the stack pointer from a
|
||||
global variable ('saved_context').
|
||||
|
||||
There are a lot of moving parts in the hibernate save and restore paths,
|
||||
so I don't know exactly what caused the panic. Presumably, a FRAME_END
|
||||
was executed without the corresponding FRAME_BEGIN, or vice versa. That
|
||||
would corrupt the return address on the stack and would be consistent
|
||||
with the details of the above panic.
|
||||
|
||||
[ rjw: One major problem is that by the time the FRAME_BEGIN in
|
||||
restore_registers() is executed, the stack pointer value may not
|
||||
be valid any more. Namely, the stack area pointed to by it
|
||||
previously may have been overwritten by some image memory contents
|
||||
and that page frame may now be used for whatever different purpose
|
||||
it had been allocated for before hibernation. In that case, the
|
||||
FRAME_BEGIN will corrupt that memory. ]
|
||||
|
||||
Instead of doing the frame pointer save/restore around the bounds of the
|
||||
affected functions, just do it around the call to swsusp_save().
|
||||
|
||||
That has the same effect of ensuring that if swsusp_save() sleeps, the
|
||||
frame pointers will be correct. It's also a much more obviously safe
|
||||
way to do it than the original patch. And objtool still doesn't report
|
||||
any warnings.
|
||||
|
||||
Fixes: ef0f3ed5a4ac (x86/asm/power: Create stack frames in hibernate_asm_64.S)
|
||||
Link: https://bugzilla.kernel.org/show_bug.cgi?id=150021
|
||||
Cc: 4.6+ <stable@vger.kernel.org> # 4.6+
|
||||
Reported-by: Andre Reinke <andre.reinke@mailbox.org>
|
||||
Tested-by: Andre Reinke <andre.reinke@mailbox.org>
|
||||
Signed-off-by: Josh Poimboeuf <jpoimboe@redhat.com>
|
||||
Acked-by: Ingo Molnar <mingo@kernel.org>
|
||||
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
|
||||
---
|
||||
arch/x86/power/hibernate_asm_64.S | 4 +---
|
||||
1 file changed, 1 insertion(+), 3 deletions(-)
|
||||
|
||||
diff --git a/arch/x86/power/hibernate_asm_64.S b/arch/x86/power/hibernate_asm_64.S
|
||||
index 3177c2b..8eee0e9 100644
|
||||
--- a/arch/x86/power/hibernate_asm_64.S
|
||||
+++ b/arch/x86/power/hibernate_asm_64.S
|
||||
@@ -24,7 +24,6 @@
|
||||
#include <asm/frame.h>
|
||||
|
||||
ENTRY(swsusp_arch_suspend)
|
||||
- FRAME_BEGIN
|
||||
movq $saved_context, %rax
|
||||
movq %rsp, pt_regs_sp(%rax)
|
||||
movq %rbp, pt_regs_bp(%rax)
|
||||
@@ -48,6 +47,7 @@ ENTRY(swsusp_arch_suspend)
|
||||
movq %cr3, %rax
|
||||
movq %rax, restore_cr3(%rip)
|
||||
|
||||
+ FRAME_BEGIN
|
||||
call swsusp_save
|
||||
FRAME_END
|
||||
ret
|
||||
@@ -104,7 +104,6 @@ ENTRY(core_restore_code)
|
||||
/* code below belongs to the image kernel */
|
||||
.align PAGE_SIZE
|
||||
ENTRY(restore_registers)
|
||||
- FRAME_BEGIN
|
||||
/* go back to the original page tables */
|
||||
movq %r9, %cr3
|
||||
|
||||
@@ -145,6 +144,5 @@ ENTRY(restore_registers)
|
||||
/* tell the hibernation core that we've just restored the memory */
|
||||
movq %rax, in_suspend(%rip)
|
||||
|
||||
- FRAME_END
|
||||
ret
|
||||
ENDPROC(restore_registers)
|
||||
--
|
||||
2.9.2
|
||||
|
||||
+64
-37
@@ -12,7 +12,7 @@
|
||||
<IsA>app:gui</IsA>
|
||||
<Summary>Performance analyser tool that makes full use of the Linux performance counter subsystem</Summary>
|
||||
<Description>perf is a new tool which is used to optimize, validate and measure applications, workloads or the full system through the Linux performance counter subsystem.</Description>
|
||||
<Archive sha1sum="36922e152e9268a68070577c613da502a6c3d577" type="targz">https://www.kernel.org/pub/linux/kernel/v4.x/linux-4.7.tar.gz</Archive>
|
||||
<Archive sha1sum="60a47e858fce153c5bedd7e293a1b45e8d2db054" type="targz">https://www.kernel.org/pub/linux/kernel/v4.x/linux-4.9.tar.gz</Archive>
|
||||
<BuildDependencies>
|
||||
<Dependency>libunwind-devel</Dependency>
|
||||
<Dependency>audit-devel</Dependency>
|
||||
@@ -36,25 +36,22 @@
|
||||
</BuildDependencies>
|
||||
<Patches>
|
||||
<!-- Linux patches -->
|
||||
<!--Patch level="1" compressionType="xz">patches/linux/patch-4.6.3.xz</Patch-->
|
||||
<!-- Mageia Linux patches // compatible with http://svnweb.mageia.org/packages/cauldron/kernel/releases/4.7.0/2.mga6/PATCHES/patches/series-->
|
||||
<Patch level="1" compressionType="xz">patches/linux/patch-4.9.63.xz</Patch>
|
||||
<!-- Mageia Linux patches // compatible with http://svnweb.mageia.org/packages/cauldron/kernel/releases/4.9.40/1.mga7/PATCHES/patches/series-->
|
||||
<!--stable patches-->
|
||||
<!--CVE-2016-8405-->
|
||||
<!--other patches-->
|
||||
<Patch level="1">patches/mageia/Revert-ipmi-Start-the-timer-and-thread-on-internal-m.patch</Patch>
|
||||
<Patch level="1">patches/mageia/x86-pci-toshiba-equium-a60-assign-busses.patch</Patch>
|
||||
<Patch level="1">patches/mageia/x86-boot-video-80x25-if-break.patch</Patch>
|
||||
<Patch level="1">patches/mageia/x86-default_poweroff_up_machines.patch</Patch>
|
||||
<Patch level="1">patches/mageia/x86-increase-default-minimum-vmalloc-area-by-64MB-to-192MB.patch</Patch>
|
||||
<Patch level="1">patches/mageia/Revert-cpufreq-pcc-Enable-autoload-of-pcc-cpufreq-fo.patch</Patch>
|
||||
<Patch level="1">patches/mageia/Revert-cpufreq-pcc-cpufreq-update-default-value-of-c.patch</Patch>
|
||||
<Patch level="1">patches/mageia/Revert-x86-mm-mtrr-Remove-kernel-internal-MTRR-inter.patch</Patch>
|
||||
<Patch level="1">patches/mageia/x86-power-64-Fix-hibernation-return-address-corrupti.patch</Patch>
|
||||
<Patch level="1">patches/mageia/base-cacheinfo-silence-DT-warnings.patch</Patch>
|
||||
<Patch level="1">patches/mageia/iommu-amd-flush-IOTLB-for-specific-domains-only-v3.patch</Patch>
|
||||
<Patch level="1">patches/mageia/pci-add-ALI-M5229-ide-compatibility-mode-quirk.patch</Patch>
|
||||
<Patch level="1">patches/mageia/pci-quirks-drop-devinit-exit.patch</Patch>
|
||||
<Patch level="1">patches/mageia/pci-Blacklist-AMD-Stoney-GPU-devices-for-ATS.patch</Patch>
|
||||
<Patch level="1">patches/mageia/acpi-CLEVO-M360S-disable_acpi_irq.patch</Patch>
|
||||
<Patch level="1">patches/mageia/acpi-processor-M720SR-limit-to-C2.patch</Patch>
|
||||
<Patch level="1">patches/mageia/ACPI-video-Add-a-quirk-to-force-acpi-video-backlight.patch</Patch>
|
||||
<Patch level="1">patches/mageia/acpi-do-not-warn-if-_BQC-does-not-exist.patch</Patch>
|
||||
<Patch level="1">patches/mageia/acpi-ACPICA-Events-Fix-acpi_ev_initialize_region-return-v.patch</Patch>
|
||||
<!--Patch level="1">patches/mageia/scsi-ppscsi-2.6.2.patch</Patch>
|
||||
<Patch level="1">patches/mageia/scsi-ppscsi_fixes.patch</Patch>
|
||||
<Patch level="1">patches/mageia/scsi-ppscsi-sg-helper-update.patch</Patch>
|
||||
@@ -68,11 +65,23 @@
|
||||
<Patch level="1">patches/mageia/block-floppy-disable-pnp-modalias.patch</Patch>
|
||||
<Patch level="1">patches/mageia/ata-prefer-ata-drivers-over-ide-drivers-when-both-are-built.patch</Patch>
|
||||
<Patch level="1">patches/mageia/block-Make-CFQ-default-to-IOPS-mode-on-SSDs.patch</Patch>
|
||||
<Patch level="1">patches/mageia/fs-aufs-4.7.patch</Patch>
|
||||
<Patch level="1">patches/mageia/fs-aufs-4.7-modular.patch</Patch>
|
||||
<Patch level="1">patches/mageia/fs-aufs-4.7-ver-fix.patch</Patch>
|
||||
<Patch level="1">patches/mageia/fs-ext4-don-t-call-ext4_should_journal_data-on-the-jour.patch</Patch>
|
||||
<Patch level="1">patches/mageia/fs-ext4-fix-deadlock-during-page-writeback.patch</Patch>
|
||||
<!--2-->
|
||||
<Patch level="1">patches/mageia/block-cgroups-kconfig-build-bits-for-BFQ-v7r11-4.5.0.patch</Patch>
|
||||
<Patch level="1">patches/mageia/block-introduce-the-BFQ-v7r11-I-O-sched-for-4.5.0.patch</Patch>
|
||||
<Patch level="1">patches/mageia/block-bfq-add-Early-Queue-Merge-EQM-to-BFQ-v7r11-for.patch</Patch>
|
||||
<Patch level="1">patches/mageia/block-Turn-into-BFQ-v8r7-for-4.9.0.patch</Patch>
|
||||
<Patch level="1">patches/mageia/block-update-bfq-from-v8r7-to-v8r10.patch</Patch>
|
||||
<Patch level="1">patches/mageia/block-update-bfq-from-v8r10-to-v8r11.patch</Patch><!--2-->
|
||||
<Patch level="1">patches/mageia/block-nvme-detect-NVMe-controller-in-recent-MacBooks.patch</Patch>
|
||||
<Patch level="1">patches/mageia/char-tpm-tpm_crb-implement-tpm-crb-idle-state.patch</Patch>
|
||||
<Patch level="1">patches/mageia/char-tmp-tpm_crb-fix-Intel-PTT-hw-bug-during-idle-state.patch</Patch>
|
||||
<Patch level="1">patches/mageia/char-tpm-tpm_crb-open-code-the-crb_init-into-acpi_add.patch</Patch>
|
||||
<Patch level="1">patches/mageia/char-tmp-tpm_crb-implement-runtime-pm-for-tpm_crb.patch</Patch>
|
||||
<Patch level="1">patches/mageia/fs-aufs-4.9.patch</Patch>
|
||||
<Patch level="1">patches/fs-aufs-4.9-posix_acl.patch</Patch>
|
||||
<Patch level="1">patches/mageia/fs-aufs-4.9-modular.patch</Patch>
|
||||
<Patch level="1">patches/mageia/fs-seq_file-reset-iterator-to-first-record-for-zero-off.patch</Patch>
|
||||
<Patch level="1">patches/mageia/fs-jbd2-Fix-dbench4-performance-regression-for-nobarrier-mounts.patch</Patch>
|
||||
<Patch level="1">patches/mageia/firewire-ieee1394-module-aliases.patch</Patch>
|
||||
<Patch level="1">patches/mageia/char-agp-intel-new-Q57-id.patch</Patch>
|
||||
<!--remove external mach64 support for buildfix-->
|
||||
@@ -93,6 +102,13 @@
|
||||
<Patch level="1">patches/mageia/gpu-drm-mach64-linux-3.14-buildfix.patch</Patch>
|
||||
<Patch level="1">patches/mageia/gpu-drm-mach64-3.17-buildfix.patch</Patch>
|
||||
<Patch level="1">patches/mageia/gpu-drm-mach64-3.18-buildfix.patch</Patch--><!--1-->
|
||||
<Patch level="1">patches/mageia/gpu-drm-i915-don-t-warn-about-Skylake-CPU-KabyPoint-PCH-.patch</Patch>
|
||||
<Patch level="1">patches/mageia/gpu-drm-amd-amdgpu-add-Polaris12-PCI-ID.patch</Patch>
|
||||
<Patch level="1">patches/mageia/gpu-drm-amdgpu-add-Polaris12-DID.patch</Patch>
|
||||
<Patch level="1">patches/mageia/gpu-drm-amd-amdgpu-add-Polaris12-support-v3.patch</Patch>
|
||||
<Patch level="1">patches/mageia/gpu-drm-amdgpu-powerplay-add-Polaris12-support.patch</Patch>
|
||||
<Patch level="1">patches/mageia/gpu-drm-amd-amdgpu-add-POLARIS12-PCI-ID.patch</Patch>
|
||||
<Patch level="1">patches/mageia/gpu-drm-amdgpu-pm-check-for-headless-before-calling-comp.patch</Patch>
|
||||
<Patch level="1">patches/mageia/input-i8042-quirks-for-Fujitsu-Lifebook-A544-and-Lif.patch</Patch>
|
||||
<Patch level="1">patches/mageia/net-sis190-fix-list-usage.patch</Patch>
|
||||
<Patch level="1">patches/mageia/net-netfilter-IFWLOG.patch</Patch>
|
||||
@@ -105,31 +121,34 @@
|
||||
<Patch level="1">patches/mageia/net-netfilter-psd.patch</Patch>
|
||||
<Patch level="1">patches/mageia/net-netfilter-psd-mdv.patch</Patch>
|
||||
<Patch level="1">patches/mageia/net-netfilter-psd-2.6.35-buildfix.patch</Patch>
|
||||
<Patch level="1">patches/mageia/net-wireless-iwlwifi-add-new-8260-PCI-IDs.patch</Patch>
|
||||
<Patch level="1">patches/mageia/net-wireless-iwlwifi-add-new-8265.patch</Patch>
|
||||
<Patch level="1">patches/mageia/net-wireless-iwlwifi-pcie-enable-interrupts-before-releasing-the-NICs-CPU.patch</Patch>
|
||||
<Patch level="1">patches/mageia/net-wireless-iwlwifi-pcie-fix-a-race-in-firmware-loading-flow.patch</Patch>
|
||||
<Patch level="1">patches/mageia/net-bcma-add-PCI-ID-for-Foxconn-s-BCM43142-device.patch</Patch>
|
||||
<Patch level="1">patches/mageia/net-brcmfmac-restore-stopping-netdev-queue-when-bus-clog.patch</Patch>
|
||||
<Patch level="1">patches/mageia/net-netfilter-psd-fix-redefines.patch</Patch>
|
||||
<Patch level="1">patches/mageia/net-wireless-rtlwifi-Use-dev_kfree_skb_irq-instead-of-kfree_skb.patch</Patch>
|
||||
<Patch level="1">patches/mageia/net-wireless-rtlwifi-Fix-kernel-oops-introduced-with-commit-e4965.patch</Patch>
|
||||
|
||||
<Patch level="1">patches/mageia/pinctrl_amd-Use-regular-interrupt-instead-of-chained.patch</Patch>
|
||||
<Patch level="1">patches/mageia/platform-x86-add-shuttle-wmi-driver.patch</Patch>
|
||||
<Patch level="1">patches/mageia/platform-x86-shuttle-wmi-drop-devinit-exit.patch</Patch>
|
||||
<Patch level="1">patches/mageia/platform-x86-shuttle-wmi-4.2-buildfix.patch</Patch>
|
||||
<Patch level="1">patches/mageia/hp-wmi-Fix-wifi-cannot-be-hard-unblocked.patch</Patch>
|
||||
<Patch level="1">patches/mageia/Bluetooth-Add-support-of-13d3-3490-AR3012-device.patch</Patch>
|
||||
<Patch level="1">patches/mageia/intel_th-Fix-a-deadlock-in-modprobing.patch</Patch>
|
||||
<Patch level="1">patches/mageia/intel_th-pci-Add-Kaby-Lake-PCH-H-support.patch</Patch>
|
||||
<Patch level="1">patches/mageia/pinctrl-cherryview-prevent-concurrent-access-to-GPIO.patch</Patch>
|
||||
<Patch level="1">patches/mageia/platform-x86-asus-nb-wmi-Add-wapf4-quirk-for-the-X30.patch</Patch>
|
||||
<Patch level="1">patches/mageia/include-kbuild-export-pci_ids.patch</Patch>
|
||||
<Patch level="1">patches/mageia/sound-ALSA-hda-realtek-Add-new-codec-ID-ALC299.patch</Patch>
|
||||
<Patch level="1">patches/mageia/sound-ALSA-hda-realtek-New-codec-support-of-ALC1220.patch</Patch>
|
||||
<Patch level="1">patches/mageia/sound-ALSA-hda-realtek-new-id-for-alc1220.patch</Patch>
|
||||
<Patch level="1">patches/mageia/sound-ALSA-hda-realtek-Remove-ALC285-device-ID.patch</Patch>
|
||||
<Patch level="1">patches/mageia/sound-ALSA-hda-realtek-New-codecs-support-for-ALC215-ALC28.patch</Patch>
|
||||
<Patch level="1">patches/mageia/sound-ALSA-hda-A-new-flag-to-enforce-prefix-to-each-pin.patch</Patch>
|
||||
<Patch level="1">patches/mageia/sound-ALSA-hda-Allow-to-enable-disable-vmaster-build-expli.patch</Patch>
|
||||
<Patch level="1">patches/mageia/sound-ALSA-hda-Support-Gigabyte-Gaming-board-with-dual-Rea.patch</Patch>
|
||||
<Patch level="1">patches/mageia/sound-ALSA-hda-Use-a-helper-function-for-renaming-kctl-nam.patch</Patch>
|
||||
<Patch level="1">patches/mageia/sound-ALSA-hda-Apply-dual-codec-quirk-for-MSI-Z270-Gaming-.patch</Patch>
|
||||
<Patch level="1">patches/mageia/sound-ALSA-hda-Fix-applying-MSI-dual-codec-mobo-quirk.patch</Patch>
|
||||
<Patch level="1">patches/mageia/sound-ALSA-hda-Add-Geminilake-id-to-SKL_PLUS.patch</Patch>
|
||||
<Patch level="1">patches/mageia/sound-ALSA-hda-Add-Coffelake-PCI-ID.patch</Patch>
|
||||
<Patch level="1">patches/mageia/sound-ALSA-hda-Apply-quirks-to-Broxton-T-too.patch</Patch>
|
||||
<Patch level="1">patches/mageia/hid-usbhid-IBM-BladeCenterHS20-quirk.patch</Patch>
|
||||
<Patch level="1">patches/mageia/usb-storage-unusual_devs-add-id.patch</Patch>
|
||||
<Patch level="1">patches/mageia/usb-storage-unusual_devs-add-id-2.6.37-buildfix.patch</Patch>
|
||||
<Patch level="1">patches/mageia/usb-dwc3-fix-for-the-isoc-transfer-EP_BUSY-flag.patch</Patch>
|
||||
<Patch level="1">patches/mageia/usb-renesas_usbhs-fix-NULL-pointer-dereference-in-xf.patch</Patch>
|
||||
<Patch level="1">patches/mageia/HID-uhid-fix-timeout-when-probe-races-with-IO.patch</Patch>
|
||||
<Patch level="1">patches/mageia/media-usb-pwc-lie-in-proc-usb-devices.patch</Patch>
|
||||
<Patch level="1">patches/mageia/media-media-usbtv-prevent-access-to-free-d-resources.patch</Patch>
|
||||
<Patch level="1">patches/mageia/media-vb2-core-Skip-planes-array-verification-if-pb-.patch</Patch>
|
||||
<Patch level="1">patches/mageia/media-videobuf2-v4l2-Verify-planes-array-in-buffer-d.patch</Patch>
|
||||
<Patch level="1">patches/mageia/3rd-3rdparty-1.0-tree.patch</Patch>
|
||||
<Patch level="1">patches/mageia/3rd-3rdparty-merge.patch</Patch>
|
||||
<Patch level="1">patches/mageia/3rd-acerhk-0.5.35.patch</Patch>
|
||||
@@ -156,10 +175,11 @@
|
||||
<Patch level="1">patches/mageia/3rd-viahss-2.6.35-buildfix.patch</Patch>
|
||||
<Patch level="1">patches/mageia/3rd-viahss-3.0-buildfix.patch</Patch>
|
||||
<Patch level="1">patches/mageia/3rd-rtl8723bs.patch</Patch>
|
||||
<Patch level="1">patches/mageia/3rd-rtl8723bs-4.7-buildfix.patch</Patch>
|
||||
<Patch level="1">patches/mageia/ahci-add-new-Intel-device-IDs.patch</Patch>
|
||||
<Patch level="1">patches/mageia/megaraid_sas-Do-not-fire-MR_DCMD_PD_LIST_QUERY-to-co.patch</Patch>
|
||||
<Patch level="1">patches/mageia/arm-0001-ARM-bcm2835-dt-Add-the-ethernet-to-the-device-trees.patch</Patch>
|
||||
<Patch level="1">patches/mageia/3rd-rtl8812au.patch</Patch>
|
||||
<Patch level="1">patches/mageia/tools-testing-selftest-Makefile-remove-powerpc-reference.patch</Patch>
|
||||
<Patch level="1">patches/mageia/tools-build-Make-fixdep-parsing-wait-for-last-target.patch</Patch>
|
||||
<Patch level="1">patches/mageia/tools-perf-tools-Force-fixdep-compilation-at-the-start-of-.patch</Patch>
|
||||
<Patch level="1">patches/mageia/tools-perf-tools-Move-perf-build-related-variables-under-n.patch</Patch>
|
||||
</Patches>
|
||||
</Source>
|
||||
|
||||
@@ -191,6 +211,13 @@
|
||||
</Files>
|
||||
</Package>
|
||||
<History>
|
||||
<Update release="5">
|
||||
<Date>2017-11-19</Date>
|
||||
<Version>4.9.63</Version>
|
||||
<Comment>Version bump</Comment>
|
||||
<Name>Ertuğrul Erata</Name>
|
||||
<Email>ertugrulerata@gmail.com</Email>
|
||||
</Update>
|
||||
<Update release="4">
|
||||
<Date>2016-07-13</Date>
|
||||
<Version>4.7.0</Version>
|
||||
|
||||
Reference in New Issue
Block a user