Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 65151
b: refs/heads/master
c: e4b42be
h: refs/heads/master
i:
  65149: ff28286
  65147: e39c860
  65143: 8d8fd4e
  65135: 2c57177
  65119: e95fb7e
  65087: 7b347bd
  65023: d28d8c3
v: v3
  • Loading branch information
Linus Torvalds committed Sep 26, 2007
1 parent f1d1f1d commit 3036583
Show file tree
Hide file tree
Showing 9 changed files with 48 additions and 34 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: 2aee6198652b32e5eaef29a8f8330a9dd15b8efd
refs/heads/master: e4b42be77ecc663550b515fcb7761b01fac0f272
7 changes: 7 additions & 0 deletions trunk/arch/powerpc/kernel/process.c
Original file line number Diff line number Diff line change
Expand Up @@ -605,6 +605,13 @@ void start_thread(struct pt_regs *regs, unsigned long start, unsigned long sp)
regs->ccr = 0;
regs->gpr[1] = sp;

/*
* We have just cleared all the nonvolatile GPRs, so make
* FULL_REGS(regs) return true. This is necessary to allow
* ptrace to examine the thread immediately after exec.
*/
regs->trap &= ~1UL;

#ifdef CONFIG_PPC32
regs->mq = 0;
regs->nip = start;
Expand Down
26 changes: 8 additions & 18 deletions trunk/drivers/char/mspec.c
Original file line number Diff line number Diff line change
Expand Up @@ -155,23 +155,22 @@ mspec_open(struct vm_area_struct *vma)
* mspec_close
*
* Called when unmapping a device mapping. Frees all mspec pages
* belonging to the vma.
* belonging to all the vma's sharing this vma_data structure.
*/
static void
mspec_close(struct vm_area_struct *vma)
{
struct vma_data *vdata;
int index, last_index, result;
int index, last_index;
unsigned long my_page;

vdata = vma->vm_private_data;

BUG_ON(vma->vm_start < vdata->vm_start || vma->vm_end > vdata->vm_end);
if (!atomic_dec_and_test(&vdata->refcnt))
return;

spin_lock(&vdata->lock);
index = (vma->vm_start - vdata->vm_start) >> PAGE_SHIFT;
last_index = (vma->vm_end - vdata->vm_start) >> PAGE_SHIFT;
for (; index < last_index; index++) {
last_index = (vdata->vm_end - vdata->vm_start) >> PAGE_SHIFT;
for (index = 0; index < last_index; index++) {
if (vdata->maddr[index] == 0)
continue;
/*
Expand All @@ -180,28 +179,19 @@ mspec_close(struct vm_area_struct *vma)
*/
my_page = vdata->maddr[index];
vdata->maddr[index] = 0;
spin_unlock(&vdata->lock);
result = mspec_zero_block(my_page, PAGE_SIZE);
if (!result)
if (!mspec_zero_block(my_page, PAGE_SIZE))
uncached_free_page(my_page);
else
printk(KERN_WARNING "mspec_close(): "
"failed to zero page %i\n",
result);
spin_lock(&vdata->lock);
"failed to zero page %ld\n", my_page);
}
spin_unlock(&vdata->lock);

if (!atomic_dec_and_test(&vdata->refcnt))
return;

if (vdata->flags & VMD_VMALLOCED)
vfree(vdata);
else
kfree(vdata);
}


