Skip to content

Commit 71205f3

Browse files
author
Alex Shi
committed
Merge tag 'v4.4.52' into linux-linaro-lsk-v4.4
This is the 4.4.52 stable release
2 parents aedb4a2 + dd4534d commit 71205f3

24 files changed

Lines changed: 218 additions & 121 deletions

File tree

Documentation/kernel-parameters.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1255,6 +1255,10 @@ bytes respectively. Such letter suffixes can also be entirely omitted.
12551255
When zero, profiling data is discarded and associated
12561256
debugfs files are removed at module unload time.
12571257

1258+
goldfish [X86] Enable the goldfish android emulator platform.
1259+
Don't use this when you are not running on the
1260+
android emulator
1261+
12581262
gpt [EFI] Forces disk with valid GPT signature but
12591263
invalid Protective MBR to be treated as GPT. If the
12601264
primary GPT is corrupted, it enables the backup/alternate

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
VERSION = 4
22
PATCHLEVEL = 4
3-
SUBLEVEL = 51
3+
SUBLEVEL = 52
44
EXTRAVERSION =
55
NAME = Blurry Fish Butt
66

arch/x86/kvm/vmx.c

Lines changed: 24 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -4867,6 +4867,12 @@ static int vmx_vcpu_setup(struct vcpu_vmx *vmx)
48674867
if (vmx_xsaves_supported())
48684868
vmcs_write64(XSS_EXIT_BITMAP, VMX_XSS_EXIT_BITMAP);
48694869

4870+
if (enable_pml) {
4871+
ASSERT(vmx->pml_pg);
4872+
vmcs_write64(PML_ADDRESS, page_to_phys(vmx->pml_pg));
4873+
vmcs_write16(GUEST_PML_INDEX, PML_ENTITY_NUM - 1);
4874+
}
4875+
48704876
return 0;
48714877
}
48724878

@@ -7839,22 +7845,6 @@ static void vmx_get_exit_info(struct kvm_vcpu *vcpu, u64 *info1, u64 *info2)
78397845
*info2 = vmcs_read32(VM_EXIT_INTR_INFO);
78407846
}
78417847

7842-
static int vmx_create_pml_buffer(struct vcpu_vmx *vmx)
7843-
{
7844-
struct page *pml_pg;
7845-
7846-
pml_pg = alloc_page(GFP_KERNEL | __GFP_ZERO);
7847-
if (!pml_pg)
7848-
return -ENOMEM;
7849-
7850-
vmx->pml_pg = pml_pg;
7851-
7852-
vmcs_write64(PML_ADDRESS, page_to_phys(vmx->pml_pg));
7853-
vmcs_write16(GUEST_PML_INDEX, PML_ENTITY_NUM - 1);
7854-
7855-
return 0;
7856-
}
7857-
78587848
static void vmx_destroy_pml_buffer(struct vcpu_vmx *vmx)
78597849
{
78607850
if (vmx->pml_pg) {
@@ -8789,14 +8779,26 @@ static struct kvm_vcpu *vmx_create_vcpu(struct kvm *kvm, unsigned int id)
87898779
if (err)
87908780
goto free_vcpu;
87918781

8782+
err = -ENOMEM;
8783+
8784+
/*
8785+
* If PML is turned on, failure on enabling PML just results in failure
8786+
* of creating the vcpu, therefore we can simplify PML logic (by
8787+
* avoiding dealing with cases, such as enabling PML partially on vcpus
8788+
* for the guest, etc.
8789+
*/
8790+
if (enable_pml) {
8791+
vmx->pml_pg = alloc_page(GFP_KERNEL | __GFP_ZERO);
8792+
if (!vmx->pml_pg)
8793+
goto uninit_vcpu;
8794+
}
8795+
87928796
vmx->guest_msrs = kmalloc(PAGE_SIZE, GFP_KERNEL);
87938797
BUILD_BUG_ON(ARRAY_SIZE(vmx_msr_index) * sizeof(vmx->guest_msrs[0])
87948798
> PAGE_SIZE);
87958799

8796-
err = -ENOMEM;
8797-
if (!vmx->guest_msrs) {
8798-
goto uninit_vcpu;
8799-
}
8800+
if (!vmx->guest_msrs)
8801+
goto free_pml;
88008802

88018803
vmx->loaded_vmcs = &vmx->vmcs01;
88028804
vmx->loaded_vmcs->vmcs = alloc_vmcs();
@@ -8840,25 +8842,15 @@ static struct kvm_vcpu *vmx_create_vcpu(struct kvm *kvm, unsigned int id)
88408842
vmx->nested.current_vmptr = -1ull;
88418843
vmx->nested.current_vmcs12 = NULL;
88428844

8843-
/*
8844-
* If PML is turned on, failure on enabling PML just results in failure
8845-
* of creating the vcpu, therefore we can simplify PML logic (by
8846-
* avoiding dealing with cases, such as enabling PML partially on vcpus
8847-
* for the guest, etc.
8848-
*/
8849-
if (enable_pml) {
8850-
err = vmx_create_pml_buffer(vmx);
8851-
if (err)
8852-
goto free_vmcs;
8853-
}
8854-
88558845
return &vmx->vcpu;
88568846

88578847
free_vmcs:
88588848
free_vpid(vmx->nested.vpid02);
88598849
free_loaded_vmcs(vmx->loaded_vmcs);
88608850
free_msrs:
88618851
kfree(vmx->guest_msrs);
8852+
free_pml:
8853+
vmx_destroy_pml_buffer(vmx);
88628854
uninit_vcpu:
88638855
kvm_vcpu_uninit(&vmx->vcpu);
88648856
free_vcpu:

arch/x86/platform/goldfish/goldfish.c

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,22 @@ static struct resource goldfish_pdev_bus_resources[] = {
4242
}
4343
};
4444

45+
static bool goldfish_enable __initdata;
46+
47+
static int __init goldfish_setup(char *str)
48+
{
49+
goldfish_enable = true;
50+
return 0;
51+
}
52+
__setup("goldfish", goldfish_setup);
53+
4554
static int __init goldfish_init(void)
4655
{
56+
if (!goldfish_enable)
57+
return -ENODEV;
58+
4759
platform_device_register_simple("goldfish_pdev_bus", -1,
48-
goldfish_pdev_bus_resources, 2);
60+
goldfish_pdev_bus_resources, 2);
4961
return 0;
5062
}
5163
device_initcall(goldfish_init);

