Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 154513
b: refs/heads/master
c: bb1e9b8
h: refs/heads/master
i:
  154511: 2e33025
v: v3
  • Loading branch information
Linus Torvalds committed Jun 29, 2009
1 parent 4be61ec commit 36a7347
Show file tree
Hide file tree
Showing 41 changed files with 208 additions and 97 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 94e5d714f604d4cb4cb13163f01ede278e69258b
refs/heads/master: bb1e9b844b989fc9a4dfffbf7a064703cda2a6a6
6 changes: 6 additions & 0 deletions trunk/arch/ia64/kvm/kvm_lib.c
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,11 @@
*
*/
#undef CONFIG_MODULES
#include <linux/module.h>
#undef CONFIG_KALLSYMS
#undef EXPORT_SYMBOL
#undef EXPORT_SYMBOL_GPL
#define EXPORT_SYMBOL(sym)
#define EXPORT_SYMBOL_GPL(sym)
#include "../../../lib/vsprintf.c"
#include "../../../lib/ctype.c"
4 changes: 3 additions & 1 deletion trunk/arch/s390/include/asm/kvm_host.h
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,9 @@ struct kvm_s390_sie_block {
__u8 reservedd0[48]; /* 0x00d0 */
__u64 gcr[16]; /* 0x0100 */
__u64 gbea; /* 0x0180 */
__u8 reserved188[120]; /* 0x0188 */
__u8 reserved188[24]; /* 0x0188 */
__u32 fac; /* 0x01a0 */
__u8 reserved1a4[92]; /* 0x01a4 */
} __attribute__((packed));

struct kvm_vcpu_stat {
Expand Down
23 changes: 22 additions & 1 deletion trunk/arch/s390/kvm/kvm-s390.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
#include <asm/lowcore.h>
#include <asm/pgtable.h>
#include <asm/nmi.h>
#include <asm/system.h>
#include "kvm-s390.h"
#include "gaccess.h"

Expand Down Expand Up @@ -69,6 +70,7 @@ struct kvm_stats_debugfs_item debugfs_entries[] = {
{ NULL }
};

static unsigned long long *facilities;

/* Section: not file related */
void kvm_arch_hardware_enable(void *garbage)
Expand Down Expand Up @@ -288,6 +290,7 @@ int kvm_arch_vcpu_setup(struct kvm_vcpu *vcpu)
vcpu->arch.sie_block->gmsor = vcpu->kvm->arch.guest_origin;
vcpu->arch.sie_block->ecb = 2;
vcpu->arch.sie_block->eca = 0xC1002001U;
vcpu->arch.sie_block->fac = (int) (long) facilities;
hrtimer_init(&vcpu->arch.ckc_timer, CLOCK_REALTIME, HRTIMER_MODE_ABS);
tasklet_init(&vcpu->arch.tasklet, kvm_s390_tasklet,
(unsigned long) vcpu);
Expand Down Expand Up @@ -739,11 +742,29 @@ gfn_t unalias_gfn(struct kvm *kvm, gfn_t gfn)

static int __init kvm_s390_init(void)
{
return kvm_init(NULL, sizeof(struct kvm_vcpu), THIS_MODULE);
int ret;
ret = kvm_init(NULL, sizeof(struct kvm_vcpu), THIS_MODULE);
if (ret)
return ret;

/*
* guests can ask for up to 255+1 double words, we need a full page
* to hold the maximum amount of facilites. On the other hand, we
* only set facilities that are known to work in KVM.
*/
facilities = (unsigned long long *) get_zeroed_page(GFP_DMA);
if (!facilities) {
kvm_exit();
return -ENOMEM;
}
stfle(facilities, 1);
facilities[0] &= 0xff00fff3f0700000ULL;
return 0;
}

static void __exit kvm_s390_exit(void)
{
free_page((unsigned long) facilities);
kvm_exit();
}

Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/s390/kvm/priv.c
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ static int handle_stfl(struct kvm_vcpu *vcpu)

vcpu->stat.instruction_stfl++;
/* only pass the facility bits, which we can handle */
facility_list &= 0xfe00fff3;
facility_list &= 0xff00fff3;

rc = copy_to_guest(vcpu, offsetof(struct _lowcore, stfl_fac_list),
&facility_list, sizeof(facility_list));
Expand Down
3 changes: 0 additions & 3 deletions trunk/arch/x86/kernel/cpu/common.c
Original file line number Diff line number Diff line change
Expand Up @@ -848,9 +848,6 @@ static void __cpuinit identify_cpu(struct cpuinfo_x86 *c)
#if defined(CONFIG_NUMA) && defined(CONFIG_X86_64)
numa_add_cpu(smp_processor_id());
#endif

/* Cap the iomem address space to what is addressable on all CPUs */
iomem_resource.end &= (1ULL << c->x86_phys_bits) - 1;
}

