Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 157227
b: refs/heads/master
c: 154f807
h: refs/heads/master
i:
  157225: 7ff3502
  157223: 41b8edb
v: v3
  • Loading branch information
Linus Torvalds committed Sep 5, 2009
1 parent 2d68415 commit 8218c83
Show file tree
Hide file tree
Showing 24 changed files with 179 additions and 73 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: ae0b7448e91353ea5f821601a055aca6b58042cd
refs/heads/master: 154f807e55977de75b1c12197c13ae14c28397b3
6 changes: 3 additions & 3 deletions trunk/arch/powerpc/kernel/power7-pmu.c
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,7 @@ static int power7_generic_events[] = {
*/
static int power7_cache_events[C(MAX)][C(OP_MAX)][C(RESULT_MAX)] = {
[C(L1D)] = { /* RESULT_ACCESS RESULT_MISS */
[C(OP_READ)] = { 0x400f0, 0xc880 },
[C(OP_READ)] = { 0xc880, 0x400f0 },
[C(OP_WRITE)] = { 0, 0x300f0 },
[C(OP_PREFETCH)] = { 0xd8b8, 0 },
},
Expand All @@ -327,8 +327,8 @@ static int power7_cache_events[C(MAX)][C(OP_MAX)][C(RESULT_MAX)] = {
[C(OP_PREFETCH)] = { 0x408a, 0 },
},
[C(LL)] = { /* RESULT_ACCESS RESULT_MISS */
[C(OP_READ)] = { 0x6080, 0x6084 },
[C(OP_WRITE)] = { 0x6082, 0x6086 },
[C(OP_READ)] = { 0x16080, 0x26080 },
[C(OP_WRITE)] = { 0x16082, 0x26082 },
[C(OP_PREFETCH)] = { 0, 0 },
},
[C(DTLB)] = { /* RESULT_ACCESS RESULT_MISS */
Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/sparc/kernel/irq_64.c
Original file line number Diff line number Diff line change
Expand Up @@ -886,7 +886,7 @@ void notrace init_irqwork_curcpu(void)
* Therefore you cannot make any OBP calls, not even prom_printf,
* from these two routines.
*/
static void __cpuinit register_one_mondo(unsigned long paddr, unsigned long type, unsigned long qmask)
static void __cpuinit notrace register_one_mondo(unsigned long paddr, unsigned long type, unsigned long qmask)
{
unsigned long num_entries = (qmask + 1) / 64;
unsigned long status;
Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/sparc/kernel/nmi.c
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ notrace __kprobes void perfctr_irq(int irq, struct pt_regs *regs)
}
if (!touched && __get_cpu_var(last_irq_sum) == sum) {
local_inc(&__get_cpu_var(alert_counter));
if (local_read(&__get_cpu_var(alert_counter)) == 5 * nmi_hz)
if (local_read(&__get_cpu_var(alert_counter)) == 30 * nmi_hz)
die_nmi("BUG: NMI Watchdog detected LOCKUP",
regs, panic_on_timeout);
} else {
Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/sparc/prom/misc_64.c
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ void prom_cmdline(void)
/* Drop into the prom, but completely terminate the program.
* No chance of continuing.
*/
void prom_halt(void)
void notrace prom_halt(void)
{
#ifdef CONFIG_SUN_LDOMS
if (ldom_domaining_enabled)
Expand Down
7 changes: 3 additions & 4 deletions trunk/arch/sparc/prom/printf.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,14 @@
*/

#include <linux/kernel.h>
#include <linux/compiler.h>

#include <asm/openprom.h>
#include <asm/oplib.h>

static char ppbuf[1024];

void
prom_write(const char *buf, unsigned int n)
void notrace prom_write(const char *buf, unsigned int n)
{
char ch;

Expand All @@ -33,8 +33,7 @@ prom_write(const char *buf, unsigned int n)
}
}

void
prom_printf(const char *fmt, ...)
void notrace prom_printf(const char *fmt, ...)
{
va_list args;
int i;
Expand Down
3 changes: 1 addition & 2 deletions trunk/drivers/char/n_tty.c
Original file line number Diff line number Diff line change
Expand Up @@ -300,8 +300,7 @@ static int do_output_char(unsigned char c, struct tty_struct *tty, int space)
if (space < 2)
return -1;
tty->canon_column = tty->column = 0;
tty_put_char(tty, '\r');
tty_put_char(tty, c);
tty->ops->write(tty, "\r\n", 2);
return 2;
}
tty->canon_column = tty->column;
Expand Down
10 changes: 1 addition & 9 deletions trunk/drivers/char/pty.c
Original file line number Diff line number Diff line change
Expand Up @@ -109,21 +109,13 @@ static int pty_space(struct tty_struct *to)
* the other side of the pty/tty pair.
*/

static int pty_write(struct tty_struct *tty, const unsigned char *buf,
int count)
static int pty_write(struct tty_struct *tty, const unsigned char *buf, int c)
{
struct tty_struct *to = tty->link;
int c;

if (tty->stopped)
return 0;

/* This isn't locked but our 8K is quite sloppy so no
big deal */

c = pty_space(to);
if (c > count)
c = count;
if (c > 0) {
/* Stuff the data into the input queue of the other end */
c = tty_insert_flip_string(to, buf, c);
Expand Down
35 changes: 35 additions & 0 deletions trunk/drivers/input/keyboard/atkbd.c
Original file line number Diff line number Diff line change
Expand Up @@ -879,6 +879,14 @@ static unsigned int atkbd_hp_zv6100_forced_release_keys[] = {
0xae, 0xb0, -1U
};

/*
* Perform fixup for HP (Compaq) Presario R4000 R4100 R4200 that don't generate
* release for their volume buttons
*/
static unsigned int atkbd_hp_r4000_forced_release_keys[] = {
0xae, 0xb0, -1U
};

/*
* Samsung NC10,NC20 with Fn+F? key release not working
*/
Expand Down Expand Up @@ -1536,6 +1544,33 @@ static struct dmi_system_id atkbd_dmi_quirk_table[] __initdata = {
.callback = atkbd_setup_forced_release,
.driver_data = atkbd_hp_zv6100_forced_release_keys,
},
{
.ident = "HP Presario R4000",
.matches = {
DMI_MATCH(DMI_SYS_VENDOR, "Hewlett-Packard"),
DMI_MATCH(DMI_PRODUCT_NAME, "Presario R4000"),
},
.callback = atkbd_setup_forced_release,
.driver_data = atkbd_hp_r4000_forced_release_keys,
},
{
.ident = "HP Presario R4100",
.matches = {
DMI_MATCH(DMI_SYS_VENDOR, "Hewlett-Packard"),
DMI_MATCH(DMI_PRODUCT_NAME, "Presario R4100"),
},
.callback = atkbd_setup_forced_release,
.driver_data = atkbd_hp_r4000_forced_release_keys,
},
{
.ident = "HP Presario R4200",
.matches = {
DMI_MATCH(DMI_SYS_VENDOR, "Hewlett-Packard"),
DMI_MATCH(DMI_PRODUCT_NAME, "Presario R4200"),
},
.callback = atkbd_setup_forced_release,
.driver_data = atkbd_hp_r4000_forced_release_keys,
},
{
.ident = "Inventec Symphony",
.matches = {
Expand Down
8 changes: 8 additions & 0 deletions trunk/drivers/input/serio/i8042-x86ia64io.h
Original file line number Diff line number Diff line change
Expand Up @@ -382,6 +382,14 @@ static struct dmi_system_id __initdata i8042_dmi_nomux_table[] = {
DMI_MATCH(DMI_PRODUCT_NAME, "Vostro1510"),
},
},
{
.ident = "Acer Aspire 5536",
.matches = {
DMI_MATCH(DMI_SYS_VENDOR, "Acer"),
DMI_MATCH(DMI_PRODUCT_NAME, "Aspire 5536"),
DMI_MATCH(DMI_PRODUCT_VERSION, "0100"),
},
},
{ }
};

Expand Down
23 changes: 23 additions & 0 deletions trunk/drivers/pci/iov.c
Original file line number Diff line number Diff line change
Expand Up @@ -597,6 +597,29 @@ int pci_iov_resource_bar(struct pci_dev *dev, int resno,
4 * (resno - PCI_IOV_RESOURCES);
}

/**
* pci_sriov_resource_alignment - get resource alignment for VF BAR
* @dev: the PCI device
* @resno: the resource number
*
* Returns the alignment of the VF BAR found in the SR-IOV capability.
* This is not the same as the resource size which is defined as
* the VF BAR size multiplied by the number of VFs. The alignment
* is just the VF BAR size.
*/
int pci_sriov_resource_alignment(struct pci_dev *dev, int resno)
{
struct resource tmp;
enum pci_bar_type type;
int reg = pci_iov_resource_bar(dev, resno, &type);

if (!reg)
return 0;

__pci_read_base(dev, type, &tmp, reg);
return resource_alignment(&tmp);
}

/**
* pci_restore_iov_state - restore the state of the IOV capability
* @dev: the PCI device
Expand Down
13 changes: 13 additions & 0 deletions trunk/drivers/pci/pci.h
Original file line number Diff line number Diff line change
Expand Up @@ -243,6 +243,7 @@ extern int pci_iov_init(struct pci_dev *dev);
extern void pci_iov_release(struct pci_dev *dev);
extern int pci_iov_resource_bar(struct pci_dev *dev, int resno,
enum pci_bar_type *type);
extern int pci_sriov_resource_alignment(struct pci_dev *dev, int resno);
extern void pci_restore_iov_state(struct pci_dev *dev);
extern int pci_iov_bus_range(struct pci_bus *bus);

Expand Down Expand Up @@ -298,4 +299,16 @@ static inline int pci_ats_enabled(struct pci_dev *dev)
}
#endif /* CONFIG_PCI_IOV */

static inline int pci_resource_alignment(struct pci_dev *dev,
struct resource *res)
{
#ifdef CONFIG_PCI_IOV
int resno = res - dev->resource;

if (resno >= PCI_IOV_RESOURCES && resno <= PCI_IOV_RESOURCE_END)
return pci_sriov_resource_alignment(dev, resno);
#endif
return resource_alignment(res);
}

#endif /* DRIVERS_PCI_H */
4 changes: 2 additions & 2 deletions trunk/drivers/pci/setup-bus.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
#include <linux/ioport.h>
#include <linux/cache.h>
#include <linux/slab.h>

#include "pci.h"

static void pbus_assign_resources_sorted(const struct pci_bus *bus)
{
Expand Down Expand Up @@ -384,7 +384,7 @@ static int pbus_size_mem(struct pci_bus *bus, unsigned long mask, unsigned long
continue;
r_size = resource_size(r);
/* For bridges size != alignment */
align = resource_alignment(r);
align = pci_resource_alignment(dev, r);
order = __ffs(align) - 20;
if (order > 11) {
dev_warn(&dev->dev, "BAR %d bad alignment %llx: "
Expand Down
8 changes: 4 additions & 4 deletions trunk/drivers/pci/setup-res.c
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ static int __pci_assign_resource(struct pci_bus *bus, struct pci_dev *dev,

size = resource_size(res);
min = (res->flags & IORESOURCE_IO) ? PCIBIOS_MIN_IO : PCIBIOS_MIN_MEM;
align = resource_alignment(res);
align = pci_resource_alignment(dev, res);

/* First, try exact prefetching match.. */
ret = pci_bus_alloc_resource(bus, res, size, align, min,
Expand Down Expand Up @@ -178,7 +178,7 @@ int pci_assign_resource(struct pci_dev *dev, int resno)
struct pci_bus *bus;
int ret;

align = resource_alignment(res);
align = pci_resource_alignment(dev, res);
if (!align) {
dev_info(&dev->dev, "BAR %d: can't allocate resource (bogus "
"alignment) %pR flags %#lx\n",
Expand Down Expand Up @@ -259,7 +259,7 @@ void pdev_sort_resources(struct pci_dev *dev, struct resource_list *head)
if (!(r->flags) || r->parent)
continue;

r_align = resource_alignment(r);
r_align = pci_resource_alignment(dev, r);
if (!r_align) {
dev_warn(&dev->dev, "BAR %d: bogus alignment "
"%pR flags %#lx\n",
Expand All @@ -271,7 +271,7 @@ void pdev_sort_resources(struct pci_dev *dev, struct resource_list *head)
struct resource_list *ln = list->next;

if (ln)
align = resource_alignment(ln->res);
align = pci_resource_alignment(ln->dev, ln->res);

if (r_align > align) {
tmp = kmalloc(sizeof(*tmp), GFP_KERNEL);
Expand Down
17 changes: 4 additions & 13 deletions trunk/fs/compat.c
Original file line number Diff line number Diff line change
Expand Up @@ -1485,20 +1485,15 @@ int compat_do_execve(char * filename,
if (!bprm)
goto out_files;

retval = -ERESTARTNOINTR;
if (mutex_lock_interruptible(&current->cred_guard_mutex))
retval = prepare_bprm_creds(bprm);
if (retval)
goto out_free;
current->in_execve = 1;

retval = -ENOMEM;
bprm->cred = prepare_exec_creds();
if (!bprm->cred)
goto out_unlock;

retval = check_unsafe_exec(bprm);
if (retval < 0)
goto out_unlock;
goto out_free;
clear_in_exec = retval;
current->in_execve = 1;

file = open_exec(filename);
retval = PTR_ERR(file);
Expand Down Expand Up @@ -1547,7 +1542,6 @@ int compat_do_execve(char * filename,
/* execve succeeded */
current->fs->in_exec = 0;
current->in_execve = 0;
mutex_unlock(&current->cred_guard_mutex);
acct_update_integrals(current);
free_bprm(bprm);
if (displaced)
Expand All @@ -1567,10 +1561,7 @@ int compat_do_execve(char * filename,
out_unmark:
if (clear_in_exec)
current->fs->in_exec = 0;

out_unlock:
current->in_execve = 0;
mutex_unlock(&current->cred_guard_mutex);

out_free:
free_bprm(bprm);
Expand Down
Loading

0 comments on commit 8218c83

Please sign in to comment.