Skip to content

Commit

Permalink
3.0.67
Browse files Browse the repository at this point in the history
  • Loading branch information
stratosk committed Feb 28, 2013
1 parent bc906f1 commit 5357a4a
Show file tree
Hide file tree
Showing 63 changed files with 572 additions and 240 deletions.
2 changes: 1 addition & 1 deletion Makefile
@@ -1,6 +1,6 @@
VERSION = 3
PATCHLEVEL = 0
SUBLEVEL = 66
SUBLEVEL = 67
EXTRAVERSION =
NAME = Sneaky Weasel

Expand Down
1 change: 1 addition & 0 deletions arch/arm/mach-pxa/include/mach/smemc.h
Expand Up @@ -37,6 +37,7 @@
#define CSADRCFG1 (SMEMC_VIRT + 0x84) /* Address Configuration Register for CS1 */
#define CSADRCFG2 (SMEMC_VIRT + 0x88) /* Address Configuration Register for CS2 */
#define CSADRCFG3 (SMEMC_VIRT + 0x8C) /* Address Configuration Register for CS3 */
#define CSMSADRCFG (SMEMC_VIRT + 0xA0) /* Chip Select Configuration Register */

/*
* More handy macros for PCMCIA
Expand Down
15 changes: 14 additions & 1 deletion arch/arm/mach-pxa/smemc.c
Expand Up @@ -40,6 +40,8 @@ static void pxa3xx_smemc_resume(void)
__raw_writel(csadrcfg[1], CSADRCFG1);
__raw_writel(csadrcfg[2], CSADRCFG2);
__raw_writel(csadrcfg[3], CSADRCFG3);
/* CSMSADRCFG wakes up in its default state (0), so we need to set it */
__raw_writel(0x2, CSMSADRCFG);
}

