Skip to content

Commit fa19cdc

Browse files
mmotm auto importhnaz
mmotm auto import
authored andcommitted
origin
GIT b914c5b commit 31345e1 Author: Benjamin Herrenschmidt <benh@kernel.crashing.org> Date: Tue Oct 7 16:13:34 2014 +1100 powerpc/pci: Remove unused force_32bit_msi quirk This is now fully replaced with the generic "no_64bit_msi" one that is set by the respective drivers directly. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> commit 415072a Author: Benjamin Herrenschmidt <benh@kernel.crashing.org> Date: Tue Oct 7 16:12:55 2014 +1100 powerpc/pseries: Honor the generic "no_64bit_msi" flag Instead of the arch specific quirk which we are deprecating Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> CC: <stable@vger.kernel.org> commit 3607438 Author: Benjamin Herrenschmidt <benh@kernel.crashing.org> Date: Tue Oct 7 16:12:36 2014 +1100 powerpc/powernv: Honor the generic "no_64bit_msi" flag Instead of the arch specific quirk which we are deprecating and that drivers don't understand. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> CC: <stable@vger.kernel.org> commit db79afa Author: Benjamin Herrenschmidt <benh@kernel.crashing.org> Date: Mon Nov 24 14:17:08 2014 +1100 sound/radeon: Move 64-bit MSI quirk from arch to driver A number of radeon cards have a HW limitation causing them to be unable to generate the full 64-bit of address bits for MSIs. This breaks MSIs on some platforms such as POWER machines. We used to have a powerpc specific quirk to address that on a single card, but this doesn't scale very well, this is better put under control of the drivers who know precisely what a given HW revision can do. We now have a generic quirk in the PCI code. We should set it appropriately for all radeon's from the audio driver. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Reviewed-by: Takashi Iwai <tiwai@suse.de> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> CC: <stable@vger.kernel.org> commit 91ed6fd Author: Benjamin Herrenschmidt <benh@kernel.crashing.org> Date: Fri Oct 3 15:18:59 2014 +1000 gpu/radeon: Set flag to indicate broken 64-bit MSI Some radeon ASICs don't support all 64 address bits of MSIs despite advertising support for 64-bit MSIs in their configuration space. This breaks on systems such as IBM POWER7/8, where 64-bit MSIs can be assigned with some of the high address bits set. This makes use of the newly introduced "no_64bit_msi" flag in structure pci_dev to allow the MSI allocation code to fallback to 32-bit MSIs on those adapters. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> CC: <stable@vger.kernel.org> --- Adding Alex's review tag. Patch to the driver is identical to the reviewed one, I dropped the arch/powerpc hunk rewrote the subject and cset comment. commit f144d14 Author: Benjamin Herrenschmidt <benh@kernel.crashing.org> Date: Fri Oct 3 15:13:24 2014 +1000 PCI/MSI: Add device flag indicating that 64-bit MSIs don't work This can be set by quirks/drivers to be used by the architecture code that assigns the MSI addresses. We additionally add verification in the core MSI code that the values assigned by the architecture do satisfy the limitation in order to fail gracefully if they don't (ie. the arch hasn't been updated to deal with that quirk yet). Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> CC: <stable@vger.kernel.org> Acked-by: Bjorn Helgaas <bhelgaas@google.com> commit 413cbf4 Author: Takashi Iwai <tiwai@suse.de> Date: Wed Oct 1 10:30:53 2014 +0200 ALSA: hda - Limit 40bit DMA for AMD HDMI controllers AMD/ATI HDMI controller chip models, we already have a filter to lower to 32bit DMA, but the rest are supposed to be working with 64bit although the hardware doesn't really work with 63bit but only with 40 or 48bit DMA. In this patch, we take 40bit DMA for safety for the AMD/ATI controllers as the graphics drivers does. Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> CC: <stable@vger.kernel.org> commit 6b19b66 Author: Arnaud Ebalard <arno@natisbad.org> Date: Wed Nov 19 22:52:36 2014 +0100 hwmon: (g762) fix call to devm_hwmon_device_register_with_groups() g762_remove() needs to first call hwmon_device_unregister() and then g762_of_clock_disable(). For that reason, it is not possible to convert it to devm_hwmon_device_register_with_groups() and the the non device managed version must be used. This is correctly stated in commit message for 398e16d ("hwmon: (g762) Convert to hwmon_device_register_with_groups") but the associated changes do in fact introduce a call to the device managed version of the function. This patch fixes that typo by switching to the non devm_ version. Fixes: 398e16d ("hwmon: (g762) Convert to hwmon_device_register_with_groups") Cc: stable@vger.kernel.org (3.17+) Signed-off-by: Arnaud Ebalard <arno@natisbad.org> Signed-off-by: Guenter Roeck <linux@roeck-us.net> commit c6c15e1 Author: Trond Myklebust <trond.myklebust@primarydata.com> Date: Wed Nov 19 12:47:50 2014 -0500 nfsd: Fix slot wake up race in the nfsv4.1 callback code The currect code for nfsd41_cb_get_slot() and nfsd4_cb_done() has no locking in order to guarantee atomicity, and so allows for races of the form. Task 1 Task 2 ====== ====== if (test_and_set_bit(0) != 0) { clear_bit(0) rpc_wake_up_next(queue) rpc_sleep_on(queue) return false; } This patch breaks the race condition by adding a retest of the bit after the call to rpc_sleep_on(). Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com> Cc: stable@vger.kernel.org Signed-off-by: J. Bruce Fields <bfields@redhat.com> commit 093a146 Author: Trond Myklebust <trond.myklebust@primarydata.com> Date: Wed Nov 12 18:04:04 2014 -0500 SUNRPC: Fix locking around callback channel reply receive Both xprt_lookup_rqst() and xprt_complete_rqst() require that you take the transport lock in order to avoid races with xprt_transmit(). Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com> Cc: stable@vger.kernel.org Reviewed-by: Jeff Layton <jlayton@primarydata.com> Signed-off-by: J. Bruce Fields <bfields@redhat.com> commit 6d0ba04 Author: Christoph Hellwig <hch@lst.de> Date: Sat Nov 8 13:11:03 2014 +0100 nfsd: correctly define v4.2 support attributes Even when security labels are disabled we support at least the same attributes as v4.1. Signed-off-by: Christoph Hellwig <hch@lst.de> Cc: stable@kernel.org Signed-off-by: J. Bruce Fields <bfields@redhat.com> commit dcf3d45 Author: Robert Jarzmik <robert.jarzmik@free.fr> Date: Tue Oct 7 01:07:57 2014 +0200 clk: pxa: fix pxa27x CCCR bit usage Trivial fix to check the A bit of CCCR for memory frequency calculations, where the shift of the bit index was missing, triggering a wrong calculation of memory frequency. Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr> Signed-off-by: Michael Turquette <mturquette@linaro.org> commit e6d5e7d Author: James Hogan <james.hogan@imgtec.com> Date: Fri Nov 14 15:32:09 2014 +0000 clk-divider: Fix READ_ONLY when divider > 1 Commit 79c6ab5 (clk: divider: add CLK_DIVIDER_READ_ONLY flag) in v3.16 introduced the CLK_DIVIDER_READ_ONLY flag which caused the recalc_rate() and round_rate() clock callbacks to be omitted. However using this flag has the unfortunate side effect of causing the clock recalculation code when a clock rate change is attempted to always treat it as a pass-through clock, i.e. with a fixed divide of 1, which may not be the case. Child clock rates are then recalculated using the wrong parent rate. Therefore instead of dropping the recalc_rate() and round_rate() callbacks, alter clk_divider_bestdiv() to always report the current divider as the best divider so that it is never altered. For me the read only clock was the system clock, which divided the PLL rate by 2, from which both the UART and the SPI clocks were divided. Initial setting of the UART rate set it correctly, but when the SPI clock was set, the other child clocks were miscalculated. The UART clock was recalculated using the PLL rate as the parent rate, resulting in a UART new_rate of double what it should be, and a UART which spewed forth garbage when the rate changes were propagated. Signed-off-by: James Hogan <james.hogan@imgtec.com> Cc: Thomas Abraham <thomas.ab@samsung.com> Cc: Tomasz Figa <t.figa@samsung.com> Cc: Max Schwarz <max.schwarz@online.de> Cc: <stable@vger.kernel.org> # v3.16+ Acked-by: Haojian Zhuang <haojian.zhuang@gmail.com> Signed-off-by: Michael Turquette <mturquette@linaro.org> commit 9a6cb70 Author: Georgi Djakov <gdjakov@mm-sol.com> Date: Fri Oct 10 16:57:24 2014 +0300 clk: qcom: Fix duplicate rbcpr clock name There is a duplication in a clock name for apq8084 platform that causes the following warning: "RBCPR_CLK_SRC" redefined Resolve this by adding a MMSS_ prefix to this clock and making its name coherent with msm8974 platform. Fixes: 2b46cd2 ("clk: qcom: Add APQ8084 Multimedia Clock Controller (MMCC) support") Signed-off-by: Georgi Djakov <gdjakov@mm-sol.com> Reviewed-by: Stephen Boyd <sboyd@codeaurora.org> Signed-off-by: Michael Turquette <mturquette@linaro.org> commit 69daf75 Author: Boris Brezillon <boris.brezillon@free-electrons.com> Date: Mon Nov 17 14:16:56 2014 +0100 clk: at91: usb: fix at91sam9x5 recalc, round and set rate First check for rate == 0 in set_rate and round_rate to avoid div by zero. Then, in order to get the closest rate, round all divisions to the closest result instead of rounding them down. Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com> Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com> Signed-off-by: Michael Turquette <mturquette@linaro.org> commit ff553ea Author: Boris Brezillon <boris.brezillon@free-electrons.com> Date: Fri Nov 14 19:54:49 2014 +0100 clk: at91: usb: fix at91rm9200 round and set rate at91rm9200_clk_usb_set_rate might fail depending on the requested rate, because the parent_rate / rate remainder is not necessarily zero. Moreover, when rounding down the calculated rate we might alter the divisor calculation and end up with an invalid divisor. To solve those problems, accept a non zero remainder, and always round division to the closest result. Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com> Reported-by: Andreas Henriksson <andreas.henriksson@endian.se> Tested-by: Andreas Henriksson <andreas.henriksson@endian.se> Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com> Signed-off-by: Michael Turquette <mturquette@linaro.org> commit 835f252 Author: Gu Zheng <guz.fnst@cn.fujitsu.com> Date: Thu Nov 6 17:46:21 2014 +0800 aio: fix uncorrent dirty pages accouting when truncating AIO ring buffer https://bugzilla.kernel.org/show_bug.cgi?id=86831 Markus reported that when shutting down mysqld (with AIO support, on a ext3 formatted Harddrive) leads to a negative number of dirty pages (underrun to the counter). The negative number results in a drastic reduction of the write performance because the page cache is not used, because the kernel thinks it is still 2 ^ 32 dirty pages open. Add a warn trace in __dec_zone_state will catch this easily: static inline void __dec_zone_state(struct zone *zone, enum zone_stat_item item) { atomic_long_dec(&zone->vm_stat[item]); + WARN_ON_ONCE(item == NR_FILE_DIRTY && atomic_long_read(&zone->vm_stat[item]) < 0); atomic_long_dec(&vm_stat[item]); } [ 21.341632] ------------[ cut here ]------------ [ 21.346294] WARNING: CPU: 0 PID: 309 at include/linux/vmstat.h:242 cancel_dirty_page+0x164/0x224() [ 21.355296] Modules linked in: wutbox_cp sata_mv [ 21.359968] CPU: 0 PID: 309 Comm: kworker/0:1 Not tainted 3.14.21-WuT torvalds#80 [ 21.366793] Workqueue: events free_ioctx [ 21.370760] [<c0016a64>] (unwind_backtrace) from [<c0012f88>] (show_stack+0x20/0x24) [ 21.378562] [<c0012f88>] (show_stack) from [<c03f8ccc>] (dump_stack+0x24/0x28) [ 21.385840] [<c03f8ccc>] (dump_stack) from [<c0023ae4>] (warn_slowpath_common+0x84/0x9c) [ 21.393976] [<c0023ae4>] (warn_slowpath_common) from [<c0023bb8>] (warn_slowpath_null+0x2c/0x34) [ 21.402800] [<c0023bb8>] (warn_slowpath_null) from [<c00c0688>] (cancel_dirty_page+0x164/0x224) [ 21.411524] [<c00c0688>] (cancel_dirty_page) from [<c00c080c>] (truncate_inode_page+0x8c/0x158) [ 21.420272] [<c00c080c>] (truncate_inode_page) from [<c00c0a94>] (truncate_inode_pages_range+0x11c/0x53c) [ 21.429890] [<c00c0a94>] (truncate_inode_pages_range) from [<c00c0f6c>] (truncate_pagecache+0x88/0xac) [ 21.439252] [<c00c0f6c>] (truncate_pagecache) from [<c00c0fec>] (truncate_setsize+0x5c/0x74) [ 21.447731] [<c00c0fec>] (truncate_setsize) from [<c013b3a8>] (put_aio_ring_file.isra.14+0x34/0x90) [ 21.456826] [<c013b3a8>] (put_aio_ring_file.isra.14) from [<c013b424>] (aio_free_ring+0x20/0xcc) [ 21.465660] [<c013b424>] (aio_free_ring) from [<c013b4f4>] (free_ioctx+0x24/0x44) [ 21.473190] [<c013b4f4>] (free_ioctx) from [<c003d8d8>] (process_one_work+0x134/0x47c) [ 21.481132] [<c003d8d8>] (process_one_work) from [<c003e988>] (worker_thread+0x130/0x414) [ 21.489350] [<c003e988>] (worker_thread) from [<c00448ac>] (kthread+0xd4/0xec) [ 21.496621] [<c00448ac>] (kthread) from [<c000ec18>] (ret_from_fork+0x14/0x20) [ 21.503884] ---[ end trace 79c4bf42c038c9a1 ]--- The cause is that we set the aio ring file pages as *DIRTY* via SetPageDirty (bypasses the VFS dirty pages increment) when init, and aio fs uses *default_backing_dev_info* as the backing dev, which does not disable the dirty pages accounting capability. So truncating aio ring file will contribute to accounting dirty pages (VFS dirty pages decrement), then error occurs. The original goal is keeping these pages in memory (can not be reclaimed or swapped) in life-time via marking it dirty. But thinking more, we have already pinned pages via elevating the page's refcount, which can already achieve the goal, so the SetPageDirty seems unnecessary. In order to fix the issue, using the __set_page_dirty_no_writeback instead of the nop .set_page_dirty, and dropped the SetPageDirty (don't manually set the dirty flags, don't disable set_page_dirty(), rely on default behaviour). With the above change, the dirty pages accounting can work well. But as we known, aio fs is an anonymous one, which should never cause any real write-back, we can ignore the dirty pages (write back) accounting by disabling the dirty pages (write back) accounting capability. So we introduce an aio private backing dev info (disabled the ACCT_DIRTY/WRITEBACK/ACCT_WB capabilities) to replace the default one. Reported-by: Markus Königshaus <m.koenigshaus@wut.de> Signed-off-by: Gu Zheng <guz.fnst@cn.fujitsu.com> Cc: stable <stable@vger.kernel.org> Acked-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Benjamin LaHaise <bcrl@kvack.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
1 parent 5d01410 commit fa19cdc

