Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 21045
b: refs/heads/master
c: 0ee10a4
h: refs/heads/master
i:
  21043: 0f23fef
v: v3
  • Loading branch information
Linus Torvalds committed Mar 15, 2006
1 parent 1e98d01 commit 9a5f6b5
Show file tree
Hide file tree
Showing 21 changed files with 127 additions and 48 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: 3fb962bde48c413bfa419ec4413037e87955dcb6
refs/heads/master: 0ee10a4423f6eb0702a71c1d1072bdfe42e4a1a7
6 changes: 4 additions & 2 deletions trunk/arch/i386/kernel/apic.c
Original file line number Diff line number Diff line change
Expand Up @@ -570,16 +570,18 @@ void __devinit setup_local_APIC(void)
*/
void lapic_shutdown(void)
{
unsigned long flags;

if (!cpu_has_apic)
return;

local_irq_disable();
local_irq_save(flags);
clear_local_APIC();

if (enabled_via_apicbase)
disable_local_APIC();

local_irq_enable();
local_irq_restore(flags);
}

#ifdef CONFIG_PM
Expand Down
29 changes: 18 additions & 11 deletions trunk/arch/x86_64/kernel/entry.S
Original file line number Diff line number Diff line change
Expand Up @@ -178,12 +178,6 @@ rff_trace:
* Interrupts are off on entry.
* Only called from user space.
*
* EM64T CPUs have somewhat weird error reporting for non canonical RIPs in SYSRET.
* We can't handle any exceptions there because the exception handler would
* end up running on the user stack which is unsafe. To avoid problems
* any code that might end up with a user touched pt_regs should return
* using int_ret_from_syscall.
*
* XXX if we had a free scratch register we could save the RSP into the stack frame
* and report it properly in ps. Unfortunately we haven't.
*/
Expand Down Expand Up @@ -260,9 +254,7 @@ sysret_signal:
xorl %esi,%esi # oldset -> arg2
call ptregscall_common
1: movl $_TIF_NEED_RESCHED,%edi
/* Stack frame might have been changed. The IRET path does
some additional checks to handle this */
jmp int_with_check
jmp sysret_check

badsys:
movq $-ENOSYS,RAX-ARGOFFSET(%rsp)
Expand All @@ -288,8 +280,7 @@ tracesys:
call syscall_trace_leave
RESTORE_TOP_OF_STACK %rbx
RESTORE_REST
/* Stack frame might have been changed. Use the more careful IRET path */
jmp int_ret_from_sys_call
jmp ret_from_sys_call
CFI_ENDPROC

/*
Expand Down Expand Up @@ -417,9 +408,25 @@ ENTRY(stub_execve)
CFI_ADJUST_CFA_OFFSET -8
CFI_REGISTER rip, r11
SAVE_REST
movq %r11, %r15
CFI_REGISTER rip, r15
FIXUP_TOP_OF_STACK %r11
call sys_execve
GET_THREAD_INFO(%rcx)
bt $TIF_IA32,threadinfo_flags(%rcx)
CFI_REMEMBER_STATE
jc exec_32bit
RESTORE_TOP_OF_STACK %r11
movq %r15, %r11
CFI_REGISTER rip, r11
RESTORE_REST
pushq %r11
CFI_ADJUST_CFA_OFFSET 8
CFI_REL_OFFSET rip, 0
ret

exec_32bit:
CFI_RESTORE_STATE
movq %rax,RAX(%rsp)
RESTORE_REST
jmp int_ret_from_sys_call
Expand Down
44 changes: 42 additions & 2 deletions trunk/drivers/edac/edac_mc.c
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,12 @@

#define EDAC_MC_VERSION "edac_mc Ver: 2.0.0 " __DATE__

/* For now, disable the EDAC sysfs code. The sysfs interface that EDAC
* presents to user space needs more thought, and is likely to change
* substantially.
*/
#define DISABLE_EDAC_SYSFS

#ifdef CONFIG_EDAC_DEBUG
/* Values of 0 to 4 will generate output */
int edac_debug_level = 1;
Expand All @@ -47,7 +53,7 @@ EXPORT_SYMBOL(edac_debug_level);
/* EDAC Controls, setable by module parameter, and sysfs */
static int log_ue = 1;
static int log_ce = 1;
static int panic_on_ue = 1;
static int panic_on_ue;
static int poll_msec = 1000;

static int check_pci_parity = 0; /* default YES check PCI parity */
Expand Down Expand Up @@ -77,6 +83,8 @@ static int pci_whitelist_count ;

