Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 15295
b: refs/heads/master
c: 58c4fb8
h: refs/heads/master
i:
  15293: b2c08ad
  15291: 2853dd0
  15287: deee24f
  15279: 3c606b8
  15263: a36770f
  15231: 2b27ce5
v: v3
  • Loading branch information
YOSHIFUJI Hideaki committed Dec 21, 2005
1 parent 48bee0e commit 62cdc8c
Show file tree
Hide file tree
Showing 21 changed files with 56 additions and 187 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: 9b78a82c1cf19aa813bdaa184fa840a3ba811750
refs/heads/master: 58c4fb86eabcbc385d954843a635b7f4327be6b0
5 changes: 5 additions & 0 deletions trunk/arch/sparc64/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ CC := $(shell if $(CC) -m64 -S -o /dev/null -xc /dev/null >/dev/null 2>&1; then
NEW_GCC := $(call cc-option-yn, -m64 -mcmodel=medlow)
NEW_GAS := $(shell if $(LD) -V 2>&1 | grep 'elf64_sparc' > /dev/null; then echo y; else echo n; fi)
UNDECLARED_REGS := $(shell if $(CC) -c -x assembler /dev/null -Wa,--help | grep undeclared-regs > /dev/null; then echo y; else echo n; fi; )
INLINE_LIMIT := $(call cc-option-yn, -m64 -finline-limit=100000)

export NEW_GCC

Expand Down Expand Up @@ -48,6 +49,10 @@ else
AFLAGS += -m64 -mcpu=ultrasparc $(CC_UNDECL)
endif

ifeq ($(INLINE_LIMIT),y)
CFLAGS := $(CFLAGS) -finline-limit=100000
endif

ifeq ($(CONFIG_MCOUNT),y)
CFLAGS := $(CFLAGS) -pg
endif
Expand Down
20 changes: 5 additions & 15 deletions trunk/drivers/acpi/processor_idle.c
Original file line number Diff line number Diff line change
Expand Up @@ -274,19 +274,18 @@ static void acpi_processor_idle(void)
}
}

cx->usage++;

#ifdef CONFIG_HOTPLUG_CPU
/*
* Check for P_LVL2_UP flag before entering C2 and above on
* an SMP system. We do it here instead of doing it at _CST/P_LVL
* detection phase, to work cleanly with logical CPU hotplug.
*/
if ((cx->type != ACPI_STATE_C1) && (num_online_cpus() > 1) &&
!pr->flags.has_cst && !acpi_fadt.plvl2_up)
cx = &pr->power.states[ACPI_STATE_C1];
!pr->flags.has_cst && acpi_fadt.plvl2_up)
cx->type = ACPI_STATE_C1;
#endif

cx->usage++;

/*
* Sleep:
* ------
Expand Down Expand Up @@ -387,15 +386,6 @@ static void acpi_processor_idle(void)

next_state = pr->power.state;

#ifdef CONFIG_HOTPLUG_CPU
/* Don't do promotion/demotion */
if ((cx->type == ACPI_STATE_C1) && (num_online_cpus() > 1) &&
!pr->flags.has_cst && !acpi_fadt.plvl2_up) {
next_state = cx;
goto end;
}
#endif

/*
* Promotion?
* ----------
Expand Down Expand Up @@ -567,7 +557,7 @@ static int acpi_processor_get_power_info_fadt(struct acpi_processor *pr)
* Check for P_LVL2_UP flag before entering C2 and above on
* an SMP system.
*/
if ((num_online_cpus() > 1) && !acpi_fadt.plvl2_up)
if ((num_online_cpus() > 1) && acpi_fadt.plvl2_up)
return_VALUE(-ENODEV);
#endif

Expand Down
3 changes: 1 addition & 2 deletions trunk/drivers/media/video/saa7134/saa7134-alsa.c
Original file line number Diff line number Diff line change
Expand Up @@ -1028,8 +1028,7 @@ static void saa7134_alsa_exit(void)
return;
}

/* We initialize this late, to make sure the sound system is up and running */
late_initcall(saa7134_alsa_init);
module_init(saa7134_alsa_init);
module_exit(saa7134_alsa_exit);
MODULE_LICENSE("GPL");
MODULE_AUTHOR("Ricardo Cerqueira");
Expand Down
3 changes: 1 addition & 2 deletions trunk/drivers/media/video/saa7134/saa7134-oss.c
Original file line number Diff line number Diff line change
Expand Up @@ -1002,8 +1002,7 @@ static void saa7134_oss_exit(void)
return;
}