File tree

22 files changed

+136
-83
lines changed

22 files changed

+136
-83
lines changed

arch/powerpc/include/asm/pci-bridge.h

-2
Original file line numberDiff line numberDiff line change
@@ -159,8 +159,6 @@ struct pci_dn {
159159

160160
int pci_ext_config_space; /* for pci devices */
161161

162-
bool force_32bit_msi;
163-
164162
struct pci_dev *pcidev; /* back-pointer to the pci device */
165163
#ifdef CONFIG_EEH
166164
struct eeh_dev *edev; /* eeh device */

arch/powerpc/kernel/pci_64.c

-10
Original file line numberDiff line numberDiff line change
@@ -266,13 +266,3 @@ int pcibus_to_node(struct pci_bus *bus)
266266
}
267267
EXPORT_SYMBOL(pcibus_to_node);
268268
#endif
269-
270-
static void quirk_radeon_32bit_msi(struct pci_dev *dev)
271-
{
272-
struct pci_dn *pdn = pci_get_pdn(dev);
273-
274-
if (pdn)
275-
pdn->force_32bit_msi = true;
276-
}
277-
DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_ATI, 0x68f2, quirk_radeon_32bit_msi);
278-
DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_ATI, 0xaa68, quirk_radeon_32bit_msi);

arch/powerpc/platforms/powernv/pci-ioda.c

