Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 73140
b: refs/heads/master
c: b285e0b
h: refs/heads/master
v: v3
  • Loading branch information
Linus Torvalds committed Nov 5, 2007
1 parent c2bd356 commit 5c8ae1e
Show file tree
Hide file tree
Showing 31 changed files with 322 additions and 105 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: 69ee0b3522428a07ff1765446d631ecc7da6ae0f
refs/heads/master: b285e0b78464f9a15a5095ac1dd5458ee7938714
6 changes: 4 additions & 2 deletions trunk/MAINTAINERS
Original file line number Diff line number Diff line change
Expand Up @@ -2549,7 +2549,7 @@ S: Supported

MISCELLANEOUS MCA-SUPPORT
P: James Bottomley
M: jejb@steeleye.com
M: James.Bottomley@HansenPartnership.com
L: linux-kernel@vger.kernel.org
S: Maintained

Expand Down Expand Up @@ -3301,9 +3301,11 @@ S: Maintained

SCSI SUBSYSTEM
P: James E.J. Bottomley
M: James.Bottomley@SteelEye.com
M: James.Bottomley@HansenPartnership.com
L: linux-scsi@vger.kernel.org
T: git kernel.org:/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6.git
T: git kernel.org:/pub/scm/linux/kernel/git/jejb/scsi-rc-fixes-2.6.git
T: git kernel.org:/pub/scm/linux/kernel/git/jejb/scsi-pending-2.6.git
S: Maintained

SCSI TAPE DRIVER
Expand Down
4 changes: 3 additions & 1 deletion trunk/arch/s390/kernel/early.c
Original file line number Diff line number Diff line change
Expand Up @@ -200,11 +200,13 @@ static noinline __init void find_memory_chunks(unsigned long memsize)
cc = __tprot(addr);
while (cc == old_cc) {
addr += CHUNK_INCR;
cc = __tprot(addr);
if (addr >= memsize)
break;
#ifndef CONFIG_64BIT
if (addr == ADDR2G)
break;
#endif
cc = __tprot(addr);
}