block/blk-mq.c

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1259,12 +1259,9 @@ static blk_qc_t blk_mq_make_request(struct request_queue *q, struct bio *bio)
12591259

12601260
blk_queue_split(q, &bio, q->bio_split);
12611261

1262-
if (!is_flush_fua && !blk_queue_nomerges(q)) {
1263-
if (blk_attempt_plug_merge(q, bio, &request_count,
1264-
&same_queue_rq))
1265-
return BLK_QC_T_NONE;
1266-
} else
1267-
request_count = blk_plug_queued_count(q);
1262+
if (!is_flush_fua && !blk_queue_nomerges(q) &&
1263+
blk_attempt_plug_merge(q, bio, &request_count, &same_queue_rq))
1264+
return BLK_QC_T_NONE;
12681265

12691266
rq = blk_mq_map_request(q, bio, &data);
12701267
if (unlikely(!rq))
@@ -1355,9 +1352,11 @@ static blk_qc_t blk_sq_make_request(struct request_queue *q, struct bio *bio)
13551352

13561353
blk_queue_split(q, &bio, q->bio_split);
13571354

1358-
if (!is_flush_fua && !blk_queue_nomerges(q) &&
1359-
blk_attempt_plug_merge(q, bio, &request_count, NULL))
1360-
return BLK_QC_T_NONE;
1355+
if (!is_flush_fua && !blk_queue_nomerges(q)) {
1356+
if (blk_attempt_plug_merge(q, bio, &request_count, NULL))
1357+
return BLK_QC_T_NONE;
1358+
} else
1359+
request_count = blk_plug_queued_count(q);
13611360

13621361
rq = blk_mq_map_request(q, bio, &data);
13631362
if (unlikely(!rq))

drivers/net/wireless/realtek/rtlwifi/usb.c

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -834,12 +834,30 @@ static void rtl_usb_stop(struct ieee80211_hw *hw)
834834
struct rtl_priv *rtlpriv = rtl_priv(hw);
835835
struct rtl_hal *rtlhal = rtl_hal(rtl_priv(hw));
836836
struct rtl_usb *rtlusb = rtl_usbdev(rtl_usbpriv(hw));
837+
struct urb *urb;
837838

