mirror of
https://github.com/torvalds/linux.git
synced 2026-06-08 14:42:37 +02:00
Merge branch 'linux-linaro-lsk' into linux-linaro-lsk-android
This commit is contained in:
commit
45fb4fc7ed
2
Makefile
2
Makefile
|
|
@ -1,6 +1,6 @@
|
|||
VERSION = 3
|
||||
PATCHLEVEL = 10
|
||||
SUBLEVEL = 62
|
||||
SUBLEVEL = 63
|
||||
EXTRAVERSION =
|
||||
NAME = TOSSUG Baby Fish
|
||||
|
||||
|
|
|
|||
|
|
@ -51,10 +51,11 @@ static inline u64 notrace cyc_to_ns(u64 cyc, u32 mult, u32 shift)
|
|||
return (cyc * mult) >> shift;
|
||||
}
|
||||
|
||||
static unsigned long long notrace cyc_to_sched_clock(u32 cyc, u32 mask)
|
||||
static unsigned long long notrace sched_clock_32(void)
|
||||
{
|
||||
u64 epoch_ns;
|
||||
u32 epoch_cyc;
|
||||
u32 cyc;
|
||||
|
||||
if (cd.suspended)
|
||||
return cd.epoch_ns;
|
||||
|
|
@ -73,7 +74,9 @@ static unsigned long long notrace cyc_to_sched_clock(u32 cyc, u32 mask)
|
|||
smp_rmb();
|
||||
} while (epoch_cyc != cd.epoch_cyc_copy);
|
||||
|
||||
return epoch_ns + cyc_to_ns((cyc - epoch_cyc) & mask, cd.mult, cd.shift);
|
||||
cyc = read_sched_clock();
|
||||
cyc = (cyc - epoch_cyc) & sched_clock_mask;
|
||||
return epoch_ns + cyc_to_ns(cyc, cd.mult, cd.shift);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
@ -165,12 +168,6 @@ void __init setup_sched_clock(u32 (*read)(void), int bits, unsigned long rate)
|
|||
pr_debug("Registered %pF as sched_clock source\n", read);
|
||||
}
|
||||
|
||||
static unsigned long long notrace sched_clock_32(void)
|
||||
{
|
||||
u32 cyc = read_sched_clock();
|
||||
return cyc_to_sched_clock(cyc, sched_clock_mask);
|
||||
}
|
||||
|
||||
unsigned long long __read_mostly (*sched_clock_func)(void) = sched_clock_32;
|
||||
|
||||
unsigned long long notrace sched_clock(void)
|
||||
|
|
|
|||
|
|
@ -30,8 +30,8 @@
|
|||
V_FUNCTION_BEGIN(__kernel_getcpu)
|
||||
.cfi_startproc
|
||||
mfspr r5,SPRN_USPRG3
|
||||
cmpdi cr0,r3,0
|
||||
cmpdi cr1,r4,0
|
||||
cmpwi cr0,r3,0
|
||||
cmpwi cr1,r4,0
|
||||
clrlwi r6,r5,16
|
||||
rlwinm r7,r5,16,31-15,31-0
|
||||
beq cr0,1f
|
||||
|
|
|
|||
|
|
@ -65,6 +65,7 @@
|
|||
#define EXIT_REASON_EOI_INDUCED 45
|
||||
#define EXIT_REASON_EPT_VIOLATION 48
|
||||
#define EXIT_REASON_EPT_MISCONFIG 49
|
||||
#define EXIT_REASON_INVEPT 50
|
||||
#define EXIT_REASON_PREEMPTION_TIMER 52
|
||||
#define EXIT_REASON_WBINVD 54
|
||||
#define EXIT_REASON_XSETBV 55
|
||||
|
|
|
|||
|
|
@ -6242,6 +6242,12 @@ static int handle_vmptrst(struct kvm_vcpu *vcpu)
|
|||
return 1;
|
||||
}
|
||||
|
||||
static int handle_invept(struct kvm_vcpu *vcpu)
|
||||
{
|
||||
kvm_queue_exception(vcpu, UD_VECTOR);
|
||||
return 1;
|
||||
}
|
||||
|
||||
/*
|
||||
* The exit handlers return 1 if the exit was handled fully and guest execution
|
||||
* may resume. Otherwise they set the kvm_run parameter to indicate what needs
|
||||
|
|
@ -6286,6 +6292,7 @@ static int (*const kvm_vmx_exit_handlers[])(struct kvm_vcpu *vcpu) = {
|
|||
[EXIT_REASON_PAUSE_INSTRUCTION] = handle_pause,
|
||||
[EXIT_REASON_MWAIT_INSTRUCTION] = handle_invalid_op,
|
||||
[EXIT_REASON_MONITOR_INSTRUCTION] = handle_invalid_op,
|
||||
[EXIT_REASON_INVEPT] = handle_invept,
|
||||
};
|
||||
|
||||
static const int kvm_vmx_max_exit_handlers =
|
||||
|
|
@ -6512,6 +6519,7 @@ static bool nested_vmx_exit_handled(struct kvm_vcpu *vcpu)
|
|||
case EXIT_REASON_VMPTRST: case EXIT_REASON_VMREAD:
|
||||
case EXIT_REASON_VMRESUME: case EXIT_REASON_VMWRITE:
|
||||
case EXIT_REASON_VMOFF: case EXIT_REASON_VMON:
|
||||
case EXIT_REASON_INVEPT:
|
||||
/*
|
||||
* VMX instructions trap unconditionally. This allows L1 to
|
||||
* emulate them for its L2 guest, i.e., allows 3-level nesting!
|
||||
|
|
|
|||
|
|
@ -320,6 +320,9 @@ static const struct pci_device_id ahci_pci_tbl[] = {
|
|||
{ PCI_VDEVICE(INTEL, 0x8c87), board_ahci }, /* 9 Series RAID */
|
||||
{ PCI_VDEVICE(INTEL, 0x8c8e), board_ahci }, /* 9 Series RAID */
|
||||
{ PCI_VDEVICE(INTEL, 0x8c8f), board_ahci }, /* 9 Series RAID */
|
||||
{ PCI_VDEVICE(INTEL, 0x9d03), board_ahci }, /* Sunrise Point-LP AHCI */
|
||||
{ PCI_VDEVICE(INTEL, 0x9d05), board_ahci }, /* Sunrise Point-LP RAID */
|
||||
{ PCI_VDEVICE(INTEL, 0x9d07), board_ahci }, /* Sunrise Point-LP RAID */
|
||||
{ PCI_VDEVICE(INTEL, 0xa103), board_ahci }, /* Sunrise Point-H AHCI */
|
||||
{ PCI_VDEVICE(INTEL, 0xa103), board_ahci }, /* Sunrise Point-H RAID */
|
||||
{ PCI_VDEVICE(INTEL, 0xa105), board_ahci }, /* Sunrise Point-H RAID */
|
||||
|
|
@ -491,6 +494,7 @@ static const struct pci_device_id ahci_pci_tbl[] = {
|
|||
* enabled. https://bugzilla.kernel.org/show_bug.cgi?id=60731
|
||||
*/
|
||||
{ PCI_VDEVICE(SAMSUNG, 0x1600), board_ahci_nomsi },
|
||||
{ PCI_VDEVICE(SAMSUNG, 0xa800), board_ahci_nomsi },
|
||||
|
||||
/* Enmotus */
|
||||
{ PCI_DEVICE(0x1c44, 0x8000), board_ahci },
|
||||
|
|
|
|||
|
|
@ -1501,7 +1501,7 @@ static int sata_fsl_probe(struct platform_device *ofdev)
|
|||
host_priv->csr_base = csr_base;
|
||||
|
||||
irq = irq_of_parse_and_map(ofdev->dev.of_node, 0);
|
||||
if (irq < 0) {
|
||||
if (!irq) {
|
||||
dev_err(&ofdev->dev, "invalid irq from platform\n");
|
||||
goto error_exit_with_cleanup;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1097,6 +1097,17 @@ bool intel_lvds_init(struct drm_device *dev)
|
|||
int pipe;
|
||||
u8 pin;
|
||||
|
||||
/*
|
||||
* Unlock registers and just leave them unlocked. Do this before
|
||||
* checking quirk lists to avoid bogus WARNINGs.
|
||||
*/
|
||||
if (HAS_PCH_SPLIT(dev)) {
|
||||
I915_WRITE(PCH_PP_CONTROL,
|
||||
I915_READ(PCH_PP_CONTROL) | PANEL_UNLOCK_REGS);
|
||||
} else {
|
||||
I915_WRITE(PP_CONTROL,
|
||||
I915_READ(PP_CONTROL) | PANEL_UNLOCK_REGS);
|
||||
}
|
||||
if (!intel_lvds_supported(dev))
|
||||
return false;
|
||||
|
||||
|
|
@ -1280,17 +1291,6 @@ bool intel_lvds_init(struct drm_device *dev)
|
|||
DRM_DEBUG_KMS("detected %s-link lvds configuration\n",
|
||||
lvds_encoder->is_dual_link ? "dual" : "single");
|
||||
|
||||
/*
|
||||
* Unlock registers and just
|
||||
* leave them unlocked
|
||||
*/
|
||||
if (HAS_PCH_SPLIT(dev)) {
|
||||
I915_WRITE(PCH_PP_CONTROL,
|
||||
I915_READ(PCH_PP_CONTROL) | PANEL_UNLOCK_REGS);
|
||||
} else {
|
||||
I915_WRITE(PP_CONTROL,
|
||||
I915_READ(PP_CONTROL) | PANEL_UNLOCK_REGS);
|
||||
}
|
||||
lvds_connector->lid_notifier.notifier_call = intel_lid_notify;
|
||||
if (acpi_lid_notifier_register(&lvds_connector->lid_notifier)) {
|
||||
DRM_DEBUG_KMS("lid notifier registration failed\n");
|
||||
|
|
|
|||
|
|
@ -666,6 +666,8 @@ int radeon_get_vblank_timestamp_kms(struct drm_device *dev, int crtc,
|
|||
|
||||
/* Get associated drm_crtc: */
|
||||
drmcrtc = &rdev->mode_info.crtcs[crtc]->base;
|
||||
if (!drmcrtc)
|
||||
return -EINVAL;
|
||||
|
||||
/* Helper routine in DRM core does all the work: */
|
||||
return drm_calc_vbltimestamp_from_scanoutpos(dev, crtc, max_error,
|
||||
|
|
|
|||
|
|
@ -414,11 +414,9 @@ i2c_davinci_xfer_msg(struct i2c_adapter *adap, struct i2c_msg *msg, int stop)
|
|||
if (dev->cmd_err & DAVINCI_I2C_STR_NACK) {
|
||||
if (msg->flags & I2C_M_IGNORE_NAK)
|
||||
return msg->len;
|
||||
if (stop) {
|
||||
w = davinci_i2c_read_reg(dev, DAVINCI_I2C_MDR_REG);
|
||||
w |= DAVINCI_I2C_MDR_STP;
|
||||
davinci_i2c_write_reg(dev, DAVINCI_I2C_MDR_REG, w);
|
||||
}
|
||||
w = davinci_i2c_read_reg(dev, DAVINCI_I2C_MDR_REG);
|
||||
w |= DAVINCI_I2C_MDR_STP;
|
||||
davinci_i2c_write_reg(dev, DAVINCI_I2C_MDR_REG, w);
|
||||
return -EREMOTEIO;
|
||||
}
|
||||
return -EIO;
|
||||
|
|
|
|||
|
|
@ -928,14 +928,12 @@ omap_i2c_isr_thread(int this_irq, void *dev_id)
|
|||
if (stat & OMAP_I2C_STAT_NACK) {
|
||||
err |= OMAP_I2C_STAT_NACK;
|
||||
omap_i2c_ack_stat(dev, OMAP_I2C_STAT_NACK);
|
||||
break;
|
||||
}
|
||||
|
||||
if (stat & OMAP_I2C_STAT_AL) {
|
||||
dev_err(dev->dev, "Arbitration lost\n");
|
||||
err |= OMAP_I2C_STAT_AL;
|
||||
omap_i2c_ack_stat(dev, OMAP_I2C_STAT_AL);
|
||||
break;
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
@ -960,11 +958,13 @@ omap_i2c_isr_thread(int this_irq, void *dev_id)
|
|||
if (dev->fifo_size)
|
||||
num_bytes = dev->buf_len;
|
||||
|
||||
omap_i2c_receive_data(dev, num_bytes, true);
|
||||
|
||||
if (dev->errata & I2C_OMAP_ERRATA_I207)
|
||||
if (dev->errata & I2C_OMAP_ERRATA_I207) {
|
||||
i2c_omap_errata_i207(dev, stat);
|
||||
num_bytes = (omap_i2c_read_reg(dev,
|
||||
OMAP_I2C_BUFSTAT_REG) >> 8) & 0x3F;
|
||||
}
|
||||
|
||||
omap_i2c_receive_data(dev, num_bytes, true);
|
||||
omap_i2c_ack_stat(dev, OMAP_I2C_STAT_RDR);
|
||||
continue;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2139,7 +2139,7 @@ static int smiapp_set_selection(struct v4l2_subdev *subdev,
|
|||
ret = smiapp_set_compose(subdev, fh, sel);
|
||||
break;
|
||||
default:
|
||||
BUG();
|
||||
ret = -EINVAL;
|
||||
}
|
||||
|
||||
mutex_unlock(&sensor->mutex);
|
||||
|
|
|
|||
|
|
@ -8392,7 +8392,8 @@ static int tg3_init_rings(struct tg3 *tp)
|
|||
if (tnapi->rx_rcb)
|
||||
memset(tnapi->rx_rcb, 0, TG3_RX_RCB_RING_BYTES(tp));
|
||||
|
||||
if (tg3_rx_prodring_alloc(tp, &tnapi->prodring)) {
|
||||
if (tnapi->prodring.rx_std &&
|
||||
tg3_rx_prodring_alloc(tp, &tnapi->prodring)) {
|
||||
tg3_free_rings(tp);
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1584,6 +1584,8 @@ void igb_power_up_link(struct igb_adapter *adapter)
|
|||
igb_power_up_phy_copper(&adapter->hw);
|
||||
else
|
||||
igb_power_up_serdes_link_82575(&adapter->hw);
|
||||
|
||||
igb_setup_link(&adapter->hw);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -210,7 +210,7 @@
|
|||
/* Various constants */
|
||||
|
||||
/* Coalescing */
|
||||
#define MVNETA_TXDONE_COAL_PKTS 16
|
||||
#define MVNETA_TXDONE_COAL_PKTS 1
|
||||
#define MVNETA_RX_COAL_PKTS 32
|
||||
#define MVNETA_RX_COAL_USEC 100
|
||||
|
||||
|
|
|
|||
|
|
@ -1207,7 +1207,7 @@ static int qp_alloc_res(struct mlx4_dev *dev, int slave, int op, int cmd,
|
|||
|
||||
switch (op) {
|
||||
case RES_OP_RESERVE:
|
||||
count = get_param_l(&in_param);
|
||||
count = get_param_l(&in_param) & 0xffffff;
|
||||
align = get_param_h(&in_param);
|
||||
err = __mlx4_qp_reserve_range(dev, count, align, &base);
|
||||
if (err)
|
||||
|
|
|
|||
|
|
@ -459,9 +459,6 @@ static void xennet_make_frags(struct sk_buff *skb, struct net_device *dev,
|
|||
len = skb_frag_size(frag);
|
||||
offset = frag->page_offset;
|
||||
|
||||
/* Data must not cross a page boundary. */
|
||||
BUG_ON(len + offset > PAGE_SIZE<<compound_order(page));
|
||||
|
||||
/* Skip unused frames from start of page */
|
||||
page += offset >> PAGE_SHIFT;
|
||||
offset &= ~PAGE_MASK;
|
||||
|
|
@ -469,8 +466,6 @@ static void xennet_make_frags(struct sk_buff *skb, struct net_device *dev,
|
|||
while (len > 0) {
|
||||
unsigned long bytes;
|
||||
|
||||
BUG_ON(offset >= PAGE_SIZE);
|
||||
|
||||
bytes = PAGE_SIZE - offset;
|
||||
if (bytes > len)
|
||||
bytes = len;
|
||||
|
|
|
|||
|
|
@ -1493,6 +1493,7 @@ static ssize_t ext2_quota_write(struct super_block *sb, int type,
|
|||
sb->s_blocksize - offset : towrite;
|
||||
|
||||
tmp_bh.b_state = 0;
|
||||
tmp_bh.b_size = sb->s_blocksize;
|
||||
err = ext2_get_block(inode, blk, &tmp_bh, 1);
|
||||
if (err < 0)
|
||||
goto out;
|
||||
|
|
|
|||
|
|
@ -244,8 +244,10 @@ int __frontswap_store(struct page *page)
|
|||
the (older) page from frontswap
|
||||
*/
|
||||
inc_frontswap_failed_stores();
|
||||
if (dup)
|
||||
if (dup) {
|
||||
__frontswap_clear(sis, offset);
|
||||
frontswap_ops->invalidate_page(type, offset);
|
||||
}
|
||||
}
|
||||
if (frontswap_writethrough_enabled)
|
||||
/* report failure so swap also writes to swap device */
|
||||
|
|
|
|||
24
mm/memory.c
24
mm/memory.c
|
|
@ -836,20 +836,20 @@ copy_one_pte(struct mm_struct *dst_mm, struct mm_struct *src_mm,
|
|||
if (!pte_file(pte)) {
|
||||
swp_entry_t entry = pte_to_swp_entry(pte);
|
||||
|
||||
if (swap_duplicate(entry) < 0)
|
||||
return entry.val;
|
||||
if (likely(!non_swap_entry(entry))) {
|
||||
if (swap_duplicate(entry) < 0)
|
||||
return entry.val;
|
||||
|
||||
/* make sure dst_mm is on swapoff's mmlist. */
|
||||
if (unlikely(list_empty(&dst_mm->mmlist))) {
|
||||
spin_lock(&mmlist_lock);
|
||||
if (list_empty(&dst_mm->mmlist))
|
||||
list_add(&dst_mm->mmlist,
|
||||
&src_mm->mmlist);
|
||||
spin_unlock(&mmlist_lock);
|
||||
}
|
||||
if (likely(!non_swap_entry(entry)))
|
||||
/* make sure dst_mm is on swapoff's mmlist. */
|
||||
if (unlikely(list_empty(&dst_mm->mmlist))) {
|
||||
spin_lock(&mmlist_lock);
|
||||
if (list_empty(&dst_mm->mmlist))
|
||||
list_add(&dst_mm->mmlist,
|
||||
&src_mm->mmlist);
|
||||
spin_unlock(&mmlist_lock);
|
||||
}
|
||||
rss[MM_SWAPENTS]++;
|
||||
else if (is_migration_entry(entry)) {
|
||||
} else if (is_migration_entry(entry)) {
|
||||
page = migration_entry_to_page(entry);
|
||||
|
||||
if (PageAnon(page))
|
||||
|
|
|
|||
|
|
@ -1318,6 +1318,7 @@ static int do_setlink(const struct sk_buff *skb,
|
|||
goto errout;
|
||||
}
|
||||
if (!netlink_ns_capable(skb, net->user_ns, CAP_NET_ADMIN)) {
|
||||
put_net(net);
|
||||
err = -EPERM;
|
||||
goto errout;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -512,11 +512,11 @@ static int ip6gre_rcv(struct sk_buff *skb)
|
|||
|
||||
skb->protocol = gre_proto;
|
||||
/* WCCP version 1 and 2 protocol decoding.
|
||||
* - Change protocol to IP
|
||||
* - Change protocol to IPv6
|
||||
* - When dealing with WCCPv2, Skip extra 4 bytes in GRE header
|
||||
*/
|
||||
if (flags == 0 && gre_proto == htons(ETH_P_WCCP)) {
|
||||
skb->protocol = htons(ETH_P_IP);
|
||||
skb->protocol = htons(ETH_P_IPV6);
|
||||
if ((*(h + offset) & 0xF0) != 0x40)
|
||||
offset += 4;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -413,12 +413,12 @@ int sctp_packet_transmit(struct sctp_packet *packet)
|
|||
sk = chunk->skb->sk;
|
||||
|
||||
/* Allocate the new skb. */
|
||||
nskb = alloc_skb(packet->size + LL_MAX_HEADER, GFP_ATOMIC);
|
||||
nskb = alloc_skb(packet->size + MAX_HEADER, GFP_ATOMIC);
|
||||
if (!nskb)
|
||||
goto nomem;
|
||||
|
||||
/* Make sure the outbound skb has enough header room reserved. */
|
||||
skb_reserve(nskb, packet->overhead + LL_MAX_HEADER);
|
||||
skb_reserve(nskb, packet->overhead + MAX_HEADER);
|
||||
|
||||
/* Set the owning socket so that we know where to get the
|
||||
* destination IP address.
|
||||
|
|
|
|||
|
|
@ -364,6 +364,8 @@ static void snd_usbmidi_error_timer(unsigned long data)
|
|||
if (in && in->error_resubmit) {
|
||||
in->error_resubmit = 0;
|
||||
for (j = 0; j < INPUT_URBS; ++j) {
|
||||
if (atomic_read(&in->urbs[j]->use_count))
|
||||
continue;
|
||||
in->urbs[j]->dev = umidi->dev;
|
||||
snd_usbmidi_submit_urb(in->urbs[j], GFP_ATOMIC);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user