+1-2
Original file line numberDiff line numberDiff line change
@@ -1509,7 +1509,6 @@ static int pnv_pci_ioda_msi_setup(struct pnv_phb *phb, struct pci_dev *dev,
15091509
unsigned int is_64, struct msi_msg *msg)
15101510
{
15111511
struct pnv_ioda_pe *pe = pnv_ioda_get_pe(dev);
1512-
struct pci_dn *pdn = pci_get_pdn(dev);
15131512
unsigned int xive_num = hwirq - phb->msi_base;
15141513
__be32 data;
15151514
int rc;
@@ -1523,7 +1522,7 @@ static int pnv_pci_ioda_msi_setup(struct pnv_phb *phb, struct pci_dev *dev,
15231522
return -ENXIO;
15241523

15251524
/* Force 32-bit MSI on some broken devices */
1526-
if (pdn && pdn->force_32bit_msi)
1525+
if (dev->no_64bit_msi)
15271526
is_64 = 0;
15281527

15291528
/* Assign XIVE to PE */

arch/powerpc/platforms/powernv/pci.c

+1-2
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,6 @@ static int pnv_setup_msi_irqs(struct pci_dev *pdev, int nvec, int type)
5050
{
5151
struct pci_controller *hose = pci_bus_to_host(pdev->bus);
5252
struct pnv_phb *phb = hose->private_data;
53-
struct pci_dn *pdn = pci_get_pdn(pdev);
5453
struct msi_desc *entry;
5554
struct msi_msg msg;
5655
int hwirq;
@@ -60,7 +59,7 @@ static int pnv_setup_msi_irqs(struct pci_dev *pdev, int nvec, int type)
6059
if (WARN_ON(!phb) || !phb->msi_bmp.bitmap)
6160
return -ENODEV;
6261

63-
if (pdn && pdn->force_32bit_msi && !phb->msi32_support)
62+
if (pdev->no_64bit_msi && !phb->msi32_support)
6463
return -ENODEV;
6564

6665
list_for_each_entry(entry, &pdev->msi_list, list) {

arch/powerpc/platforms/pseries/msi.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -420,7 +420,7 @@ static int rtas_setup_msi_irqs(struct pci_dev *pdev, int nvec_in, int type)
420420
*/
421421
again:
422422
if (type == PCI_CAP_ID_MSI) {
423-
if (pdn->force_32bit_msi) {
423+
if (pdev->no_64bit_msi) {
424424
rc = rtas_change_msi(pdn, RTAS_CHANGE_32MSI_FN, nvec);
425425
if (rc < 0) {
426426
/*

drivers/clk/at91/clk-usb.c

+18-17
Original file line numberDiff line numberDiff line change
@@ -52,29 +52,26 @@ static unsigned long at91sam9x5_clk_usb_recalc_rate(struct clk_hw *hw,
5252

5353
tmp = pmc_read(pmc, AT91_PMC_USB);
5454
usbdiv = (tmp & AT91_PMC_OHCIUSBDIV) >> SAM9X5_USB_DIV_SHIFT;
55-
return parent_rate / (usbdiv + 1);
55+
56+
return DIV_ROUND_CLOSEST(parent_rate, (usbdiv + 1));
5657
}
5758

5859
static long at91sam9x5_clk_usb_round_rate(struct clk_hw *hw, unsigned long rate,
5960
unsigned long *parent_rate)
6061
{
6162
unsigned long div;
62-
unsigned long bestrate;
63-
unsigned long tmp;
63+
64+
if (!rate)
65+
return -EINVAL;
6466

6567
if (rate >= *parent_rate)
6668
return *parent_rate;
6769

68-
div = *parent_rate / rate;
69-
if (div >= SAM9X5_USB_MAX_DIV)
70-
return *parent_rate / (SAM9X5_USB_MAX_DIV + 1);
71-
72-
bestrate = *parent_rate / div;
73-
tmp = *parent_rate / (div + 1);
74-
if (bestrate - rate > rate - tmp)
75-
bestrate = tmp;
70+
div = DIV_ROUND_CLOSEST(*parent_rate, rate);
71+
if (div > SAM9X5_USB_MAX_DIV + 1)
72+
div = SAM9X5_USB_MAX_DIV + 1;
7673

77-
return bestrate;
74+
return DIV_ROUND_CLOSEST(*parent_rate, div);
7875
}
7976

8077
static int at91sam9x5_clk_usb_set_parent(struct clk_hw *hw, u8 index)
@@ -106,9 +103,13 @@ static int at91sam9x5_clk_usb_set_rate(struct clk_hw *hw, unsigned long rate,
106103
u32 tmp;
107104
struct at91sam9x5_clk_usb *usb = to_at91sam9x5_clk_usb(hw);
108105
struct at91_pmc *pmc = usb->pmc;
109-
unsigned long div = parent_rate / rate;
106+
unsigned long div;
107+
108+
if (!rate)
109+
return -EINVAL;
110110

111-
if (parent_rate % rate || div < 1 || div >= SAM9X5_USB_MAX_DIV)
111+
div = DIV_ROUND_CLOSEST(parent_rate, rate);
112+
if (div > SAM9X5_USB_MAX_DIV + 1 || !div)
112113
return -EINVAL;
113114

114115
tmp = pmc_read(pmc, AT91_PMC_USB) & ~AT91_PMC_OHCIUSBDIV;
@@ -253,7 +254,7 @@ static long at91rm9200_clk_usb_round_rate(struct clk_hw *hw, unsigned long rate,
253254

254255
tmp_parent_rate = rate * usb->divisors[i];
255256
tmp_parent_rate = __clk_round_rate(parent, tmp_parent_rate);
256-
tmprate = tmp_parent_rate / usb->divisors[i];
257+
tmprate = DIV_ROUND_CLOSEST(tmp_parent_rate, usb->divisors[i]);
257258
if (tmprate < rate)
258259
tmpdiff = rate - tmprate;
259260
else
@@ -281,10 +282,10 @@ static int at91rm9200_clk_usb_set_rate(struct clk_hw *hw, unsigned long rate,
281282
struct at91_pmc *pmc = usb->pmc;
282283
unsigned long div;
283284

284-
if (!rate || parent_rate % rate)
285+
if (!rate)
285286
return -EINVAL;
286287

287-
div = parent_rate / rate;
288+
div = DIV_ROUND_CLOSEST(parent_rate, rate);
288289

289290
for (i = 0; i < RM9200_USB_DIV_TAB_SIZE; i++) {
290291
if (usb->divisors[i] == div) {

drivers/clk/clk-divider.c

+9-9
Original file line numberDiff line numberDiff line change
@@ -263,6 +263,14 @@ static int clk_divider_bestdiv(struct clk_hw *hw, unsigned long rate,
263263
if (!rate)
264264
rate = 1;
265265

266+
/* if read only, just return current value */
267+
if (divider->flags & CLK_DIVIDER_READ_ONLY) {
268+
bestdiv = readl(divider->reg) >> divider->shift;
269+
bestdiv &= div_mask(divider);
270+
bestdiv = _get_div(divider, bestdiv);
271+
return bestdiv;
272+
}
273+
266274
maxdiv = _get_maxdiv(divider);
267275

268276
if (!(__clk_get_flags(hw->clk) & CLK_SET_RATE_PARENT)) {
@@ -361,11 +369,6 @@ const struct clk_ops clk_divider_ops = {
361369
};
362370
EXPORT_SYMBOL_GPL(clk_divider_ops);
363371

364-
const struct clk_ops clk_divider_ro_ops = {
365-
.recalc_rate = clk_divider_recalc_rate,
366-
};
367-
EXPORT_SYMBOL_GPL(clk_divider_ro_ops);
368-
369372
static struct clk *_register_divider(struct device *dev, const char *name,
370373
const char *parent_name, unsigned long flags,
371374
void __iomem *reg, u8 shift, u8 width,
@@ -391,10 +394,7 @@ static struct clk *_register_divider(struct device *dev, const char *name,
391394
}
392395

393396
init.name = name;
394-
if (clk_divider_flags & CLK_DIVIDER_READ_ONLY)
395-
init.ops = &clk_divider_ro_ops;
396-
else
397-
init.ops = &clk_divider_ops;
397+
init.ops = &clk_divider_ops;
398398
init.flags = flags | CLK_IS_BASIC;
399399
init.parent_names = (parent_name ? &parent_name: NULL);
400400
init.num_parents = (parent_name ? 1 : 0);

drivers/clk/pxa/clk-pxa27x.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -322,7 +322,7 @@ static unsigned long clk_pxa27x_memory_get_rate(struct clk_hw *hw,
322322
unsigned long ccsr = CCSR;
323323

324324
osc_forced = ccsr & (1 << CCCR_CPDIS_BIT);
325-
a = cccr & CCCR_A_BIT;
325+
a = cccr & (1 << CCCR_A_BIT);
326326
l = ccsr & CCSR_L_MASK;
327327

328328
if (osc_forced || a)
@@ -341,7 +341,7 @@ static u8 clk_pxa27x_memory_get_parent(struct clk_hw *hw)
341341
unsigned long ccsr = CCSR;
342342

343343
osc_forced = ccsr & (1 << CCCR_CPDIS_BIT);
344-
a = cccr & CCCR_A_BIT;
344+
a = cccr & (1 << CCCR_A_BIT);
345345
if (osc_forced)
346346
return PXA_MEM_13Mhz;
347347
if (a)

drivers/clk/qcom/mmcc-apq8084.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -3122,7 +3122,7 @@ static struct clk_regmap *mmcc_apq8084_clocks[] = {
31223122
[ESC1_CLK_SRC] = &esc1_clk_src.clkr,
31233123
[HDMI_CLK_SRC] = &hdmi_clk_src.clkr,
31243124
[VSYNC_CLK_SRC] = &vsync_clk_src.clkr,
3125-
[RBCPR_CLK_SRC] = &rbcpr_clk_src.clkr,
3125+
[MMSS_RBCPR_CLK_SRC] = &rbcpr_clk_src.clkr,
31263126
[RBBMTIMER_CLK_SRC] = &rbbmtimer_clk_src.clkr,
31273127
[MAPLE_CLK_SRC] = &maple_clk_src.clkr,
31283128
[VDP_CLK_SRC] = &vdp_clk_src.clkr,

drivers/clk/rockchip/clk.c

+1-3
Original file line numberDiff line numberDiff line change
@@ -90,9 +90,7 @@ static struct clk *rockchip_clk_register_branch(const char *name,
9090
div->width = div_width;
9191
div->lock = lock;
9292
div->table = div_table;
93-
div_ops = (div_flags & CLK_DIVIDER_READ_ONLY)
94-
? &clk_divider_ro_ops
95-
: &clk_divider_ops;
93+
div_ops = &clk_divider_ops;
9694
}
9795

9896
clk = clk_register_composite(NULL, name, parent_names, num_parents,

drivers/gpu/drm/radeon/radeon_irq_kms.c

+10
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,16 @@ static bool radeon_msi_ok(struct radeon_device *rdev)
185185
if (rdev->flags & RADEON_IS_AGP)
186186
return false;
187187

188+
/*
189+
* Older chips have a HW limitation, they can only generate 40 bits
190+
* of address for "64-bit" MSIs which breaks on some platforms, notably
191+
* IBM POWER servers, so we limit them
192+
*/
193+
if (rdev->family < CHIP_BONAIRE) {
194+
dev_info(rdev->dev, "radeon: MSI limited to 32-bit\n");
195+
rdev->pdev->no_64bit_msi = 1;
196+
}
197+
188198
/* force MSI on */
189199
if (radeon_msi == 1)
190200
return true;

drivers/hwmon/g762.c

+2-4
Original file line numberDiff line numberDiff line change
@@ -1084,10 +1084,8 @@ static int g762_probe(struct i2c_client *client, const struct i2c_device_id *id)
10841084
if (ret)
10851085
goto clock_dis;
10861086

1087-
data->hwmon_dev = devm_hwmon_device_register_with_groups(dev,
1088-
client->name,
1089-
data,
1090-
g762_groups);
1087+
data->hwmon_dev = hwmon_device_register_with_groups(dev, client->name,
1088+
data, g762_groups);
10911089
if (IS_ERR(data->hwmon_dev)) {
10921090
ret = PTR_ERR(data->hwmon_dev);
10931091
goto clock_dis;

drivers/pci/msi.c

+26
Original file line numberDiff line numberDiff line change
@@ -590,6 +590,20 @@ static struct msi_desc *msi_setup_entry(struct pci_dev *dev)
590590
return entry;
591591
}
592592

593+
static int msi_verify_entries(struct pci_dev *dev)
594+
{
595+
struct msi_desc *entry;
596+
597+
list_for_each_entry(entry, &dev->msi_list, list) {
598+
if (!dev->no_64bit_msi || !entry->msg.address_hi)
599+
continue;
600+
dev_err(&dev->dev, "Device has broken 64-bit MSI but arch"
601+
" tried to assign one above 4G\n");
602+
return -EIO;
603+
}
604+
return 0;
605+
}
606+
593607
/**
594608
* msi_capability_init - configure device's MSI capability structure
595609
* @dev: pointer to the pci_dev data structure of MSI device function
@@ -627,6 +641,13 @@ static int msi_capability_init(struct pci_dev *dev, int nvec)
627641
return ret;
628642
}
629643

644+
ret = msi_verify_entries(dev);
645+
if (ret) {
646+
msi_mask_irq(entry, mask, ~mask);
647+
free_msi_irqs(dev);
648+
return ret;
649+
}
650+
630651
ret = populate_msi_sysfs(dev);
631652
if (ret) {
632653
msi_mask_irq(entry, mask, ~mask);
@@ -739,6 +760,11 @@ static int msix_capability_init(struct pci_dev *dev,
739760
if (ret)
740761
goto out_avail;
741762

763+
/* Check if all MSI entries honor device restrictions */
764+
ret = msi_verify_entries(dev);
765+
if (ret)
766+
goto out_free;
767+
742768
/*
743769
* Some devices require MSI-X to be enabled before we can touch the
744770
* MSI-X registers. We need to mask all the vectors to prevent

fs/aio.c

+14-7
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,15 @@ static struct vfsmount *aio_mnt;
165165
static const struct file_operations aio_ring_fops;
166166
static const struct address_space_operations aio_ctx_aops;
167167

168+
/* Backing dev info for aio fs.
169+
* -no dirty page accounting or writeback happens
170+
*/
171+
static struct backing_dev_info aio_fs_backing_dev_info = {
172+
.name = "aiofs",
173+
.state = 0,
174+
.capabilities = BDI_CAP_NO_ACCT_AND_WRITEBACK | BDI_CAP_MAP_COPY,
175+
};
176+
168177
static struct file *aio_private_file(struct kioctx *ctx, loff_t nr_pages)
169178
{
170179
struct qstr this = QSTR_INIT("[aio]", 5);
@@ -176,6 +185,7 @@ static struct file *aio_private_file(struct kioctx *ctx, loff_t nr_pages)
176185

177186
inode->i_mapping->a_ops = &aio_ctx_aops;
178187
inode->i_mapping->private_data = ctx;
188+
inode->i_mapping->backing_dev_info = &aio_fs_backing_dev_info;
179189
inode->i_size = PAGE_SIZE * nr_pages;
180190

181191
path.dentry = d_alloc_pseudo(aio_mnt->mnt_sb, &this);
@@ -220,6 +230,9 @@ static int __init aio_setup(void)
220230
if (IS_ERR(aio_mnt))
221231
panic("Failed to create aio fs mount.");
222232

233+
if (bdi_init(&aio_fs_backing_dev_info))
234+
panic("Failed to init aio fs backing dev info.");
235+
223236
kiocb_cachep = KMEM_CACHE(kiocb, SLAB_HWCACHE_ALIGN|SLAB_PANIC);
224237
kioctx_cachep = KMEM_CACHE(kioctx,SLAB_HWCACHE_ALIGN|SLAB_PANIC);
225238

@@ -281,11 +294,6 @@ static const struct file_operations aio_ring_fops = {
281294
.mmap = aio_ring_mmap,
282295
};
283296

284-
static int aio_set_page_dirty(struct page *page)
285-
{
286-
return 0;
287-
}
288-
289297
#if IS_ENABLED(CONFIG_MIGRATION)
290298
static int aio_migratepage(struct address_space *mapping, struct page *new,
291299
struct page *old, enum migrate_mode mode)
@@ -357,7 +365,7 @@ static int aio_migratepage(struct address_space *mapping, struct page *new,
357365
#endif
358366

359367
static const struct address_space_operations aio_ctx_aops = {
360-
.set_page_dirty = aio_set_page_dirty,
368+
.set_page_dirty = __set_page_dirty_no_writeback,
361369
#if IS_ENABLED(CONFIG_MIGRATION)
362370
.migratepage = aio_migratepage,
363371
#endif
@@ -412,7 +420,6 @@ static int aio_setup_ring(struct kioctx *ctx)
412420
pr_debug("pid(%d) page[%d]->count=%d\n",
413421
current->pid, i, page_count(page));
414422
SetPageUptodate(page);
415-
SetPageDirty(page);
416423
unlock_page(page);
417424

418425
ctx->ring_pages[i] = page;

fs/nfsd/nfs4callback.c

+6-2
Original file line numberDiff line numberDiff line change
@@ -774,8 +774,12 @@ static bool nfsd41_cb_get_slot(struct nfs4_client *clp, struct rpc_task *task)
774774
{
775775
if (test_and_set_bit(0, &clp->cl_cb_slot_busy) != 0) {
776776
rpc_sleep_on(&clp->cl_cb_waitq, task, NULL);
777-
dprintk("%s slot is busy\n", __func__);
778-
return false;
777+
/* Race breaker */
778+
if (test_and_set_bit(0, &clp->cl_cb_slot_busy) != 0) {
779+
dprintk("%s slot is busy\n", __func__);
780+
return false;
781+
}
782+
rpc_wake_up_queued_task(&clp->cl_cb_waitq, task);
779783
}
780784
return true;
781785
}

fs/nfsd/nfsd.h

+6-3
Original file line numberDiff line numberDiff line change
@@ -335,12 +335,15 @@ void nfsd_lockd_shutdown(void);
335335
(NFSD4_SUPPORTED_ATTRS_WORD2 | FATTR4_WORD2_SUPPATTR_EXCLCREAT)
336336

337337
#ifdef CONFIG_NFSD_V4_SECURITY_LABEL
338-
#define NFSD4_2_SUPPORTED_ATTRS_WORD2 \
339-
(NFSD4_1_SUPPORTED_ATTRS_WORD2 | FATTR4_WORD2_SECURITY_LABEL)
338+
#define NFSD4_2_SECURITY_ATTRS FATTR4_WORD2_SECURITY_LABEL
340339
#else
341-
#define NFSD4_2_SUPPORTED_ATTRS_WORD2 0
340+
#define NFSD4_2_SECURITY_ATTRS 0
342341
#endif
343342

343+
#define NFSD4_2_SUPPORTED_ATTRS_WORD2 \
344+
(NFSD4_1_SUPPORTED_ATTRS_WORD2 | \
345+
NFSD4_2_SECURITY_ATTRS)
346+
344347
static inline u32 nfsd_suppattrs0(u32 minorversion)
345348
{
346349
return minorversion ? NFSD4_1_SUPPORTED_ATTRS_WORD0

0 commit comments

Comments
 (0)