838839
/* should after adapter start and interrupt enable. */
839840
set_hal_stop(rtlhal);
840841
cancel_work_sync(&rtlpriv->works.fill_h2c_cmd);
841842
/* Enable software */
842843
SET_USB_STOP(rtlusb);
844+
845+
/* free pre-allocated URBs from rtl_usb_start() */
846+
usb_kill_anchored_urbs(&rtlusb->rx_submitted);
847+
848+
tasklet_kill(&rtlusb->rx_work_tasklet);
849+
cancel_work_sync(&rtlpriv->works.lps_change_work);
850+
851+
flush_workqueue(rtlpriv->works.rtl_wq);
852+
853+
skb_queue_purge(&rtlusb->rx_queue);
854+
855+
while ((urb = usb_get_from_anchor(&rtlusb->rx_cleanup_urbs))) {
856+
usb_free_coherent(urb->dev, urb->transfer_buffer_length,
857+
urb->transfer_buffer, urb->transfer_dma);
858+
usb_free_urb(urb);
859+
}
860+
843861
rtlpriv->cfg->ops->hw_disable(hw);
844862
}
845863

@@ -1073,6 +1091,7 @@ int rtl_usb_probe(struct usb_interface *intf,
10731091
return -ENOMEM;
10741092
}
10751093
rtlpriv = hw->priv;
1094+
rtlpriv->hw = hw;
10761095
rtlpriv->usb_data = kzalloc(RTL_USB_MAX_RX_COUNT * sizeof(u32),
10771096
GFP_KERNEL);
10781097
if (!rtlpriv->usb_data)

drivers/platform/goldfish/pdev_bus.c

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -157,23 +157,26 @@ static int goldfish_new_pdev(void)
157157
static irqreturn_t goldfish_pdev_bus_interrupt(int irq, void *dev_id)
158158
{
159159
irqreturn_t ret = IRQ_NONE;
160+
160161
while (1) {
161162
u32 op = readl(pdev_bus_base + PDEV_BUS_OP);
162-
switch (op) {
163-
case PDEV_BUS_OP_DONE:
164-
return IRQ_NONE;
165163

164+
switch (op) {
166165
case PDEV_BUS_OP_REMOVE_DEV:
167166
goldfish_pdev_remove();
167+
ret = IRQ_HANDLED;
168168
break;
169169

170170
case PDEV_BUS_OP_ADD_DEV:
171171
goldfish_new_pdev();
172+
ret = IRQ_HANDLED;
172173
break;
174+
175+
case PDEV_BUS_OP_DONE:
176+
default:
177+
return ret;
173178
}
174-
ret = IRQ_HANDLED;
175179
}
176-
return ret;
177180
}
178181

179182
static int goldfish_pdev_bus_probe(struct platform_device *pdev)

drivers/rtc/interface.c

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -748,9 +748,23 @@ EXPORT_SYMBOL_GPL(rtc_irq_set_freq);
748748
*/
749749
static int rtc_timer_enqueue(struct rtc_device *rtc, struct rtc_timer *timer)
750750
{
751+
struct timerqueue_node *next = timerqueue_getnext(&rtc->timerqueue);
752+
struct rtc_time tm;
753+
ktime_t now;
754+
751755
timer->enabled = 1;
756+
__rtc_read_time(rtc, &tm);
757+
now = rtc_tm_to_ktime(tm);
758+
759+
/* Skip over expired timers */
760+
while (next) {
761+
if (next->expires.tv64 >= now.tv64)
762+
break;
763+
next = timerqueue_iterate_next(next);
764+
}
765+
752766
timerqueue_add(&rtc->timerqueue, &timer->node);
753-
if (&timer->node == timerqueue_getnext(&rtc->timerqueue)) {
767+
if (!next) {
754768
struct rtc_wkalrm alarm;
755769
int err;
756770
alarm.time = rtc_ktime_to_tm(timer->node.expires);

drivers/tty/serial/msm_serial.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1615,6 +1615,7 @@ static const struct of_device_id msm_match_table[] = {
16151615
{ .compatible = "qcom,msm-uartdm" },
16161616
{}
16171617
};
1618+
MODULE_DEVICE_TABLE(of, msm_match_table);
16181619

16191620
static struct platform_driver msm_platform_driver = {
16201621
.remove = msm_serial_remove,

drivers/usb/chipidea/ci_hdrc_imx.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,6 @@ static int ci_hdrc_imx_probe(struct platform_device *pdev)
244244
struct ci_hdrc_platform_data pdata = {
245245
.name = dev_name(&pdev->dev),
246246
.capoffset = DEF_CAPOFFSET,
247-
.flags = CI_HDRC_SET_NON_ZERO_TTHA,
248247
};
249248
int ret;
250249
const struct of_device_id *of_id;

0 commit comments

Comments
 (0)