/* We initialize this late, to make sure the sound system is up and running */
late_initcall(saa7134_oss_init);
module_init(saa7134_oss_init);
module_exit(saa7134_oss_exit);
MODULE_LICENSE("GPL");
MODULE_AUTHOR("Gerd Knorr <kraxel@bytesex.org> [SuSE Labs]");
Expand Down
48 changes: 10 additions & 38 deletions trunk/drivers/scsi/scsi_scan.c
Original file line number Diff line number Diff line change
Expand Up @@ -400,35 +400,6 @@ static struct scsi_target *scsi_alloc_target(struct device *parent,
return found_target;
}

struct work_queue_wrapper {
struct work_struct work;
struct scsi_target *starget;
};

static void scsi_target_reap_work(void *data) {
struct work_queue_wrapper *wqw = (struct work_queue_wrapper *)data;
struct scsi_target *starget = wqw->starget;
struct Scsi_Host *shost = dev_to_shost(starget->dev.parent);
unsigned long flags;

kfree(wqw);

spin_lock_irqsave(shost->host_lock, flags);

if (--starget->reap_ref == 0 && list_empty(&starget->devices)) {
list_del_init(&starget->siblings);
spin_unlock_irqrestore(shost->host_lock, flags);
device_del(&starget->dev);
transport_unregister_device(&starget->dev);
put_device(&starget->dev);
return;

}
spin_unlock_irqrestore(shost->host_lock, flags);

return;
}

/**
* scsi_target_reap - check to see if target is in use and destroy if not
*
Expand All @@ -440,18 +411,19 @@ static void scsi_target_reap_work(void *data) {
*/
void scsi_target_reap(struct scsi_target *starget)
{
struct work_queue_wrapper *wqw =
kzalloc(sizeof(struct work_queue_wrapper), GFP_ATOMIC);
struct Scsi_Host *shost = dev_to_shost(starget->dev.parent);
unsigned long flags;
spin_lock_irqsave(shost->host_lock, flags);

if (!wqw) {
starget_printk(KERN_ERR, starget,
"Failed to allocate memory in scsi_reap_target()\n");
if (--starget->reap_ref == 0 && list_empty(&starget->devices)) {
list_del_init(&starget->siblings);
spin_unlock_irqrestore(shost->host_lock, flags);
device_del(&starget->dev);
transport_unregister_device(&starget->dev);
put_device(&starget->dev);
return;
}

INIT_WORK(&wqw->work, scsi_target_reap_work, wqw);
wqw->starget = starget;
schedule_work(&wqw->work);
spin_unlock_irqrestore(shost->host_lock, flags);
}

/**
Expand Down
59 changes: 4 additions & 55 deletions trunk/drivers/scsi/scsi_transport_fc.c
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,6 @@ static struct {
{ FC_PORTSTATE_LINKDOWN, "Linkdown" },
{ FC_PORTSTATE_ERROR, "Error" },
{ FC_PORTSTATE_LOOPBACK, "Loopback" },
{ FC_PORTSTATE_DELETED, "Deleted" },
};
fc_enum_name_search(port_state, fc_port_state, fc_port_state_names)
#define FC_PORTSTATE_MAX_NAMELEN 20
Expand Down Expand Up @@ -212,7 +211,6 @@ fc_bitfield_name_search(remote_port_roles, fc_remote_port_role_names)
#define FC_MGMTSRVR_PORTID 0x00000a


static void fc_shost_remove_rports(void *data);
static void fc_timeout_deleted_rport(void *data);
static void fc_scsi_scan_rport(void *data);
static void fc_rport_terminate(struct fc_rport *rport);
Expand Down Expand Up @@ -320,8 +318,6 @@ static int fc_host_setup(struct transport_container *tc, struct device *dev,
fc_host_next_rport_number(shost) = 0;
fc_host_next_target_id(shost) = 0;

fc_host_flags(shost) = 0;
INIT_WORK(&fc_host_rport_del_work(shost), fc_shost_remove_rports, shost);
return 0;
}

Expand Down Expand Up @@ -391,7 +387,6 @@ show_fc_rport_##field (struct class_device *cdev, char *buf) \
struct fc_internal *i = to_fc_internal(shost->transportt); \
if ((i->f->get_rport_##field) && \
!((rport->port_state == FC_PORTSTATE_BLOCKED) || \
(rport->port_state == FC_PORTSTATE_DELETED) || \
(rport->port_state == FC_PORTSTATE_NOTPRESENT))) \
i->f->get_rport_##field(rport); \
return snprintf(buf, sz, format_string, cast rport->field); \
Expand All @@ -407,7 +402,6 @@ store_fc_rport_##field(struct class_device *cdev, const char *buf, \
struct Scsi_Host *shost = rport_to_shost(rport); \
struct fc_internal *i = to_fc_internal(shost->transportt); \
if ((rport->port_state == FC_PORTSTATE_BLOCKED) || \
(rport->port_state == FC_PORTSTATE_DELETED) || \
(rport->port_state == FC_PORTSTATE_NOTPRESENT)) \
return -EBUSY; \
val = simple_strtoul(buf, NULL, 0); \
Expand Down Expand Up @@ -525,7 +519,6 @@ store_fc_rport_dev_loss_tmo(struct class_device *cdev, const char *buf,
struct Scsi_Host *shost = rport_to_shost(rport);
struct fc_internal *i = to_fc_internal(shost->transportt);
if ((rport->port_state == FC_PORTSTATE_BLOCKED) ||
(rport->port_state == FC_PORTSTATE_DELETED) ||
(rport->port_state == FC_PORTSTATE_NOTPRESENT))
return -EBUSY;
val = simple_strtoul(buf, NULL, 0);
Expand Down Expand Up @@ -1776,7 +1769,7 @@ fc_timeout_deleted_rport(void *data)
rport->maxframe_size = -1;
rport->supported_classes = FC_COS_UNSPECIFIED;
rport->roles = FC_RPORT_ROLE_UNKNOWN;
rport->port_state = FC_PORTSTATE_DELETED;
rport->port_state = FC_PORTSTATE_NOTPRESENT;

/* remove the identifiers that aren't used in the consisting binding */
switch (fc_host_tgtid_bind_type(shost)) {
Expand All @@ -1796,23 +1789,14 @@ fc_timeout_deleted_rport(void *data)
break;
}

spin_unlock_irqrestore(shost->host_lock, flags);

/*
* As this only occurs if the remote port (scsi target)
* went away and didn't come back - we'll remove
* all attached scsi devices.
*
* We'll schedule the shost work item to perform the actual removal
* to avoid recursion in the different flush calls if we perform
* the removal in each target - and there are lots of targets
* whose timeouts fire at the same time.
*/

if ( !(fc_host_flags(shost) & FC_SHOST_RPORT_DEL_SCHEDULED)) {
fc_host_flags(shost) |= FC_SHOST_RPORT_DEL_SCHEDULED;
scsi_queue_work(shost, &fc_host_rport_del_work(shost));
}

spin_unlock_irqrestore(shost->host_lock, flags);
fc_rport_tgt_remove(rport);
}