/* START sysfs data and methods */

#ifndef DISABLE_EDAC_SYSFS

static const char *mem_types[] = {
[MEM_EMPTY] = "Empty",
[MEM_RESERVED] = "Reserved",
Expand Down Expand Up @@ -241,6 +249,7 @@ static struct kobj_type ktype_memctrl = {
.default_attrs = (struct attribute **) memctrl_attr,
};

#endif /* DISABLE_EDAC_SYSFS */

/* Initialize the main sysfs entries for edac:
* /sys/devices/system/edac
Expand All @@ -251,6 +260,11 @@ static struct kobj_type ktype_memctrl = {
* !0 FAILURE
*/
static int edac_sysfs_memctrl_setup(void)
#ifdef DISABLE_EDAC_SYSFS
{
return 0;
}
#else
{
int err=0;

Expand Down Expand Up @@ -283,13 +297,15 @@ static int edac_sysfs_memctrl_setup(void)

return err;
}
#endif /* DISABLE_EDAC_SYSFS */

/*
* MC teardown:
* the '..../edac/mc' kobject followed by '..../edac' itself
*/
static void edac_sysfs_memctrl_teardown(void)
{
#ifndef DISABLE_EDAC_SYSFS
debugf0("MC: " __FILE__ ": %s()\n", __func__);

/* Unregister the MC's kobject */
Expand All @@ -300,8 +316,11 @@ static void edac_sysfs_memctrl_teardown(void)

/* Unregister the 'edac' object */
sysdev_class_unregister(&edac_class);
#endif /* DISABLE_EDAC_SYSFS */
}

#ifndef DISABLE_EDAC_SYSFS

/*
* /sys/devices/system/edac/pci;
* data structures and methods
Expand Down Expand Up @@ -554,11 +573,18 @@ static struct kobj_type ktype_edac_pci = {
.default_attrs = (struct attribute **) edac_pci_attr,
};

#endif /* DISABLE_EDAC_SYSFS */

/**
* edac_sysfs_pci_setup()
*
*/
static int edac_sysfs_pci_setup(void)
#ifdef DISABLE_EDAC_SYSFS
{
return 0;
}
#else
{
int err;

Expand All @@ -582,16 +608,20 @@ static int edac_sysfs_pci_setup(void)
}
return err;
}

#endif /* DISABLE_EDAC_SYSFS */

static void edac_sysfs_pci_teardown(void)
{
#ifndef DISABLE_EDAC_SYSFS
debugf0("MC: " __FILE__ ": %s()\n", __func__);

kobject_unregister(&edac_pci_kobj);
kobject_put(&edac_pci_kobj);
#endif
}

#ifndef DISABLE_EDAC_SYSFS

/* EDAC sysfs CSROW data structures and methods */

/* Set of more detailed csrow<id> attribute show/store functions */
Expand Down Expand Up @@ -1045,6 +1075,8 @@ static struct kobj_type ktype_mci = {
.default_attrs = (struct attribute **) mci_attr,
};

#endif /* DISABLE_EDAC_SYSFS */

#define EDAC_DEVICE_SYMLINK "device"

/*
Expand All @@ -1056,6 +1088,11 @@ static struct kobj_type ktype_mci = {
* !0 Failure
*/
static int edac_create_sysfs_mci_device(struct mem_ctl_info *mci)
#ifdef DISABLE_EDAC_SYSFS
{
return 0;
}
#else
{
int i;
int err;
Expand Down Expand Up @@ -1124,12 +1161,14 @@ static int edac_create_sysfs_mci_device(struct mem_ctl_info *mci)

return err;
}
#endif /* DISABLE_EDAC_SYSFS */

/*
* remove a Memory Controller instance
*/
static void edac_remove_sysfs_mci_device(struct mem_ctl_info *mci)
{
#ifndef DISABLE_EDAC_SYSFS
int i;

debugf0("MC: " __FILE__ ": %s()\n", __func__);
Expand All @@ -1146,6 +1185,7 @@ static void edac_remove_sysfs_mci_device(struct mem_ctl_info *mci)

kobject_unregister(&mci->edac_mci_kobj);
kobject_put(&mci->edac_mci_kobj);
#endif /* DISABLE_EDAC_SYSFS */
}

