Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 201048
b: refs/heads/master
c: 08be979
h: refs/heads/master
v: v3
  • Loading branch information
Thomas Gleixner committed Jul 15, 2010
1 parent 88c6ffc commit fae17eb
Show file tree
Hide file tree
Showing 45 changed files with 299 additions and 656 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: 46ac0cc92eedf92f7909e563ffcd2dbc4b914bc3
refs/heads/master: 08be97962bf338161325d4901642f956ce8c1adb
18 changes: 18 additions & 0 deletions trunk/arch/x86/kernel/early-quirks.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
#include <asm/apic.h>
#include <asm/iommu.h>
#include <asm/gart.h>
#include <asm/hpet.h>

static void __init fix_hypertransport_config(int num, int slot, int func)
{
Expand Down Expand Up @@ -191,6 +192,21 @@ static void __init ati_bugs_contd(int num, int slot, int func)
}
#endif

/*
* Force the read back of the CMP register in hpet_next_event()
* to work around the problem that the CMP register write seems to be
* delayed. See hpet_next_event() for details.
*
* We do this on all SMBUS incarnations for now until we have more
* information about the affected chipsets.
*/
static void __init ati_hpet_bugs(int num, int slot, int func)
{
#ifdef CONFIG_HPET_TIMER
hpet_readback_cmp = 1;
#endif
}

#define QFLAG_APPLY_ONCE 0x1
#define QFLAG_APPLIED 0x2
#define QFLAG_DONE (QFLAG_APPLY_ONCE|QFLAG_APPLIED)
Expand Down Expand Up @@ -220,6 +236,8 @@ static struct chipset early_qrk[] __initdata = {
PCI_CLASS_SERIAL_SMBUS, PCI_ANY_ID, 0, ati_bugs },
{ PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_SBX00_SMBUS,
PCI_CLASS_SERIAL_SMBUS, PCI_ANY_ID, 0, ati_bugs_contd },
{ PCI_VENDOR_ID_ATI, PCI_ANY_ID,
PCI_CLASS_SERIAL_SMBUS, PCI_ANY_ID, 0, ati_hpet_bugs },
{}
};

Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/x86/kernel/kprobes.c
Original file line number Diff line number Diff line change
Expand Up @@ -640,8 +640,8 @@ static int __kprobes kprobe_handler(struct pt_regs *regs)
/* Skip cs, ip, orig_ax and gs. */ \
" subl $16, %esp\n" \
" pushl %fs\n" \
" pushl %es\n" \
" pushl %ds\n" \
" pushl %es\n" \
" pushl %eax\n" \
" pushl %ebp\n" \
" pushl %edi\n" \
Expand Down
5 changes: 0 additions & 5 deletions trunk/arch/x86/kernel/quirks.c
Original file line number Diff line number Diff line change
Expand Up @@ -498,15 +498,10 @@ void force_hpet_resume(void)
* See erratum #27 (Misinterpreted MSI Requests May Result in
* Corrupted LPC DMA Data) in AMD Publication #46837,
* "SB700 Family Product Errata", Rev. 1.0, March 2010.
*
* Also force the read back of the CMP register in hpet_next_event()
* to work around the problem that the CMP register write seems to be
* delayed. See hpet_next_event() for details.
*/
static void force_disable_hpet_msi(struct pci_dev *unused)
{
hpet_msi_disable = 1;
hpet_readback_cmp = 1;
}

DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_SBX00_SMBUS,
Expand Down
1 change: 0 additions & 1 deletion trunk/arch/x86/pci/i386.c
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,6 @@ static void __init pcibios_allocate_resources(int pass)
idx, r, disabled, pass);
if (pci_claim_resource(dev, idx) < 0) {
/* We'll assign a new address later */
dev->fw_addr[idx] = r->start;
r->end -= r->start;
r->start = 0;
}
Expand Down
2 changes: 1 addition & 1 deletion trunk/crypto/ablkcipher.c
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ static inline int ablkcipher_next_slow(struct ablkcipher_request *req,

p = kmalloc(n, GFP_ATOMIC);
if (!p)
return ablkcipher_walk_done(req, walk, -ENOMEM);
ablkcipher_walk_done(req, walk, -ENOMEM);

base = p + 1;

Expand Down
1 change: 0 additions & 1 deletion trunk/drivers/gpu/drm/i915/i915_gem.c
Original file line number Diff line number Diff line change
Expand Up @@ -2241,7 +2241,6 @@ i915_gem_object_get_pages(struct drm_gem_object *obj,
page = read_cache_page_gfp(mapping, i,
GFP_HIGHUSER |
__GFP_COLD |
__GFP_RECLAIMABLE |
gfpmask);
if (IS_ERR(page))
goto err_pages;
Expand Down
1 change: 0 additions & 1 deletion trunk/drivers/input/mouse/synaptics.c
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,6 @@ static int synaptics_resolution(struct psmouse *psmouse)
unsigned char max[3];

if (SYN_ID_MAJOR(priv->identity) < 4)
return 0;

if (synaptics_send_cmd(psmouse, SYN_QUE_RESOLUTION, res) == 0) {
if (res[0] != 0 && (res[1] & 0x80) && res[2] != 0) {
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/input/touchscreen/w90p910_ts.c
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ static int __devinit w90x900ts_probe(struct platform_device *pdev)
w90p910_ts->state = TS_IDLE;
spin_lock_init(&w90p910_ts->lock);
setup_timer(&w90p910_ts->timer, w90p910_check_pen_up,
(unsigned long)w90p910_ts);
(unsigned long)&w90p910_ts);

res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
if (!res) {
Expand Down
32 changes: 0 additions & 32 deletions trunk/drivers/pci/setup-res.c
Original file line number Diff line number Diff line change
Expand Up @@ -156,38 +156,6 @@ static int __pci_assign_resource(struct pci_bus *bus, struct pci_dev *dev,
pcibios_align_resource, dev);
}

if (ret < 0 && dev->fw_addr[resno]) {
struct resource *root, *conflict;
resource_size_t start, end;

/*
* If we failed to assign anything, let's try the address
* where firmware left it. That at least has a chance of
* working, which is better than just leaving it disabled.
*/

if (res->flags & IORESOURCE_IO)
root = &ioport_resource;
else
root = &iomem_resource;

start = res->start;
end = res->end;
res->start = dev->fw_addr[resno];
res->end = res->start + size - 1;
dev_info(&dev->dev, "BAR %d: trying firmware assignment %pR\n",
resno, res);
conflict = request_resource_conflict(root, res);
if (conflict) {
dev_info(&dev->dev,
"BAR %d: %pR conflicts with %s %pR\n", resno,
res, conflict->name, conflict);
res->start = start;
res->end = end;
} else
ret = 0;
}

if (!ret) {
res->flags &= ~IORESOURCE_STARTALIGN;
dev_info(&dev->dev, "BAR %d: assigned %pR\n", resno, res);
Expand Down
12 changes: 4 additions & 8 deletions trunk/drivers/platform/x86/intel_scu_ipc.c
Original file line number Diff line number Diff line change
Expand Up @@ -489,7 +489,7 @@ int intel_scu_ipc_simple_command(int cmd, int sub)
mutex_unlock(&ipclock);
return -ENODEV;
}
ipc_command(sub << 12 | cmd);
ipc_command(cmd << 12 | sub);
err = busy_loop();
mutex_unlock(&ipclock);
return err;
Expand All @@ -501,9 +501,9 @@ EXPORT_SYMBOL(intel_scu_ipc_simple_command);
* @cmd: command
* @sub: sub type
* @in: input data
* @inlen: input length in dwords
* @inlen: input length
* @out: output data
* @outlein: output length in dwords
* @outlein: output length
*
* Issue a command to the SCU which involves data transfers. Do the
* data copies under the lock but leave it for the caller to interpret
Expand All @@ -524,7 +524,7 @@ int intel_scu_ipc_command(int cmd, int sub, u32 *in, int inlen,
for (i = 0; i < inlen; i++)
ipc_data_writel(*in++, 4 * i);

ipc_command((sub << 12) | cmd | (inlen << 18));
ipc_command((cmd << 12) | sub | (inlen << 18));
err = busy_loop();

for (i = 0; i < outlen; i++)
Expand Down Expand Up @@ -556,10 +556,6 @@ int intel_scu_ipc_i2c_cntrl(u32 addr, u32 *data)
u32 cmd = 0;

mutex_lock(&ipclock);
if (ipcdev.pdev == NULL) {
mutex_unlock(&ipclock);
return -ENODEV;
}
cmd = (addr >> 24) & 0xFF;
if (cmd == IPC_I2C_READ) {
writel(addr, ipcdev.i2c_base + IPC_I2C_CNTRL_ADDR);
Expand Down
4 changes: 1 addition & 3 deletions trunk/drivers/s390/block/dasd_devmap.c
Original file line number Diff line number Diff line change
Expand Up @@ -948,10 +948,8 @@ static ssize_t dasd_alias_show(struct device *dev,
if (device->discipline && device->discipline->get_uid &&
!device->discipline->get_uid(device, &uid)) {
if (uid.type == UA_BASE_PAV_ALIAS ||
uid.type == UA_HYPER_PAV_ALIAS) {
dasd_put_device(device);
uid.type == UA_HYPER_PAV_ALIAS)
return sprintf(buf, "1\n");
}
}
dasd_put_device(device);

Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/s390/cio/chsc.c
Original file line number Diff line number Diff line change
Expand Up @@ -713,7 +713,7 @@ int chsc_determine_base_channel_path_desc(struct chp_id chpid,
ret = chsc_determine_channel_path_desc(chpid, 0, 0, 0, 0, chsc_resp);
if (ret)
goto out_free;
memcpy(desc, &chsc_resp->data, sizeof(*desc));
memcpy(desc, &chsc_resp->data, chsc_resp->length);
out_free:
kfree(chsc_resp);
return ret;
Expand Down
1 change: 0 additions & 1 deletion trunk/fs/gfs2/bmap.c
Original file line number Diff line number Diff line change
Expand Up @@ -1041,7 +1041,6 @@ static int trunc_start(struct gfs2_inode *ip, u64 size)

if (gfs2_is_stuffed(ip)) {
u64 dsize = size + sizeof(struct gfs2_inode);
ip->i_disksize = size;
ip->i_inode.i_mtime = ip->i_inode.i_ctime = CURRENT_TIME;
gfs2_trans_add_bh(ip->i_gl, dibh, 1);
gfs2_dinode_out(ip, dibh->b_data);
Expand Down
2 changes: 1 addition & 1 deletion trunk/fs/gfs2/dir.c
Original file line number Diff line number Diff line change
Expand Up @@ -392,7 +392,7 @@ static int gfs2_dirent_find_space(const struct gfs2_dirent *dent,
unsigned totlen = be16_to_cpu(dent->de_rec_len);

if (gfs2_dirent_sentinel(dent))
actual = 0;
actual = GFS2_DIRENT_SIZE(0);
if (totlen - actual >= required)
return 1;
return 0;
Expand Down
10 changes: 0 additions & 10 deletions trunk/fs/gfs2/glock.c
Original file line number Diff line number Diff line change
Expand Up @@ -706,18 +706,8 @@ static void glock_work_func(struct work_struct *work)
{
unsigned long delay = 0;
struct gfs2_glock *gl = container_of(work, struct gfs2_glock, gl_work.work);
struct gfs2_holder *gh;
int drop_ref = 0;

if (unlikely(test_bit(GLF_FROZEN, &gl->gl_flags))) {
spin_lock(&gl->gl_spin);
gh = find_first_waiter(gl);
if (gh && (gh->gh_flags & LM_FLAG_NOEXP) &&
test_and_clear_bit(GLF_FROZEN, &gl->gl_flags))
set_bit(GLF_REPLY_PENDING, &gl->gl_flags);
spin_unlock(&gl->gl_spin);
}

if (test_and_clear_bit(GLF_REPLY_PENDING, &gl->gl_flags)) {
finish_xmote(gl, gl->gl_reply);
drop_ref = 1;
Expand Down
12 changes: 4 additions & 8 deletions trunk/fs/gfs2/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ struct inode *gfs2_inode_lookup(struct super_block *sb,
{
struct inode *inode;
struct gfs2_inode *ip;
struct gfs2_glock *io_gl = NULL;
struct gfs2_glock *io_gl;
int error;

inode = gfs2_iget(sb, no_addr);
Expand Down Expand Up @@ -198,7 +198,6 @@ struct inode *gfs2_inode_lookup(struct super_block *sb,
ip->i_iopen_gh.gh_gl->gl_object = ip;

gfs2_glock_put(io_gl);
io_gl = NULL;

if ((type == DT_UNKNOWN) && (no_formal_ino == 0))
goto gfs2_nfsbypass;
Expand Down Expand Up @@ -229,8 +228,7 @@ struct inode *gfs2_inode_lookup(struct super_block *sb,
fail_glock:
gfs2_glock_dq(&ip->i_iopen_gh);
fail_iopen:
if (io_gl)
gfs2_glock_put(io_gl);
gfs2_glock_put(io_gl);
fail_put:
if (inode->i_state & I_NEW)
ip->i_gl->gl_object = NULL;
Expand Down Expand Up @@ -258,7 +256,7 @@ void gfs2_process_unlinked_inode(struct super_block *sb, u64 no_addr)
{
struct gfs2_sbd *sdp;
struct gfs2_inode *ip;
struct gfs2_glock *io_gl = NULL;
struct gfs2_glock *io_gl;
int error;
struct gfs2_holder gh;
struct inode *inode;
Expand Down Expand Up @@ -295,7 +293,6 @@ void gfs2_process_unlinked_inode(struct super_block *sb, u64 no_addr)

ip->i_iopen_gh.gh_gl->gl_object = ip;
gfs2_glock_put(io_gl);
io_gl = NULL;

inode->i_mode = DT2IF(DT_UNKNOWN);

Expand All @@ -322,8 +319,7 @@ void gfs2_process_unlinked_inode(struct super_block *sb, u64 no_addr)
fail_glock:
gfs2_glock_dq(&ip->i_iopen_gh);
fail_iopen:
if (io_gl)
gfs2_glock_put(io_gl);
gfs2_glock_put(io_gl);
fail_put:
ip->i_gl->gl_object = NULL;
gfs2_glock_put(ip->i_gl);
Expand Down
8 changes: 5 additions & 3 deletions trunk/fs/gfs2/quota.c
Original file line number Diff line number Diff line change
Expand Up @@ -694,8 +694,10 @@ static int gfs2_adjust_quota(struct gfs2_inode *ip, loff_t loc,
if (!buffer_mapped(bh))
goto unlock_out;
/* If it's a newly allocated disk block for quota, zero it */
if (buffer_new(bh))
zero_user(page, pos - blocksize, bh->b_size);
if (buffer_new(bh)) {
memset(bh->b_data, 0, bh->b_size);
set_buffer_uptodate(bh);
}
}

if (PageUptodate(page))
Expand All @@ -721,7 +723,7 @@ static int gfs2_adjust_quota(struct gfs2_inode *ip, loff_t loc,

/* If quota straddles page boundary, we need to update the rest of the
* quota at the beginning of the next page */
if ((offset + sizeof(struct gfs2_quota)) > PAGE_CACHE_SIZE) {
if (offset != 0) { /* first page, offset is closer to PAGE_CACHE_SIZE */
ptr = ptr + nbytes;
nbytes = sizeof(struct gfs2_quota) - nbytes;
offset = 0;
Expand Down
15 changes: 8 additions & 7 deletions trunk/fs/jbd2/journal.c
Original file line number Diff line number Diff line change
Expand Up @@ -297,6 +297,7 @@ int jbd2_journal_write_metadata_buffer(transaction_t *transaction,
struct page *new_page;
unsigned int new_offset;
struct buffer_head *bh_in = jh2bh(jh_in);
struct jbd2_buffer_trigger_type *triggers;
journal_t *journal = transaction->t_journal;

/*
Expand Down Expand Up @@ -327,21 +328,21 @@ int jbd2_journal_write_metadata_buffer(transaction_t *transaction,
done_copy_out = 1;
new_page = virt_to_page(jh_in->b_frozen_data);
new_offset = offset_in_page(jh_in->b_frozen_data);
triggers = jh_in->b_frozen_triggers;
} else {
new_page = jh2bh(jh_in)->b_page;
new_offset = offset_in_page(jh2bh(jh_in)->b_data);
triggers = jh_in->b_triggers;
}

mapped_data = kmap_atomic(new_page, KM_USER0);
/*
* Fire data frozen trigger if data already wasn't frozen. Do this
* before checking for escaping, as the trigger may modify the magic
* offset. If a copy-out happens afterwards, it will have the correct
* data in the buffer.
* Fire any commit trigger. Do this before checking for escaping,
* as the trigger may modify the magic offset. If a copy-out
* happens afterwards, it will have the correct data in the buffer.
*/
if (!done_copy_out)
jbd2_buffer_frozen_trigger(jh_in, mapped_data + new_offset,
jh_in->b_triggers);
jbd2_buffer_commit_trigger(jh_in, mapped_data + new_offset,
triggers);

/*
* Check for escaping
Expand Down
9 changes: 3 additions & 6 deletions trunk/fs/jbd2/transaction.c
Original file line number Diff line number Diff line change
Expand Up @@ -725,9 +725,6 @@ do_get_write_access(handle_t *handle, struct journal_head *jh,
page = jh2bh(jh)->b_page;
offset = ((unsigned long) jh2bh(jh)->b_data) & ~PAGE_MASK;
source = kmap_atomic(page, KM_USER0);
/* Fire data frozen trigger just before we copy the data */
jbd2_buffer_frozen_trigger(jh, source + offset,
jh->b_triggers);
memcpy(jh->b_frozen_data, source+offset, jh2bh(jh)->b_size);
kunmap_atomic(source, KM_USER0);

Expand Down Expand Up @@ -966,15 +963,15 @@ void jbd2_journal_set_triggers(struct buffer_head *bh,
jh->b_triggers = type;
}

void jbd2_buffer_frozen_trigger(struct journal_head *jh, void *mapped_data,
void jbd2_buffer_commit_trigger(struct journal_head *jh, void *mapped_data,
struct jbd2_buffer_trigger_type *triggers)
{
struct buffer_head *bh = jh2bh(jh);

if (!triggers || !triggers->t_frozen)
if (!triggers || !triggers->t_commit)
return;

triggers->t_frozen(triggers, bh, mapped_data, bh->b_size);
triggers->t_commit(triggers, bh, mapped_data, bh->b_size);
}

void jbd2_buffer_abort_trigger(struct journal_head *jh,
Expand Down
Loading

0 comments on commit fae17eb

Please sign in to comment.