static struct syscore_ops smemc_syscore_ops = {
Expand All @@ -49,8 +51,19 @@ static struct syscore_ops smemc_syscore_ops = {

static int __init smemc_init(void)
{
if (cpu_is_pxa3xx())
if (cpu_is_pxa3xx()) {
/*
* The only documentation we have on the
* Chip Select Configuration Register (CSMSADRCFG) is that
* it must be programmed to 0x2.
* Moreover, in the bit definitions, the second bit
* (CSMSADRCFG[1]) is called "SETALWAYS".
* Other bits are reserved in this register.
*/
__raw_writel(0x2, CSMSADRCFG);

register_syscore_ops(&smemc_syscore_ops);
}

return 0;
}
Expand Down
13 changes: 10 additions & 3 deletions arch/parisc/include/asm/pgtable.h
Expand Up @@ -12,11 +12,10 @@

#include <linux/bitops.h>
#include <linux/spinlock.h>
#include <linux/mm_types.h>
#include <asm/processor.h>
#include <asm/cache.h>

struct vm_area_struct;

/*
* kern_addr_valid(ADDR) tests if ADDR is pointing to valid kernel
* memory. For the return value to be meaningful, ADDR must be >=
Expand All @@ -40,7 +39,14 @@ struct vm_area_struct;
do{ \
*(pteptr) = (pteval); \
} while(0)
#define set_pte_at(mm,addr,ptep,pteval) set_pte(ptep,pteval)

extern void purge_tlb_entries(struct mm_struct *, unsigned long);

#define set_pte_at(mm, addr, ptep, pteval) \
do { \
set_pte(ptep, pteval); \
purge_tlb_entries(mm, addr); \
} while (0)

#endif /* !__ASSEMBLY__ */

Expand Down Expand Up @@ -464,6 +470,7 @@ static inline void ptep_set_wrprotect(struct mm_struct *mm, unsigned long addr,
old = pte_val(*ptep);
new = pte_val(pte_wrprotect(__pte (old)));
} while (cmpxchg((unsigned long *) ptep, old, new) != old);
purge_tlb_entries(mm, addr);
#else
pte_t old_pte = *ptep;
set_pte_at(mm, addr, ptep, pte_wrprotect(old_pte));
Expand Down
18 changes: 18 additions & 0 deletions arch/parisc/kernel/cache.c
Expand Up @@ -421,6 +421,24 @@ void kunmap_parisc(void *addr)
EXPORT_SYMBOL(kunmap_parisc);
#endif

void purge_tlb_entries(struct mm_struct *mm, unsigned long addr)
{
unsigned long flags;

/* Note: purge_tlb_entries can be called at startup with
no context. */

/* Disable preemption while we play with %sr1. */
preempt_disable();
mtsp(mm->context, 1);
purge_tlb_start(flags);
pdtlb(addr);
pitlb(addr);
purge_tlb_end(flags);
preempt_enable();
}
EXPORT_SYMBOL(purge_tlb_entries);

void __flush_tlb_range(unsigned long sid, unsigned long start,
unsigned long end)
{
Expand Down
5 changes: 5 additions & 0 deletions arch/powerpc/kernel/machine_kexec_64.c
Expand Up @@ -163,6 +163,8 @@ static int kexec_all_irq_disabled = 0;
static void kexec_smp_down(void *arg)
{
local_irq_disable();
hard_irq_disable();

mb(); /* make sure our irqs are disabled before we say they are */
get_paca()->kexec_state = KEXEC_STATE_IRQS_OFF;
while(kexec_all_irq_disabled == 0)
Expand Down Expand Up @@ -245,6 +247,8 @@ static void kexec_prepare_cpus(void)
wake_offline_cpus();
smp_call_function(kexec_smp_down, NULL, /* wait */0);
local_irq_disable();
hard_irq_disable();

mb(); /* make sure IRQs are disabled before we say they are */
get_paca()->kexec_state = KEXEC_STATE_IRQS_OFF;

Expand Down Expand Up @@ -282,6 +286,7 @@ static void kexec_prepare_cpus(void)
if (ppc_md.kexec_cpu_down)
ppc_md.kexec_cpu_down(0, 0);
local_irq_disable();
hard_irq_disable();
}

#endif /* SMP */
Expand Down
8 changes: 8 additions & 0 deletions arch/s390/kvm/kvm-s390.c
Expand Up @@ -584,6 +584,14 @@ int kvm_s390_vcpu_store_status(struct kvm_vcpu *vcpu, unsigned long addr)
} else
prefix = 0;

/*
* The guest FPRS and ACRS are in the host FPRS/ACRS due to the lazy
* copying in vcpu load/put. Lets update our copies before we save
* it into the save area
*/
save_fp_regs(&vcpu->arch.guest_fpregs);
save_access_regs(vcpu->run->s.regs.acrs);

if (__guestcopy(vcpu, addr + offsetof(struct save_area, fp_regs),
vcpu->arch.guest_fpregs.fprs, 128, prefix))
return -EFAULT;
Expand Down
6 changes: 0 additions & 6 deletions arch/x86/include/asm/mmzone_32.h
Expand Up @@ -14,12 +14,6 @@ extern struct pglist_data *node_data[];

#include <asm/numaq.h>

extern void resume_map_numa_kva(pgd_t *pgd);

#else /* !CONFIG_NUMA */

static inline void resume_map_numa_kva(pgd_t *pgd) {}

#endif /* CONFIG_NUMA */

#ifdef CONFIG_DISCONTIGMEM
Expand Down
2 changes: 0 additions & 2 deletions arch/x86/power/hibernate_32.c
Expand Up @@ -130,8 +130,6 @@ static int resume_physical_mapping_init(pgd_t *pgd_base)
}
}

resume_map_numa_kva(pgd_base);

return 0;
}