/* END OF sysfs data and methods */
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/macintosh/via-pmu.c
Original file line number Diff line number Diff line change
Expand Up @@ -825,7 +825,7 @@ proc_get_info(char *page, char **start, off_t off,
p += sprintf(p, "PMU driver version : %d\n", PMU_DRIVER_VERSION);
p += sprintf(p, "PMU firmware version : %02x\n", pmu_version);
p += sprintf(p, "AC Power : %d\n",
((pmu_power_flags & PMU_PWR_AC_PRESENT) != 0));
((pmu_power_flags & PMU_PWR_AC_PRESENT) != 0) || pmu_battery_count == 0);
p += sprintf(p, "Battery count : %d\n", pmu_battery_count);

return p - page;
Expand Down
10 changes: 9 additions & 1 deletion trunk/drivers/media/video/mxb.c
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
mxb - v4l2 driver for the Multimedia eXtension Board
Copyright (C) 1998-2003 Michael Hunold <michael@mihu.de>
Copyright (C) 1998-2006 Michael Hunold <michael@mihu.de>
Visit http://www.mihu.de/linux/saa7146/mxb/
for further details about this card.
Expand Down Expand Up @@ -327,6 +327,7 @@ static int mxb_init_done(struct saa7146_dev* dev)
struct video_decoder_init init;
struct i2c_msg msg;
struct tuner_setup tun_setup;
v4l2_std_id std = V4L2_STD_PAL_BG;

int i = 0, err = 0;
struct tea6415c_multiplex vm;
Expand Down Expand Up @@ -361,6 +362,9 @@ static int mxb_init_done(struct saa7146_dev* dev)
mxb->tuner->driver->command(mxb->tuner, VIDIOC_S_FREQUENCY,
&mxb->cur_freq);

/* set a default video standard */
mxb->tuner->driver->command(mxb->tuner, VIDIOC_S_STD, &std);

/* mute audio on tea6420s */
mxb->tea6420_1->driver->command(mxb->tea6420_1,TEA6420_SWITCH, &TEA6420_line[6][0]);
mxb->tea6420_2->driver->command(mxb->tea6420_2,TEA6420_SWITCH, &TEA6420_line[6][1]);
Expand Down Expand Up @@ -921,17 +925,21 @@ static int std_callback(struct saa7146_dev* dev, struct saa7146_standard *std)
int one = 1;

if(V4L2_STD_PAL_I == std->id ) {
v4l2_std_id std = V4L2_STD_PAL_I;
DEB_D(("VIDIOC_S_STD: setting mxb for PAL_I.\n"));
/* set the 7146 gpio register -- I don't know what this does exactly */
saa7146_write(dev, GPIO_CTRL, 0x00404050);
/* unset the 7111 gpio register -- I don't know what this does exactly */
mxb->saa7111a->driver->command(mxb->saa7111a,DECODER_SET_GPIO, &zero);
mxb->tuner->driver->command(mxb->tuner, VIDIOC_S_STD, &std);
} else {
v4l2_std_id std = V4L2_STD_PAL_BG;
DEB_D(("VIDIOC_S_STD: setting mxb for PAL/NTSC/SECAM.\n"));
/* set the 7146 gpio register -- I don't know what this does exactly */
saa7146_write(dev, GPIO_CTRL, 0x00404050);
/* set the 7111 gpio register -- I don't know what this does exactly */
mxb->saa7111a->driver->command(mxb->saa7111a,DECODER_SET_GPIO, &one);
mxb->tuner->driver->command(mxb->tuner, VIDIOC_S_STD, &std);
}
return 0;
}
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/mtd/devices/mtd_dataflash.c
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ static int dataflash_erase(struct mtd_info *mtd, struct erase_info *instr)
* we're at a block boundary and need to erase the whole block.
*/
pageaddr = instr->addr / priv->page_size;
do_block = (pageaddr & 0x7) == 0 && instr->len <= blocksize;
do_block = (pageaddr & 0x7) == 0 && instr->len >= blocksize;
pageaddr = pageaddr << priv->page_offset;