#ifdef CONFIG_X86_64
Expand Down
6 changes: 3 additions & 3 deletions trunk/arch/x86/kvm/mmu.c
Original file line number Diff line number Diff line change
Expand Up @@ -2157,7 +2157,7 @@ static void reset_rsvds_bits_mask(struct kvm_vcpu *vcpu, int level)
else
/* 32 bits PSE 4MB page */
context->rsvd_bits_mask[1][1] = rsvd_bits(13, 21);
context->rsvd_bits_mask[1][0] = ~0ull;
context->rsvd_bits_mask[1][0] = context->rsvd_bits_mask[1][0];
break;
case PT32E_ROOT_LEVEL:
context->rsvd_bits_mask[0][2] =
Expand All @@ -2170,7 +2170,7 @@ static void reset_rsvds_bits_mask(struct kvm_vcpu *vcpu, int level)
context->rsvd_bits_mask[1][1] = exb_bit_rsvd |
rsvd_bits(maxphyaddr, 62) |
rsvd_bits(13, 20); /* large page */
context->rsvd_bits_mask[1][0] = ~0ull;
context->rsvd_bits_mask[1][0] = context->rsvd_bits_mask[1][0];
break;
case PT64_ROOT_LEVEL:
context->rsvd_bits_mask[0][3] = exb_bit_rsvd |
Expand All @@ -2186,7 +2186,7 @@ static void reset_rsvds_bits_mask(struct kvm_vcpu *vcpu, int level)
context->rsvd_bits_mask[1][1] = exb_bit_rsvd |
rsvd_bits(maxphyaddr, 51) |
rsvd_bits(13, 20); /* large page */
context->rsvd_bits_mask[1][0] = ~0ull;
context->rsvd_bits_mask[1][0] = context->rsvd_bits_mask[1][0];
break;
}
}
Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/x86/kvm/paging_tmpl.h
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,7 @@ static u64 *FNAME(fetch)(struct kvm_vcpu *vcpu, gva_t addr,
{
unsigned access = gw->pt_access;
struct kvm_mmu_page *shadow_page;
u64 spte, *sptep;
u64 spte, *sptep = NULL;
int direct;
gfn_t table_gfn;
int r;
Expand Down
15 changes: 15 additions & 0 deletions trunk/arch/x86/kvm/vmx.c
Original file line number Diff line number Diff line change
Expand Up @@ -3012,6 +3012,12 @@ static int handle_vmcall(struct kvm_vcpu *vcpu, struct kvm_run *kvm_run)
return 1;
}

static int handle_vmx_insn(struct kvm_vcpu *vcpu, struct kvm_run *kvm_run)
{
kvm_queue_exception(vcpu, UD_VECTOR);
return 1;
}

static int handle_invlpg(struct kvm_vcpu *vcpu, struct kvm_run *kvm_run)
{
unsigned long exit_qualification = vmcs_readl(EXIT_QUALIFICATION);
Expand Down Expand Up @@ -3198,6 +3204,15 @@ static int (*kvm_vmx_exit_handlers[])(struct kvm_vcpu *vcpu,
[EXIT_REASON_HLT] = handle_halt,
[EXIT_REASON_INVLPG] = handle_invlpg,
[EXIT_REASON_VMCALL] = handle_vmcall,
[EXIT_REASON_VMCLEAR] = handle_vmx_insn,
[EXIT_REASON_VMLAUNCH] = handle_vmx_insn,
[EXIT_REASON_VMPTRLD] = handle_vmx_insn,
[EXIT_REASON_VMPTRST] = handle_vmx_insn,
[EXIT_REASON_VMREAD] = handle_vmx_insn,
[EXIT_REASON_VMRESUME] = handle_vmx_insn,
[EXIT_REASON_VMWRITE] = handle_vmx_insn,
[EXIT_REASON_VMOFF] = handle_vmx_insn,
[EXIT_REASON_VMON] = handle_vmx_insn,
[EXIT_REASON_TPR_BELOW_THRESHOLD] = handle_tpr_below_threshold,
[EXIT_REASON_APIC_ACCESS] = handle_apic_access,
[EXIT_REASON_WBINVD] = handle_wbinvd,
Expand Down
1 change: 1 addition & 0 deletions trunk/arch/x86/kvm/x86.c
Original file line number Diff line number Diff line change
Expand Up @@ -898,6 +898,7 @@ int kvm_get_msr_common(struct kvm_vcpu *vcpu, u32 msr, u64 *pdata)
case MSR_VM_HSAVE_PA:
case MSR_P6_EVNTSEL0:
case MSR_P6_EVNTSEL1:
case MSR_K7_EVNTSEL0:
data = 0;
break;
case MSR_MTRRcap:
Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/x86/kvm/x86_emulate.c
Original file line number Diff line number Diff line change
Expand Up @@ -1361,7 +1361,7 @@ static inline int writeback(struct x86_emulate_ctxt *ctxt,
return 0;
}

void toggle_interruptibility(struct x86_emulate_ctxt *ctxt, u32 mask)
static void toggle_interruptibility(struct x86_emulate_ctxt *ctxt, u32 mask)
{
u32 int_shadow = kvm_x86_ops->get_interrupt_shadow(ctxt->vcpu, mask);
/*
Expand Down
15 changes: 11 additions & 4 deletions trunk/drivers/char/tty_ldisc.c
Original file line number Diff line number Diff line change
Expand Up @@ -867,15 +867,22 @@ void tty_ldisc_release(struct tty_struct *tty, struct tty_struct *o_tty)
tty_ldisc_wait_idle(tty);

/*
* Shutdown the current line discipline, and reset it to N_TTY.
*
* FIXME: this MUST get fixed for the new reflocking
* Now kill off the ldisc
*/
tty_ldisc_close(tty, tty->ldisc);
tty_ldisc_put(tty->ldisc);
/* Force an oops if we mess this up */
tty->ldisc = NULL;

/* Ensure the next open requests the N_TTY ldisc */
tty_set_termios_ldisc(tty, N_TTY);

tty_ldisc_reinit(tty);
/* This will need doing differently if we need to lock */
if (o_tty)
tty_ldisc_release(o_tty, NULL);

/* And the memory resources remaining (buffers, termios) will be
disposed of when the kref hits zero */
}

/**
Expand Down
2 changes: 2 additions & 0 deletions trunk/drivers/net/atl1c/atl1c_ethtool.c
Original file line number Diff line number Diff line change
Expand Up @@ -281,6 +281,8 @@ static int atl1c_set_wol(struct net_device *netdev, struct ethtool_wolinfo *wol)
if (wol->wolopts & WAKE_PHY)
adapter->wol |= AT_WUFC_LNKC;

device_set_wakeup_enable(&adapter->pdev->dev, adapter->wol);

return 0;
}

Expand Down
2 changes: 2 additions & 0 deletions trunk/drivers/net/atl1e/atl1e_ethtool.c
Original file line number Diff line number Diff line change
Expand Up @@ -365,6 +365,8 @@ static int atl1e_set_wol(struct net_device *netdev, struct ethtool_wolinfo *wol)
if (wol->wolopts & WAKE_PHY)
adapter->wol |= AT_WUFC_LNKC;

device_set_wakeup_enable(&adapter->pdev->dev, adapter->wol);

return 0;
}

Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/net/benet/be.h
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ static inline char *nic_name(struct pci_dev *pdev)
#define RX_FRAGS_REFILL_WM (RX_Q_LEN - MAX_RX_POST)

#define BE_MAX_LRO_DESCRIPTORS 16
#define BE_MAX_FRAGS_PER_FRAME 16
#define BE_MAX_FRAGS_PER_FRAME (min((u32) 16, (u32) MAX_SKB_FRAGS))

struct be_dma_mem {
void *va;
Expand Down
4 changes: 2 additions & 2 deletions trunk/drivers/net/benet/be_ethtool.c
Original file line number Diff line number Diff line change
Expand Up @@ -162,8 +162,8 @@ be_set_coalesce(struct net_device *netdev, struct ethtool_coalesce *coalesce)
return -EINVAL;

adapter->max_rx_coal = coalesce->rx_max_coalesced_frames;
if (adapter->max_rx_coal > MAX_SKB_FRAGS)
adapter->max_rx_coal = MAX_SKB_FRAGS - 1;
if (adapter->max_rx_coal > BE_MAX_FRAGS_PER_FRAME)
adapter->max_rx_coal = BE_MAX_FRAGS_PER_FRAME;

/* if AIC is being turned on now, start with an EQD of 0 */
if (rx_eq->enable_aic == 0 &&
Expand Down
45 changes: 32 additions & 13 deletions trunk/drivers/net/benet/be_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -666,7 +666,7 @@ static void skb_fill_rx_data(struct be_adapter *adapter,
{
struct be_queue_info *rxq = &adapter->rx_obj.q;
struct be_rx_page_info *page_info;
u16 rxq_idx, i, num_rcvd;
u16 rxq_idx, i, num_rcvd, j;
u32 pktsize, hdr_len, curr_frag_len;
u8 *start;

Expand Down Expand Up @@ -709,22 +709,33 @@ static void skb_fill_rx_data(struct be_adapter *adapter,

/* More frags present for this completion */
pktsize -= curr_frag_len; /* account for above copied frag */
for (i = 1; i < num_rcvd; i++) {
for (i = 1, j = 0; i < num_rcvd; i++) {
index_inc(&rxq_idx, rxq->len);
page_info = get_rx_page_info(adapter, rxq_idx);

curr_frag_len = min(pktsize, rx_frag_size);

skb_shinfo(skb)->frags[i].page = page_info->page;
skb_shinfo(skb)->frags[i].page_offset = page_info->page_offset;
skb_shinfo(skb)->frags[i].size = curr_frag_len;
/* Coalesce all frags from the same physical page in one slot */
if (page_info->page_offset == 0) {
/* Fresh page */
j++;
skb_shinfo(skb)->frags[j].page = page_info->page;
skb_shinfo(skb)->frags[j].page_offset =
page_info->page_offset;
skb_shinfo(skb)->frags[j].size = 0;
skb_shinfo(skb)->nr_frags++;
} else {
put_page(page_info->page);
}

skb_shinfo(skb)->frags[j].size += curr_frag_len;
skb->len += curr_frag_len;
skb->data_len += curr_frag_len;
skb_shinfo(skb)->nr_frags++;
pktsize -= curr_frag_len;

memset(page_info, 0, sizeof(*page_info));
}
BUG_ON(j > MAX_SKB_FRAGS);

done:
be_rx_stats_update(adapter, pktsize, num_rcvd);
Expand Down Expand Up @@ -786,28 +797,36 @@ static void be_rx_compl_process_lro(struct be_adapter *adapter,
struct skb_frag_struct rx_frags[BE_MAX_FRAGS_PER_FRAME];
struct be_queue_info *rxq = &adapter->rx_obj.q;
u32 num_rcvd, pkt_size, remaining, vlanf, curr_frag_len;
u16 i, rxq_idx = 0, vid;
u16 i, rxq_idx = 0, vid, j;

num_rcvd = AMAP_GET_BITS(struct amap_eth_rx_compl, numfrags, rxcp);
pkt_size = AMAP_GET_BITS(struct amap_eth_rx_compl, pktsize, rxcp);
vlanf = AMAP_GET_BITS(struct amap_eth_rx_compl, vtp, rxcp);
rxq_idx = AMAP_GET_BITS(struct amap_eth_rx_compl, fragndx, rxcp);

remaining = pkt_size;
for (i = 0; i < num_rcvd; i++) {
for (i = 0, j = -1; i < num_rcvd; i++) {
page_info = get_rx_page_info(adapter, rxq_idx);

curr_frag_len = min(remaining, rx_frag_size);

rx_frags[i].page = page_info->page;
rx_frags[i].page_offset = page_info->page_offset;
rx_frags[i].size = curr_frag_len;
remaining -= curr_frag_len;
/* Coalesce all frags from the same physical page in one slot */
if (i == 0 || page_info->page_offset == 0) {
/* First frag or Fresh page */
j++;
rx_frags[j].page = page_info->page;
rx_frags[j].page_offset = page_info->page_offset;
rx_frags[j].size = 0;
} else {
put_page(page_info->page);
}
rx_frags[j].size += curr_frag_len;

remaining -= curr_frag_len;
index_inc(&rxq_idx, rxq->len);

memset(page_info, 0, sizeof(*page_info));
}
BUG_ON(j > MAX_SKB_FRAGS);

if (likely(!vlanf)) {
lro_receive_frags(&adapter->rx_obj.lro_mgr, rx_frags, pkt_size,
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/net/cpmac.c
Original file line number Diff line number Diff line change
Expand Up @@ -1097,7 +1097,7 @@ static const struct net_device_ops cpmac_netdev_ops = {
.ndo_start_xmit = cpmac_start_xmit,
.ndo_tx_timeout = cpmac_tx_timeout,
.ndo_set_multicast_list = cpmac_set_multicast_list,
.ndo_so_ioctl = cpmac_ioctl,
.ndo_do_ioctl = cpmac_ioctl,
.ndo_set_config = cpmac_config,
.ndo_change_mtu = eth_change_mtu,
.ndo_validate_addr = eth_validate_addr,
Expand Down
8 changes: 4 additions & 4 deletions trunk/drivers/net/fsl_pq_mdio.c
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ static int fsl_pq_mdio_find_free(struct mii_bus *new_bus)
}


#ifdef CONFIG_GIANFAR
#if defined(CONFIG_GIANFAR) || defined(CONFIG_GIANFAR_MODULE)
static u32 __iomem *get_gfar_tbipa(struct fsl_pq_mdio __iomem *regs)
{
struct gfar __iomem *enet_regs;
Expand All @@ -206,7 +206,7 @@ static u32 __iomem *get_gfar_tbipa(struct fsl_pq_mdio __iomem *regs)
#endif


#ifdef CONFIG_UCC_GETH
#if defined(CONFIG_UCC_GETH) || defined(CONFIG_UCC_GETH_MODULE)
static int get_ucc_id_for_range(u64 start, u64 end, u32 *ucc_id)
{
struct device_node *np = NULL;
Expand Down Expand Up @@ -291,15 +291,15 @@ static int fsl_pq_mdio_probe(struct of_device *ofdev,
if (of_device_is_compatible(np, "fsl,gianfar-mdio") ||
of_device_is_compatible(np, "fsl,gianfar-tbi") ||
of_device_is_compatible(np, "gianfar")) {
#ifdef CONFIG_GIANFAR
#if defined(CONFIG_GIANFAR) || defined(CONFIG_GIANFAR_MODULE)
tbipa = get_gfar_tbipa(regs);
#else
err = -ENODEV;
goto err_free_irqs;
#endif
} else if (of_device_is_compatible(np, "fsl,ucc-mdio") ||
of_device_is_compatible(np, "ucc_geth_phy")) {
#ifdef CONFIG_UCC_GETH
#if defined(CONFIG_UCC_GETH) || defined(CONFIG_UCC_GETH_MODULE)
u32 id;
static u32 mii_mng_master;

Expand Down
4 changes: 4 additions & 0 deletions trunk/drivers/net/mdio.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@
#include <linux/mdio.h>
#include <linux/module.h>

MODULE_DESCRIPTION("Generic support for MDIO-compatible transceivers");
MODULE_AUTHOR("Copyright 2006-2009 Solarflare Communications Inc.");
MODULE_LICENSE("GPL");

/**
* mdio45_probe - probe for an MDIO (clause 45) device
* @mdio: MDIO interface
Expand Down
Loading

0 comments on commit 36a7347

Please sign in to comment.