if (old_addr != addr &&
Expand Down
8 changes: 6 additions & 2 deletions trunk/arch/s390/kernel/process.c
Original file line number Diff line number Diff line change
Expand Up @@ -92,14 +92,15 @@ EXPORT_SYMBOL(unregister_idle_notifier);

void do_monitor_call(struct pt_regs *regs, long interruption_code)
{
#ifdef CONFIG_SMP
struct s390_idle_data *idle;

idle = &__get_cpu_var(s390_idle);
spin_lock(&idle->lock);
idle->idle_time += get_clock() - idle->idle_enter;
idle->in_idle = 0;
spin_unlock(&idle->lock);

#endif
/* disable monitor call class 0 */
__ctl_clear_bit(8, 15);

Expand All @@ -114,7 +115,9 @@ extern void s390_handle_mcck(void);
static void default_idle(void)
{
int cpu, rc;
#ifdef CONFIG_SMP
struct s390_idle_data *idle;
#endif

/* CPU is going idle. */
cpu = smp_processor_id();
Expand Down Expand Up @@ -151,13 +154,14 @@ static void default_idle(void)
s390_handle_mcck();
return;
}

#ifdef CONFIG_SMP
idle = &__get_cpu_var(s390_idle);
spin_lock(&idle->lock);
idle->idle_count++;
idle->in_idle = 1;
idle->idle_enter = get_clock();
spin_unlock(&idle->lock);
#endif
trace_hardirqs_on();
/* Wait for external, I/O or machine check interrupt. */
__load_psw_mask(psw_kernel_bits | PSW_MASK_WAIT |
Expand Down
6 changes: 3 additions & 3 deletions trunk/arch/s390/kernel/smp.c
Original file line number Diff line number Diff line change
Expand Up @@ -788,14 +788,14 @@ static ssize_t show_idle_time(struct sys_device *dev, char *buf)
}
new_time = idle->idle_time;
spin_unlock_irq(&idle->lock);
return sprintf(buf, "%llu us\n", new_time >> 12);
return sprintf(buf, "%llu\n", new_time >> 12);
}
static SYSDEV_ATTR(idle_time, 0444, show_idle_time, NULL);
static SYSDEV_ATTR(idle_time_us, 0444, show_idle_time, NULL);

static struct attribute *cpu_attrs[] = {
&attr_capability.attr,
&attr_idle_count.attr,
&attr_idle_time.attr,
&attr_idle_time_us.attr,
NULL,
};

Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/s390/kernel/time.c
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,7 @@ static cycle_t read_tod_clock(void)

static struct clocksource clocksource_tod = {
.name = "tod",
.rating = 100,
.rating = 400,
.read = read_tod_clock,
.mask = -1ULL,
.mult = 1000,
Expand Down
8 changes: 5 additions & 3 deletions trunk/arch/x86/boot/pmjump.S
Original file line number Diff line number Diff line change
Expand Up @@ -28,17 +28,19 @@
* void protected_mode_jump(u32 entrypoint, u32 bootparams);
*/
protected_mode_jump:
xorl %ebx, %ebx # Flag to indicate this is a boot
movl %edx, %esi # Pointer to boot_params table
movl %eax, 2f # Patch ljmpl instruction
jmp 1f # Short jump to flush instruction q.

1:
movw $__BOOT_DS, %cx
xorl %ebx, %ebx # Per the 32-bit boot protocol
xorl %ebp, %ebp # Per the 32-bit boot protocol
xorl %edi, %edi # Per the 32-bit boot protocol

movl %cr0, %edx
orb $1, %dl # Protected mode (PE) bit
movl %edx, %cr0
jmp 1f # Short jump to serialize on 386/486
1:

movw %cx, %ds
movw %cx, %es
Expand Down
69 changes: 34 additions & 35 deletions trunk/arch/x86/lguest/boot.c
Original file line number Diff line number Diff line change
Expand Up @@ -93,38 +93,7 @@ struct lguest_data lguest_data = {
};
static cycle_t clock_base;

/*G:035 Notice the lazy_hcall() above, rather than hcall(). This is our first
* real optimization trick!
*
* When lazy_mode is set, it means we're allowed to defer all hypercalls and do
* them as a batch when lazy_mode is eventually turned off. Because hypercalls
* are reasonably expensive, batching them up makes sense. For example, a
* large munmap might update dozens of page table entries: that code calls
* paravirt_enter_lazy_mmu(), does the dozen updates, then calls
* lguest_leave_lazy_mode().
*
* So, when we're in lazy mode, we call async_hypercall() to store the call for
* future processing. When lazy mode is turned off we issue a hypercall to
* flush the stored calls.
*/
static void lguest_leave_lazy_mode(void)
{
paravirt_leave_lazy(paravirt_get_lazy_mode());
hcall(LHCALL_FLUSH_ASYNC, 0, 0, 0);
}

static void lazy_hcall(unsigned long call,
unsigned long arg1,
unsigned long arg2,
unsigned long arg3)
{
if (paravirt_get_lazy_mode() == PARAVIRT_LAZY_NONE)
hcall(call, arg1, arg2, arg3);
else
async_hcall(call, arg1, arg2, arg3);
}

/* async_hcall() is pretty simple: I'm quite proud of it really. We have a
/*G:037 async_hcall() is pretty simple: I'm quite proud of it really. We have a
* ring buffer of stored hypercalls which the Host will run though next time we
* do a normal hypercall. Each entry in the ring has 4 slots for the hypercall
* arguments, and a "hcall_status" word which is 0 if the call is ready to go,
Expand All @@ -134,8 +103,8 @@ static void lazy_hcall(unsigned long call,
* full and we just make the hypercall directly. This has the nice side
* effect of causing the Host to run all the stored calls in the ring buffer
* which empties it for next time! */
void async_hcall(unsigned long call,
unsigned long arg1, unsigned long arg2, unsigned long arg3)
static void async_hcall(unsigned long call, unsigned long arg1,
unsigned long arg2, unsigned long arg3)
{
/* Note: This code assumes we're uniprocessor. */
static unsigned int next_call;
Expand All @@ -161,7 +130,37 @@ void async_hcall(unsigned long call,
}
local_irq_restore(flags);
}
/*:*/

/*G:035 Notice the lazy_hcall() above, rather than hcall(). This is our first
* real optimization trick!
*
* When lazy_mode is set, it means we're allowed to defer all hypercalls and do
* them as a batch when lazy_mode is eventually turned off. Because hypercalls
* are reasonably expensive, batching them up makes sense. For example, a
* large munmap might update dozens of page table entries: that code calls
* paravirt_enter_lazy_mmu(), does the dozen updates, then calls
* lguest_leave_lazy_mode().
*
* So, when we're in lazy mode, we call async_hcall() to store the call for
* future processing. */
static void lazy_hcall(unsigned long call,
unsigned long arg1,
unsigned long arg2,
unsigned long arg3)
{
if (paravirt_get_lazy_mode() == PARAVIRT_LAZY_NONE)
hcall(call, arg1, arg2, arg3);
else
async_hcall(call, arg1, arg2, arg3);
}

/* When lazy mode is turned off reset the per-cpu lazy mode variable and then
* issue a hypercall to flush any stored calls. */
static void lguest_leave_lazy_mode(void)
{
paravirt_leave_lazy(paravirt_get_lazy_mode());
hcall(LHCALL_FLUSH_ASYNC, 0, 0, 0);
}

/*G:033
* After that diversion we return to our first native-instruction
Expand Down
8 changes: 5 additions & 3 deletions trunk/drivers/ata/libata-scsi.c
Original file line number Diff line number Diff line change
Expand Up @@ -841,6 +841,9 @@ static void ata_scsi_dev_config(struct scsi_device *sdev,
blk_queue_max_hw_segments(q, q->max_hw_segments - 1);
}

if (dev->flags & ATA_DFLAG_AN)
set_bit(SDEV_EVT_MEDIA_CHANGE, sdev->supported_events);

if (dev->flags & ATA_DFLAG_NCQ) {
int depth;

Expand Down Expand Up @@ -3296,10 +3299,9 @@ static void ata_scsi_handle_link_detach(struct ata_link *link)
*/
void ata_scsi_media_change_notify(struct ata_device *dev)
{
#ifdef OTHER_AN_PATCHES_HAVE_BEEN_APPLIED
if (dev->sdev)
scsi_device_event_notify(dev->sdev, SDEV_MEDIA_CHANGE);
#endif
sdev_evt_send_simple(dev->sdev, SDEV_EVT_MEDIA_CHANGE,
GFP_ATOMIC);
}

/**
Expand Down
5 changes: 3 additions & 2 deletions trunk/drivers/char/drm/radeon_cp.c
Original file line number Diff line number Diff line change
Expand Up @@ -1679,7 +1679,7 @@ static int radeon_do_init_cp(struct drm_device * dev, drm_radeon_init_t * init)
dev_priv->gart_info.bus_addr =
dev_priv->pcigart_offset + dev_priv->fb_location;
dev_priv->gart_info.mapping.offset =
dev_priv->gart_info.bus_addr;
dev_priv->pcigart_offset + dev_priv->fb_aper_offset;
dev_priv->gart_info.mapping.size =
dev_priv->gart_info.table_size;

Expand Down Expand Up @@ -2275,7 +2275,8 @@ int radeon_driver_firstopen(struct drm_device *dev)
if (ret != 0)
return ret;

ret = drm_addmap(dev, drm_get_resource_start(dev, 0),
dev_priv->fb_aper_offset = drm_get_resource_start(dev, 0);
ret = drm_addmap(dev, dev_priv->fb_aper_offset,
drm_get_resource_len(dev, 0), _DRM_FRAME_BUFFER,
_DRM_WRITE_COMBINING, &map);
if (ret != 0)
Expand Down
1 change: 1 addition & 0 deletions trunk/drivers/char/drm/radeon_drv.h
Original file line number Diff line number Diff line change
Expand Up @@ -293,6 +293,7 @@ typedef struct drm_radeon_private {

/* starting from here on, data is preserved accross an open */
uint32_t flags; /* see radeon_chip_flags */
unsigned long fb_aper_offset;
} drm_radeon_private_t;

typedef struct drm_radeon_buf_priv {
Expand Down
1 change: 1 addition & 0 deletions trunk/drivers/char/drm/sis_mm.c
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,7 @@ static int sis_drm_alloc(struct drm_device *dev, struct drm_file *file_priv,
dev_priv->agp_initialized)) {
DRM_ERROR
("Attempt to allocate from uninitialized memory manager.\n");
mutex_unlock(&dev->struct_mutex);
return -EINVAL;
}

Expand Down
3 changes: 1 addition & 2 deletions trunk/drivers/ieee1394/dma.c
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,7 @@ int dma_region_alloc(struct dma_region *dma, unsigned long n_bytes,
goto err;
}

/* just to be safe - this will become unnecessary once sglist->address goes away */
memset(dma->sglist, 0, dma->n_pages * sizeof(*dma->sglist));
sg_init_table(dma->sglist, dma->n_pages);

/* fill scatter/gather list with pages */
for (i = 0; i < dma->n_pages; i++) {
Expand Down
3 changes: 2 additions & 1 deletion trunk/drivers/rtc/rtc-cmos.c
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,8 @@ static int cmos_read_alarm(struct device *dev, struct rtc_wkalrm *t)
t->time.tm_hour = CMOS_READ(RTC_HOURS_ALARM);

if (cmos->day_alrm) {
t->time.tm_mday = CMOS_READ(cmos->day_alrm);
/* ignore upper bits on readback per ACPI spec */
t->time.tm_mday = CMOS_READ(cmos->day_alrm) & 0x3f;
if (!t->time.tm_mday)
t->time.tm_mday = -1;

Expand Down
9 changes: 7 additions & 2 deletions trunk/drivers/s390/block/dcssblk.c
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,12 @@ dcssblk_segment_warn(int rc, char* seg_name)
}
}

static void dcssblk_unregister_callback(struct device *dev)
{
device_unregister(dev);
put_device(dev);
}

/*
* device attribute for switching shared/nonshared (exclusive)
* operation (show + store)
Expand Down Expand Up @@ -276,8 +282,7 @@ dcssblk_shared_store(struct device *dev, struct device_attribute *attr, const ch
blk_cleanup_queue(dev_info->dcssblk_queue);
dev_info->gd->queue = NULL;
put_disk(dev_info->gd);
device_unregister(dev);
put_device(dev);
rc = device_schedule_callback(dev, dcssblk_unregister_callback);
out:
up_write(&dcssblk_devices_sem);
return rc;
Expand Down
4 changes: 2 additions & 2 deletions trunk/drivers/s390/cio/cmf.c
Original file line number Diff line number Diff line change
Expand Up @@ -343,10 +343,10 @@ static int cmf_copy_block(struct ccw_device *cdev)

if (sch->schib.scsw.fctl & SCSW_FCTL_START_FUNC) {
/* Don't copy if a start function is in progress. */
if ((!sch->schib.scsw.actl & SCSW_ACTL_SUSPENDED) &&
if ((!(sch->schib.scsw.actl & SCSW_ACTL_SUSPENDED)) &&
(sch->schib.scsw.actl &
(SCSW_ACTL_DEVACT | SCSW_ACTL_SCHACT)) &&
(!sch->schib.scsw.stctl & SCSW_STCTL_SEC_STATUS))
(!(sch->schib.scsw.stctl & SCSW_STCTL_SEC_STATUS)))
return -EBUSY;
}
cmb_data = cdev->private->cmb;
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/s390/cio/device.c
Original file line number Diff line number Diff line change
Expand Up @@ -738,7 +738,7 @@ static int io_subchannel_initialize_dev(struct subchannel *sch,
atomic_set(&cdev->private->onoff, 0);
cdev->dev.parent = &sch->dev;
cdev->dev.release = ccw_device_release;
INIT_LIST_HEAD(&cdev->private->kick_work.entry);
INIT_WORK(&cdev->private->kick_work, NULL);
cdev->dev.groups = ccwdev_attr_groups;
/* Do first half of device_register. */
device_initialize(&cdev->dev);
Expand Down
4 changes: 4 additions & 0 deletions trunk/drivers/s390/net/smsgiucv.c
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,10 @@ static int __init smsg_init(void)
{
int rc;

if (!MACHINE_IS_VM) {
rc = -EPROTONOSUPPORT;
goto out;
}
rc = driver_register(&smsg_driver);
if (rc != 0)
goto out;
Expand Down
Loading

0 comments on commit 5c8ae1e

Please sign in to comment.