/**
Expand All @@ -1834,41 +1818,6 @@ fc_scsi_scan_rport(void *data)
}


/**
* fc_shost_remove_rports - called to remove all rports that are marked
* as in a deleted (not connected) state.
*
* @data: shost whose rports are to be looked at
**/
static void
fc_shost_remove_rports(void *data)
{
struct Scsi_Host *shost = (struct Scsi_Host *)data;
struct fc_rport *rport, *next_rport;
unsigned long flags;

spin_lock_irqsave(shost->host_lock, flags);
while (fc_host_flags(shost) & FC_SHOST_RPORT_DEL_SCHEDULED) {

fc_host_flags(shost) &= ~FC_SHOST_RPORT_DEL_SCHEDULED;

restart_search:
list_for_each_entry_safe(rport, next_rport,
&fc_host_rport_bindings(shost), peers) {
if (rport->port_state == FC_PORTSTATE_DELETED) {
rport->port_state = FC_PORTSTATE_NOTPRESENT;
spin_unlock_irqrestore(shost->host_lock, flags);
fc_rport_tgt_remove(rport);
spin_lock_irqsave(shost->host_lock, flags);
goto restart_search;
}
}

}
spin_unlock_irqrestore(shost->host_lock, flags);
}


MODULE_AUTHOR("Martin Hicks");
MODULE_DESCRIPTION("FC Transport Attributes");
MODULE_LICENSE("GPL");
Expand Down
9 changes: 3 additions & 6 deletions trunk/drivers/usb/core/usb.c
Original file line number Diff line number Diff line change
Expand Up @@ -1432,8 +1432,7 @@ static int usb_generic_suspend(struct device *dev, pm_message_t message)
mark_quiesced(intf);
} else {
// FIXME else if there's no suspend method, disconnect...
dev_warn(dev, "no suspend for driver %s?\n", driver->name);
mark_quiesced(intf);
dev_warn(dev, "no %s?\n", "suspend");
status = 0;
}
return status;
Expand Down Expand Up @@ -1461,10 +1460,8 @@ static int usb_generic_resume(struct device *dev)
}