Expand Down
1 change: 0 additions & 1 deletion arch/x86/xen/spinlock.c
Expand Up @@ -313,7 +313,6 @@ static noinline void xen_spin_unlock_slow(struct xen_spinlock *xl)
if (per_cpu(lock_spinners, cpu) == xl) {
ADD_STATS(released_slow_kicked, 1);
xen_send_IPI_one(cpu, XEN_SPIN_UNLOCK_VECTOR);
break;
}
}
}
Expand Down
4 changes: 2 additions & 2 deletions drivers/base/bus.c
Expand Up @@ -289,7 +289,7 @@ int bus_for_each_dev(struct bus_type *bus, struct device *start,
struct device *dev;
int error = 0;

if (!bus)
if (!bus || !bus->p)
return -EINVAL;

klist_iter_init_node(&bus->p->klist_devices, &i,
Expand Down Expand Up @@ -323,7 +323,7 @@ struct device *bus_find_device(struct bus_type *bus,
struct klist_iter i;
struct device *dev;

if (!bus)
if (!bus || !bus->p)
return NULL;

klist_iter_init_node(&bus->p->klist_devices, &i,
Expand Down
2 changes: 1 addition & 1 deletion drivers/block/sunvdc.c
Expand Up @@ -461,7 +461,7 @@ static int generic_request(struct vdc_port *port, u8 op, void *buf, int len)
int op_len, err;
void *req_buf;

if (!(((u64)1 << ((u64)op - 1)) & port->operations))
if (!(((u64)1 << (u64)op) & port->operations))
return -EOPNOTSUPP;

switch (op) {
Expand Down
5 changes: 5 additions & 0 deletions drivers/dca/dca-core.c
Expand Up @@ -409,6 +409,11 @@ void unregister_dca_provider(struct dca_provider *dca, struct device *dev)

spin_lock_irqsave(&dca_lock, flags);

if (list_empty(&dca_domains)) {
raw_spin_unlock_irqrestore(&dca_lock, flags);
return;
}

list_del(&dca->node);

pci_rc = dca_pci_rc_from_dev(dev);
Expand Down
2 changes: 1 addition & 1 deletion drivers/gpu/drm/drm_usb.c
Expand Up @@ -18,7 +18,7 @@ int drm_get_usb_dev(struct usb_interface *interface,

usbdev = interface_to_usbdev(interface);
dev->usbdev = usbdev;
dev->dev = &usbdev->dev;
dev->dev = &interface->dev;

mutex_lock(&drm_global_mutex);

Expand Down
8 changes: 8 additions & 0 deletions drivers/gpu/drm/i915/intel_display.c
Expand Up @@ -2898,6 +2898,7 @@ static void i9xx_crtc_disable(struct drm_crtc *crtc)
struct intel_crtc *intel_crtc = to_intel_crtc(crtc);
int pipe = intel_crtc->pipe;
int plane = intel_crtc->plane;
u32 pctl;

if (!intel_crtc->active)
return;
Expand All @@ -2914,6 +2915,13 @@ static void i9xx_crtc_disable(struct drm_crtc *crtc)

intel_disable_plane(dev_priv, plane, pipe);
intel_disable_pipe(dev_priv, pipe);

/* Disable pannel fitter if it is on this pipe. */
pctl = I915_READ(PFIT_CONTROL);
if ((pctl & PFIT_ENABLE) &&
((pctl & PFIT_PIPE_MASK) >> PFIT_PIPE_SHIFT) == pipe)
I915_WRITE(PFIT_CONTROL, 0);

intel_disable_pll(dev_priv, pipe);

intel_crtc->active = false;
Expand Down
2 changes: 1 addition & 1 deletion drivers/net/wireless/p54/p54usb.c
Expand Up @@ -83,8 +83,8 @@ static struct usb_device_id p54u_table[] = {
{USB_DEVICE(0x06b9, 0x0121)}, /* Thomson SpeedTouch 121g */
{USB_DEVICE(0x0707, 0xee13)}, /* SMC 2862W-G version 2 */
{USB_DEVICE(0x0803, 0x4310)}, /* Zoom 4410a */
{USB_DEVICE(0x083a, 0x4503)}, /* T-Com Sinus 154 data II */
{USB_DEVICE(0x083a, 0x4521)}, /* Siemens Gigaset USB Adapter 54 version 2 */
{USB_DEVICE(0x083a, 0x4531)}, /* T-Com Sinus 154 data II */
{USB_DEVICE(0x083a, 0xc501)}, /* Zoom Wireless-G 4410 */
{USB_DEVICE(0x083a, 0xf503)}, /* Accton FD7050E ver 1010ec */
{USB_DEVICE(0x0846, 0x4240)}, /* Netgear WG111 (v2) */
Expand Down
3 changes: 1 addition & 2 deletions drivers/net/xen-netback/interface.c
Expand Up @@ -132,6 +132,7 @@ static void xenvif_up(struct xenvif *vif)
static void xenvif_down(struct xenvif *vif)
{
disable_irq(vif->irq);
del_timer_sync(&vif->credit_timeout);
xen_netbk_deschedule_xenvif(vif);
xen_netbk_remove_xenvif(vif);
}
Expand Down Expand Up @@ -362,8 +363,6 @@ void xenvif_disconnect(struct xenvif *vif)
atomic_dec(&vif->refcnt);
wait_event(vif->waiting_to_free, atomic_read(&vif->refcnt) == 0);

del_timer_sync(&vif->credit_timeout);

if (vif->irq)
unbind_from_irqhandler(vif->irq, vif);

Expand Down
10 changes: 5 additions & 5 deletions drivers/net/xen-netback/netback.c
Expand Up @@ -870,21 +870,21 @@ static int netbk_count_requests(struct xenvif *vif,
if (frags >= work_to_do) {
netdev_err(vif->dev, "Need more frags\n");
netbk_fatal_tx_err(vif);
return -frags;
return -ENODATA;
}

if (unlikely(frags >= MAX_SKB_FRAGS)) {
netdev_err(vif->dev, "Too many frags\n");
netbk_fatal_tx_err(vif);
return -frags;
return -E2BIG;
}

memcpy(txp, RING_GET_REQUEST(&vif->tx, cons + frags),
sizeof(*txp));
if (txp->size > first->size) {
netdev_err(vif->dev, "Frag is bigger than frame.\n");
netbk_fatal_tx_err(vif);
return -frags;
return -EIO;
}

first->size -= txp->size;
Expand All @@ -894,7 +894,7 @@ static int netbk_count_requests(struct xenvif *vif,
netdev_err(vif->dev, "txp->offset: %x, size: %u\n",
txp->offset, txp->size);
netbk_fatal_tx_err(vif);
return -frags;
return -EINVAL;
}
} while ((txp++)->flags & XEN_NETTXF_more_data);
return frags;
Expand Down Expand Up @@ -990,7 +990,7 @@ static int xen_netbk_tx_check_gop(struct xen_netbk *netbk,
xen_netbk_idx_release(netbk, pending_idx, XEN_NETIF_RSP_ERROR);

/* Skip first skb fragment if it is on same page as header fragment. */
start = ((unsigned long)shinfo->frags[i].page == pending_idx);
start = ((unsigned long)shinfo->frags[0].page == pending_idx);

for (i = start; i < nr_frags; i++) {
int j, newerr;
Expand Down
1 change: 1 addition & 0 deletions drivers/pcmcia/vrc4171_card.c
Expand Up @@ -246,6 +246,7 @@ static int pccard_init(struct pcmcia_socket *sock)
socket = &vrc4171_sockets[slot];
socket->csc_irq = search_nonuse_irq();
socket->io_irq = search_nonuse_irq();
spin_lock_init(&socket->lock);

return 0;
}
Expand Down
38 changes: 30 additions & 8 deletions drivers/s390/kvm/kvm_virtio.c
Expand Up @@ -412,6 +412,26 @@ static void kvm_extint_handler(unsigned int ext_int_code,
}
}

/*
* For s390-virtio, we expect a page above main storage containing
* the virtio configuration. Try to actually load from this area
* in order to figure out if the host provides this page.
*/
static int __init test_devices_support(unsigned long addr)
{
int ret = -EIO;

asm volatile(
"0: lura 0,%1\n"
"1: xgr %0,%0\n"
"2:\n"
EX_TABLE(0b,2b)
EX_TABLE(1b,2b)
: "+d" (ret)
: "a" (addr)
: "0", "cc");
return ret;
}
/*
* Init function for virtio
* devices are in a single page above top of "normal" mem
Expand All @@ -423,21 +443,23 @@ static int __init kvm_devices_init(void)
if (!MACHINE_IS_KVM)
return -ENODEV;

if (test_devices_support(real_memory_size) < 0)
return -ENODEV;

rc = vmem_add_mapping(real_memory_size, PAGE_SIZE);
if (rc)
return rc;

kvm_devices = (void *) real_memory_size;

kvm_root = root_device_register("kvm_s390");
if (IS_ERR(kvm_root)) {
rc = PTR_ERR(kvm_root);
printk(KERN_ERR "Could not register kvm_s390 root device");
vmem_remove_mapping(real_memory_size, PAGE_SIZE);
return rc;
}

rc = vmem_add_mapping(real_memory_size, PAGE_SIZE);
if (rc) {
root_device_unregister(kvm_root);
return rc;
}

kvm_devices = (void *) real_memory_size;

INIT_WORK(&hotplug_work, hotplug_devices);

service_subclass_irq_register();
Expand Down
5 changes: 5 additions & 0 deletions drivers/staging/comedi/comedi_fops.c
Expand Up @@ -136,6 +136,11 @@ static long comedi_unlocked_ioctl(struct file *file, unsigned int cmd,
/* Device config is special, because it must work on
* an unconfigured device. */
if (cmd == COMEDI_DEVCONFIG) {
if (minor >= COMEDI_NUM_BOARD_MINORS) {
/* Device config not appropriate on non-board minors. */
rc = -ENOTTY;
goto done;
}
rc = do_devconfig_ioctl(dev,
(struct comedi_devconfig __user *)arg);
if (rc == 0)
Expand Down

0 comments on commit 5357a4a

Please sign in to comment.