/*
* mspec_nopfn
*
Expand Down
6 changes: 4 additions & 2 deletions trunk/drivers/input/mouse/appletouch.c
Original file line number Diff line number Diff line change
Expand Up @@ -328,6 +328,7 @@ static void atp_complete(struct urb* urb)
{
int x, y, x_z, y_z, x_f, y_f;
int retval, i, j;
int key;
struct atp *dev = urb->context;

switch (urb->status) {
Expand Down Expand Up @@ -468,6 +469,7 @@ static void atp_complete(struct urb* urb)
ATP_XFACT, &x_z, &x_f);
y = atp_calculate_abs(dev->xy_acc + ATP_XSENSORS, ATP_YSENSORS,
ATP_YFACT, &y_z, &y_f);
key = dev->data[dev->datalen - 1] & 1;

if (x && y) {
if (dev->x_old != -1) {
Expand Down Expand Up @@ -505,7 +507,7 @@ static void atp_complete(struct urb* urb)
the first touch unless reinitialised. Do so if it's been
idle for a while in order to avoid waking the kernel up
several hundred times a second */
if (atp_is_geyser_3(dev)) {
if (!key && atp_is_geyser_3(dev)) {
dev->idlecount++;
if (dev->idlecount == 10) {
dev->valid = 0;
Expand All @@ -514,7 +516,7 @@ static void atp_complete(struct urb* urb)
}
}

input_report_key(dev->input, BTN_LEFT, dev->data[dev->datalen - 1] & 1);
input_report_key(dev->input, BTN_LEFT, key);
input_sync(dev->input);

exit:
Expand Down
6 changes: 3 additions & 3 deletions trunk/drivers/lguest/lguest_asm.S
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,9 @@
jmp lguest_init

/*G:055 We create a macro which puts the assembler code between lgstart_ and
* lgend_ markers. These templates end up in the .init.text section, so they
* are discarded after boot. */
* lgend_ markers. These templates are put in the .text section: they can't be
* discarded after boot as we may need to patch modules, too. */
.text
#define LGUEST_PATCH(name, insns...) \
lgstart_##name: insns; lgend_##name:; \
.globl lgstart_##name; .globl lgend_##name
Expand All @@ -34,7 +35,6 @@ LGUEST_PATCH(popf, movl %eax, lguest_data+LGUEST_DATA_irq_enabled)
LGUEST_PATCH(pushf, movl lguest_data+LGUEST_DATA_irq_enabled, %eax)
/*:*/

.text
/* These demark the EIP range where host should never deliver interrupts. */
.global lguest_noirq_start
.global lguest_noirq_end
Expand Down
28 changes: 22 additions & 6 deletions trunk/drivers/scsi/scsi_transport_spi.c
Original file line number Diff line number Diff line change
Expand Up @@ -787,20 +787,26 @@ spi_dv_device_internal(struct scsi_device *sdev, u8 *buffer)
struct scsi_target *starget = sdev->sdev_target;
struct Scsi_Host *shost = sdev->host;
int len = sdev->inquiry_len;
int min_period = spi_min_period(starget);
int max_width = spi_max_width(starget);
/* first set us up for narrow async */
DV_SET(offset, 0);
DV_SET(width, 0);

if (spi_dv_device_compare_inquiry(sdev, buffer, buffer, DV_LOOPS)
!= SPI_COMPARE_SUCCESS) {
starget_printk(KERN_ERR, starget, "Domain Validation Initial Inquiry Failed\n");
/* FIXME: should probably offline the device here? */
return;
}

if (!scsi_device_wide(sdev)) {
spi_max_width(starget) = 0;
max_width = 0;
}

/* test width */
if (i->f->set_width && spi_max_width(starget) &&
scsi_device_wide(sdev)) {
if (i->f->set_width && max_width) {
i->f->set_width(starget, 1);

if (spi_dv_device_compare_inquiry(sdev, buffer,
Expand All @@ -809,6 +815,11 @@ spi_dv_device_internal(struct scsi_device *sdev, u8 *buffer)
!= SPI_COMPARE_SUCCESS) {
starget_printk(KERN_ERR, starget, "Wide Transfers Fail\n");
i->f->set_width(starget, 0);
/* Make sure we don't force wide back on by asking
* for a transfer period that requires it */
max_width = 0;
if (min_period < 10)
min_period = 10;
}
}

Expand All @@ -828,7 +839,8 @@ spi_dv_device_internal(struct scsi_device *sdev, u8 *buffer)

/* now set up to the maximum */
DV_SET(offset, spi_max_offset(starget));
DV_SET(period, spi_min_period(starget));
DV_SET(period, min_period);

/* try QAS requests; this should be harmless to set if the
* target supports it */
if (scsi_device_qas(sdev)) {
Expand All @@ -837,14 +849,14 @@ spi_dv_device_internal(struct scsi_device *sdev, u8 *buffer)
DV_SET(qas, 0);
}

if (scsi_device_ius(sdev) && spi_min_period(starget) < 9) {
if (scsi_device_ius(sdev) && min_period < 9) {
/* This u320 (or u640). Set IU transfers */
DV_SET(iu, 1);
/* Then set the optional parameters */
DV_SET(rd_strm, 1);
DV_SET(wr_flow, 1);
DV_SET(rti, 1);
if (spi_min_period(starget) == 8)
if (min_period == 8)
DV_SET(pcomp_en, 1);
} else {
DV_SET(iu, 0);
Expand All @@ -862,6 +874,10 @@ spi_dv_device_internal(struct scsi_device *sdev, u8 *buffer)
} else {
DV_SET(dt, 1);
}
/* set width last because it will pull all the other
* parameters down to required values */
DV_SET(width, max_width);

/* Do the read only INQUIRY tests */
spi_dv_retrain(sdev, buffer, buffer + sdev->inquiry_len,
spi_dv_device_compare_inquiry);
Expand Down
1 change: 1 addition & 0 deletions trunk/drivers/w1/w1.c
Original file line number Diff line number Diff line change
Expand Up @@ -431,6 +431,7 @@ static int w1_uevent(struct device *dev, char **envp, int num_envp,
err = add_uevent_var(envp, num_envp, &cur_index, buffer, buffer_size,
&cur_len, "W1_SLAVE_ID=%024LX",
(unsigned long long)sl->reg_num.id);
envp[cur_index] = NULL;
if (err)
return err;

Expand Down
4 changes: 1 addition & 3 deletions trunk/fs/ufs/super.c
Original file line number Diff line number Diff line change
Expand Up @@ -894,7 +894,7 @@ static int ufs_fill_super(struct super_block *sb, void *data, int silent)
goto again;
}


sbi->s_flags = flags;/*after that line some functions use s_flags*/
ufs_print_super_stuff(sb, usb1, usb2, usb3);

/*
Expand Down Expand Up @@ -1025,8 +1025,6 @@ static int ufs_fill_super(struct super_block *sb, void *data, int silent)
UFS_MOUNT_UFSTYPE_44BSD)
uspi->s_maxsymlinklen =
fs32_to_cpu(sb, usb3->fs_un2.fs_44.fs_maxsymlinklen);

sbi->s_flags = flags;

inode = iget(sb, UFS_ROOTINO);
if (!inode || is_bad_inode(inode))
Expand Down
2 changes: 1 addition & 1 deletion trunk/lib/Kconfig.debug
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,7 @@ config LOCKDEP
select KALLSYMS_ALL

config LOCK_STAT
bool "Lock usage statisitics"
bool "Lock usage statistics"
depends on DEBUG_KERNEL && TRACE_IRQFLAGS_SUPPORT && STACKTRACE_SUPPORT && LOCKDEP_SUPPORT
select LOCKDEP
select DEBUG_SPINLOCK
Expand Down

0 comments on commit 3036583

Please sign in to comment.