if ((dev->driver == NULL) ||
(dev->driver_data == &usb_generic_driver_data)) {
dev->power.power_state.event = PM_EVENT_FREEZE;
(dev->driver_data == &usb_generic_driver_data))
return 0;
}

intf = to_usb_interface(dev);
driver = to_usb_driver(dev->driver);
Expand All @@ -1484,7 +1481,7 @@ static int usb_generic_resume(struct device *dev)
mark_quiesced(intf);
}
} else
dev_warn(dev, "no resume for driver %s?\n", driver->name);
dev_warn(dev, "no %s?\n", "resume");
return 0;
}

Expand Down
4 changes: 2 additions & 2 deletions trunk/drivers/usb/storage/scsiglue.c
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ static int slave_configure(struct scsi_device *sdev)
* data comes from.
*/
if (sdev->scsi_level < SCSI_2)
sdev->scsi_level = sdev->sdev_target->scsi_level = SCSI_2;
sdev->scsi_level = SCSI_2;

/* According to the technical support people at Genesys Logic,
* devices using their chips have problems transferring more than
Expand Down Expand Up @@ -162,7 +162,7 @@ static int slave_configure(struct scsi_device *sdev)
* a Get-Max-LUN request, we won't lose much by setting the
* revision level down to 2. The only devices that would be
* affected are those with sparse LUNs. */
sdev->scsi_level = sdev->sdev_target->scsi_level = SCSI_2;
sdev->scsi_level = SCSI_2;

/* USB-IDE bridges tend to report SK = 0x04 (Non-recoverable
* Hardware Error) when any low-level error occurs,
Expand Down
8 changes: 2 additions & 6 deletions trunk/fs/relayfs/relay.c
Original file line number Diff line number Diff line change
Expand Up @@ -333,7 +333,8 @@ size_t relay_switch_subbuf(struct rchan_buf *buf, size_t length)
return length;

toobig:
buf->chan->last_toobig = length;
printk(KERN_WARNING "relayfs: event too large (%Zd)\n", length);
WARN_ON(1);
return 0;
}

Expand Down Expand Up @@ -398,11 +399,6 @@ void relay_close(struct rchan *chan)
relay_close_buf(chan->buf[i]);
}

if (chan->last_toobig)
printk(KERN_WARNING "relayfs: one or more items not logged "
"[item size (%Zd) > sub-buffer size (%Zd)]\n",
chan->last_toobig, chan->subbuf_size);

kref_put(&chan->kref, relay_destroy_channel);
}

Expand Down
1 change: 1 addition & 0 deletions trunk/include/linux/ipv6_route.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
fallback, no routers on link */
#define RTF_ADDRCONF 0x00040000 /* addrconf route - RA */
#define RTF_PREFIX_RT 0x00080000 /* A prefix only route - RA */
#define RTF_ANYCAST 0x00100000 /* Anycast */

#define RTF_NONEXTHOP 0x00200000 /* route with no nexthop */
#define RTF_EXPIRES 0x00400000
Expand Down
2 changes: 1 addition & 1 deletion trunk/include/linux/irq.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
*/

#include <linux/config.h>
#include <linux/smp.h>
#include <asm/smp.h> /* cpu_online_map */

#if !defined(CONFIG_ARCH_S390)

Expand Down
5 changes: 2 additions & 3 deletions trunk/include/linux/relayfs_fs.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@
#include <linux/kref.h>

/*
* Tracks changes to rchan/rchan_buf structs
* Tracks changes to rchan_buf struct
*/
#define RELAYFS_CHANNEL_VERSION 6
#define RELAYFS_CHANNEL_VERSION 5

/*
* Per-cpu relay channel buffer
Expand Down Expand Up @@ -60,7 +60,6 @@ struct rchan
struct rchan_callbacks *cb; /* client callbacks */
struct kref kref; /* channel refcount */
void *private_data; /* for user-defined data */
size_t last_toobig; /* tried to log event > subbuf size */
struct rchan_buf *buf[NR_CPUS]; /* per-cpu channel buffers */
};

Expand Down
Loading

0 comments on commit 62cdc8c

Please sign in to comment.