command[0] = do_block ? OP_ERASE_BLOCK : OP_ERASE_PAGE;
Expand Down
1 change: 1 addition & 0 deletions trunk/drivers/s390/scsi/zfcp_def.h
Original file line number Diff line number Diff line change
Expand Up @@ -664,6 +664,7 @@ do { \
#define ZFCP_STATUS_UNIT_TEMPORARY 0x00000002
#define ZFCP_STATUS_UNIT_SHARED 0x00000004
#define ZFCP_STATUS_UNIT_READONLY 0x00000008
#define ZFCP_STATUS_UNIT_REGISTERED 0x00000010

/* FSF request status (this does not have a common part) */
#define ZFCP_STATUS_FSFREQ_NOT_INIT 0x00000000
Expand Down
11 changes: 7 additions & 4 deletions trunk/drivers/s390/scsi/zfcp_erp.c
Original file line number Diff line number Diff line change
Expand Up @@ -3391,10 +3391,13 @@ zfcp_erp_action_cleanup(int action, struct zfcp_adapter *adapter,
&& (!atomic_test_mask(ZFCP_STATUS_UNIT_TEMPORARY,
&unit->status))
&& !unit->device
&& port->rport)
scsi_add_device(port->adapter->scsi_host, 0,
port->rport->scsi_target_id,
unit->scsi_lun);
&& port->rport) {
atomic_set_mask(ZFCP_STATUS_UNIT_REGISTERED,
&unit->status);
scsi_scan_target(&port->rport->dev, 0,
port->rport->scsi_target_id,
unit->scsi_lun, 0);
}
zfcp_unit_put(unit);
break;
case ZFCP_ERP_ACTION_REOPEN_PORT_FORCED:
Expand Down
8 changes: 5 additions & 3 deletions trunk/drivers/s390/scsi/zfcp_scsi.c
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ struct zfcp_data zfcp_data = {
eh_host_reset_handler: zfcp_scsi_eh_host_reset_handler,
/* FIXME(openfcp): Tune */
can_queue: 4096,
this_id: 0,
this_id: -1,
/*
* FIXME:
* one less? can zfcp_create_sbale cope with it?
Expand Down Expand Up @@ -183,7 +183,8 @@ zfcp_scsi_slave_alloc(struct scsi_device *sdp)

read_lock_irqsave(&zfcp_data.config_lock, flags);
unit = zfcp_unit_lookup(adapter, sdp->channel, sdp->id, sdp->lun);
if (unit) {
if (unit && atomic_test_mask(ZFCP_STATUS_UNIT_REGISTERED,
&unit->status)) {
sdp->hostdata = unit;
unit->device = sdp;
zfcp_unit_get(unit);
Expand All @@ -208,6 +209,7 @@ zfcp_scsi_slave_destroy(struct scsi_device *sdpnt)
struct zfcp_unit *unit = (struct zfcp_unit *) sdpnt->hostdata;

if (unit) {
atomic_clear_mask(ZFCP_STATUS_UNIT_REGISTERED, &unit->status);
sdpnt->hostdata = NULL;
unit->device = NULL;
zfcp_unit_put(unit);
Expand Down Expand Up @@ -291,7 +293,7 @@ zfcp_scsi_command_async(struct zfcp_adapter *adapter, struct zfcp_unit *unit,
"on port 0x%016Lx in recovery\n",
zfcp_get_busid_by_unit(unit),
unit->fcp_lun, unit->port->wwpn);
retval = SCSI_MLQUEUE_DEVICE_BUSY;
zfcp_scsi_command_fail(scpnt, DID_NO_CONNECT);
goto out;
}

Expand Down
1 change: 1 addition & 0 deletions trunk/drivers/scsi/pcmcia/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ menu "PCMCIA SCSI adapter support"
config PCMCIA_AHA152X
tristate "Adaptec AHA152X PCMCIA support"
depends on m && !64BIT
select SCSI_SPI_ATTRS
help
Say Y here if you intend to attach this type of PCMCIA SCSI host
adapter to your computer.
Expand Down
1 change: 1 addition & 0 deletions trunk/drivers/scsi/scsi_devinfo.c
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,7 @@ static struct {
{"ADAPTEC", "Adaptec 5400S", NULL, BLIST_FORCELUN},
{"AFT PRO", "-IX CF", "0.0>", BLIST_FORCELUN},
{"BELKIN", "USB 2 HS-CF", "1.95", BLIST_FORCELUN | BLIST_INQUIRY_36},
{"BROWNIE", "1600U3P", NULL, BLIST_NOREPORTLUN},
{"CANON", "IPUBJD", NULL, BLIST_SPARSELUN},
{"CBOX3", "USB Storage-SMC", "300A", BLIST_FORCELUN | BLIST_INQUIRY_36},
{"CMD", "CRA-7280", NULL, BLIST_SPARSELUN}, /* CMD RAID Controller */
Expand Down
Loading

0 comments on commit 9a5f6b5

Please sign in to comment.