Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 26069
b: refs/heads/master
c: a6db522
h: refs/heads/master
i:
  26067: 4bdf400
v: v3
  • Loading branch information
Linus Torvalds committed Apr 20, 2006
1 parent 7609d98 commit 73306a9
Show file tree
Hide file tree
Showing 30 changed files with 205 additions and 360 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: 036999d50180a9eaaa79dfb1d7a940824e475f24
refs/heads/master: a6db522c9399f69ff705c8afae069b5a74a8ea6b
22 changes: 22 additions & 0 deletions trunk/Documentation/block/switching-sched.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
As of the Linux 2.6.10 kernel, it is now possible to change the
IO scheduler for a given block device on the fly (thus making it possible,
for instance, to set the CFQ scheduler for the system default, but
set a specific device to use the anticipatory or noop schedulers - which
can improve that device's throughput).

To set a specific scheduler, simply do this:

echo SCHEDNAME > /sys/block/DEV/queue/scheduler

where SCHEDNAME is the name of a defined IO scheduler, and DEV is the
device name (hda, hdb, sga, or whatever you happen to have).

The list of defined schedulers can be found by simply doing
a "cat /sys/block/DEV/queue/scheduler" - the list of valid names
will be displayed, with the currently selected scheduler in brackets:

# cat /sys/block/hda/queue/scheduler
noop anticipatory deadline [cfq]
# echo anticipatory > /sys/block/hda/queue/scheduler
# cat /sys/block/hda/queue/scheduler
noop [anticipatory] deadline cfq
5 changes: 3 additions & 2 deletions trunk/Documentation/feature-removal-schedule.txt
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,9 @@ Who: Adrian Bunk <bunk@stusta.de>

---------------------------

What: drivers depending on OBSOLETE_OSS_DRIVER
When: January 2006
What: drivers that were depending on OBSOLETE_OSS_DRIVER
(config options already removed)
When: before 2.6.19
Why: OSS drivers with ALSA replacements
Who: Adrian Bunk <bunk@stusta.de>

Expand Down
7 changes: 7 additions & 0 deletions trunk/MAINTAINERS
Original file line number Diff line number Diff line change
Expand Up @@ -1458,6 +1458,13 @@ M: support@pathscale.com
L: openib-general@openib.org
S: Supported

IPMI SUBSYSTEM
P: Corey Minyard
M: minyard@acm.org
L: openipmi-developer@lists.sourceforge.net
W: http://openipmi.sourceforge.net/
S: Supported

IPX NETWORK LAYER
P: Arnaldo Carvalho de Melo
M: acme@conectiva.com.br
Expand Down
2 changes: 2 additions & 0 deletions trunk/arch/i386/kernel/cpu/amd.c
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,8 @@ static void __init init_amd(struct cpuinfo_x86 *c)
set_bit(X86_FEATURE_K7, c->x86_capability);
break;
}
if (c->x86 >= 6)
set_bit(X86_FEATURE_FXSAVE_LEAK, c->x86_capability);

display_cacheinfo(c);

Expand Down
4 changes: 3 additions & 1 deletion trunk/arch/x86_64/kernel/process.c
Original file line number Diff line number Diff line change
Expand Up @@ -575,8 +575,10 @@ __switch_to(struct task_struct *prev_p, struct task_struct *next_p)
prev->userrsp = read_pda(oldrsp);
write_pda(oldrsp, next->userrsp);
write_pda(pcurrent, next_p);

/* This must be here to ensure both math_state_restore() and
kernel_fpu_begin() work consistently. */
kernel_fpu_begin() work consistently.
And the AMD workaround requires it to be after DS reload. */
unlazy_fpu(prev_p);
write_pda(kernelstack,
task_stack_page(next_p) + THREAD_SIZE - PDA_STACKOFFSET);
Expand Down
4 changes: 4 additions & 0 deletions trunk/arch/x86_64/kernel/setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -930,6 +930,10 @@ static int __init init_amd(struct cpuinfo_x86 *c)
if (c->x86 == 15 && ((level >= 0x0f48 && level < 0x0f50) || level >= 0x0f58))
set_bit(X86_FEATURE_REP_GOOD, &c->x86_capability);

/* Enable workaround for FXSAVE leak */
if (c->x86 >= 6)
set_bit(X86_FEATURE_FXSAVE_LEAK, &c->x86_capability);

r = get_model_name(c);
if (!r) {
switch (c->x86) {
Expand Down
2 changes: 0 additions & 2 deletions trunk/block/elevator.c
Original file line number Diff line number Diff line change
Expand Up @@ -895,10 +895,8 @@ ssize_t elv_iosched_show(request_queue_t *q, char *name)
EXPORT_SYMBOL(elv_dispatch_sort);
EXPORT_SYMBOL(elv_add_request);
EXPORT_SYMBOL(__elv_add_request);
EXPORT_SYMBOL(elv_requeue_request);
EXPORT_SYMBOL(elv_next_request);
EXPORT_SYMBOL(elv_dequeue_request);
EXPORT_SYMBOL(elv_queue_empty);
EXPORT_SYMBOL(elv_completed_request);
EXPORT_SYMBOL(elevator_exit);
EXPORT_SYMBOL(elevator_init);
4 changes: 2 additions & 2 deletions trunk/block/ll_rw_blk.c
Original file line number Diff line number Diff line change
Expand Up @@ -1554,7 +1554,7 @@ void blk_plug_device(request_queue_t *q)
* don't plug a stopped queue, it must be paired with blk_start_queue()
* which will restart the queueing
*/
if (test_bit(QUEUE_FLAG_STOPPED, &q->queue_flags))
if (blk_queue_stopped(q))
return;

if (!test_and_set_bit(QUEUE_FLAG_PLUGGED, &q->queue_flags)) {
Expand Down Expand Up @@ -1587,7 +1587,7 @@ EXPORT_SYMBOL(blk_remove_plug);
*/
void __generic_unplug_device(request_queue_t *q)
{
if (unlikely(test_bit(QUEUE_FLAG_STOPPED, &q->queue_flags)))
if (unlikely(blk_queue_stopped(q)))
return;

if (!blk_remove_plug(q))
Expand Down
5 changes: 3 additions & 2 deletions trunk/drivers/char/cs5535_gpio.c
Original file line number Diff line number Diff line change
Expand Up @@ -241,9 +241,10 @@ static int __init cs5535_gpio_init(void)
static void __exit cs5535_gpio_cleanup(void)
{
dev_t dev_id = MKDEV(major, 0);

cdev_del(&cs5535_gpio_cdev);
unregister_chrdev_region(dev_id, CS5535_GPIO_COUNT);
if (gpio_base != 0)
release_region(gpio_base, CS5535_GPIO_SIZE);
release_region(gpio_base, CS5535_GPIO_SIZE);
}

module_init(cs5535_gpio_init);
Expand Down
3 changes: 3 additions & 0 deletions trunk/drivers/char/sonypi.c
Original file line number Diff line number Diff line change
Expand Up @@ -1341,6 +1341,9 @@ static int __devinit sonypi_probe(struct platform_device *dev)
else if ((pcidev = pci_get_device(PCI_VENDOR_ID_INTEL,
PCI_DEVICE_ID_INTEL_ICH6_1, NULL)))
sonypi_device.model = SONYPI_DEVICE_MODEL_TYPE3;
else if ((pcidev = pci_get_device(PCI_VENDOR_ID_INTEL,
PCI_DEVICE_ID_INTEL_ICH7_1, NULL)))
sonypi_device.model = SONYPI_DEVICE_MODEL_TYPE3;
else
sonypi_device.model = SONYPI_DEVICE_MODEL_TYPE2;

Expand Down
5 changes: 5 additions & 0 deletions trunk/drivers/i2c/busses/i2c-i801.c
Original file line number Diff line number Diff line change
Expand Up @@ -478,6 +478,11 @@ static s32 i801_access(struct i2c_adapter * adap, u16 addr,
ret = i801_transaction();
}

/* Some BIOSes don't like it when PEC is enabled at reboot or resume
time, so we forcibly disable it after every transaction. */
if (hwpec)
outb_p(0, SMBAUXCTL);

if(block)
return ret;
if(ret)
Expand Down
24 changes: 12 additions & 12 deletions trunk/drivers/md/md.c
Original file line number Diff line number Diff line change
Expand Up @@ -279,11 +279,6 @@ static inline int mddev_lock(mddev_t * mddev)
return mutex_lock_interruptible(&mddev->reconfig_mutex);
}

static inline void mddev_lock_uninterruptible(mddev_t * mddev)
{
mutex_lock(&mddev->reconfig_mutex);
}

static inline int mddev_trylock(mddev_t * mddev)
{
return mutex_trylock(&mddev->reconfig_mutex);
Expand Down Expand Up @@ -2458,9 +2453,11 @@ md_attr_show(struct kobject *kobj, struct attribute *attr, char *page)

if (!entry->show)
return -EIO;
mddev_lock(mddev);
rv = entry->show(mddev, page);
mddev_unlock(mddev);
rv = mddev_lock(mddev);
if (!rv) {
rv = entry->show(mddev, page);
mddev_unlock(mddev);
}
return rv;
}

Expand All @@ -2474,9 +2471,11 @@ md_attr_store(struct kobject *kobj, struct attribute *attr,

if (!entry->store)
return -EIO;
mddev_lock(mddev);
rv = entry->store(mddev, page, length);
mddev_unlock(mddev);
rv = mddev_lock(mddev);
if (!rv) {
rv = entry->store(mddev, page, length);
mddev_unlock(mddev);
}
return rv;
}

Expand Down Expand Up @@ -4341,8 +4340,9 @@ static int md_seq_show(struct seq_file *seq, void *v)
return 0;
}

if (mddev_lock(mddev)!=0)
if (mddev_lock(mddev) < 0)
return -EINTR;

if (mddev->pers || mddev->raid_disks || !list_empty(&mddev->disks)) {
seq_printf(seq, "%s : %sactive", mdname(mddev),
mddev->pers ? "" : "in");
Expand Down
29 changes: 29 additions & 0 deletions trunk/drivers/pci/quirks.c
Original file line number Diff line number Diff line change
Expand Up @@ -864,6 +864,35 @@ static void __init quirk_eisa_bridge(struct pci_dev *dev)
}
DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82375, quirk_eisa_bridge );

/*
* On the MSI-K8T-Neo2Fir Board, the internal Soundcard is disabled
* when a PCI-Soundcard is added. The BIOS only gives Options
* "Disabled" and "AUTO". This Quirk Sets the corresponding
* Register-Value to enable the Soundcard.
*/
static void __init k8t_sound_hostbridge(struct pci_dev *dev)
{
unsigned char val;

printk(KERN_INFO "PCI: Quirk-MSI-K8T Soundcard On\n");
pci_read_config_byte(dev, 0x50, &val);
if (val == 0x88 || val == 0xc8) {
pci_write_config_byte(dev, 0x50, val & (~0x40));

/* Verify the Change for Status output */
pci_read_config_byte(dev, 0x50, &val);
if (val & 0x40)
printk(KERN_INFO "PCI: MSI-K8T soundcard still off\n");
else
printk(KERN_INFO "PCI: MSI-K8T soundcard on\n");
} else {
printk(KERN_INFO "PCI: Unexpected Value in PCI-Register: "
"no Change!\n");
}

}
DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_8237, k8t_sound_hostbridge);

/*
* On ASUS P4B boards, the SMBus PCI Device within the ICH2/4 southbridge
* is not activated. The myth is that Asus said that they do not want the
Expand Down
4 changes: 2 additions & 2 deletions trunk/drivers/video/pm2fb.c
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,8 @@ static char *mode __devinitdata = NULL;
* these flags allow the user to specify that requests for +ve sync
* should be silently turned in -ve sync.
*/
static int lowhsync __devinitdata = 0;
static int lowvsync __devinitdata = 0;
static int lowhsync;
static int lowvsync;

/*
* The hardware state of the graphics card that isn't part of the
Expand Down
13 changes: 12 additions & 1 deletion trunk/fs/splice.c
Original file line number Diff line number Diff line change
Expand Up @@ -275,6 +275,15 @@ __generic_file_splice_read(struct file *in, loff_t *ppos,
error = 0;
bytes = 0;
for (i = 0; i < nr_pages; i++, index++) {
unsigned int this_len;

if (!len)
break;

/*
* this_len is the max we'll use from this page
*/
this_len = min(len, PAGE_CACHE_SIZE - loff);
find_page:
/*
* lookup the page for this index
Expand Down Expand Up @@ -366,11 +375,13 @@ __generic_file_splice_read(struct file *in, loff_t *ppos,
* force quit after adding this page
*/
nr_pages = i;
this_len = min(this_len, loff);
}
}
fill_it:
pages[i] = page;
bytes += PAGE_CACHE_SIZE - loff;
bytes += this_len;
len -= this_len;
loff = 0;
}

Expand Down
1 change: 1 addition & 0 deletions trunk/include/asm-i386/cpufeature.h
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@
#define X86_FEATURE_P4 (3*32+ 7) /* P4 */
#define X86_FEATURE_CONSTANT_TSC (3*32+ 8) /* TSC ticks at a constant rate */
#define X86_FEATURE_UP (3*32+ 9) /* smp kernel running on up */
#define X86_FEATURE_FXSAVE_LEAK (3*32+10) /* FXSAVE leaks FOP/FIP/FOP */

/* Intel-defined CPU features, CPUID level 0x00000001 (ecx), word 4 */
#define X86_FEATURE_XMM3 (4*32+ 0) /* Streaming SIMD Extensions-3 */
Expand Down
30 changes: 26 additions & 4 deletions trunk/include/asm-i386/i387.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@

#include <linux/sched.h>
#include <linux/init.h>
#include <linux/kernel_stat.h>
#include <asm/processor.h>
#include <asm/sigcontext.h>
#include <asm/user.h>
Expand All @@ -38,17 +39,38 @@ extern void init_fpu(struct task_struct *);
extern void kernel_fpu_begin(void);
#define kernel_fpu_end() do { stts(); preempt_enable(); } while(0)

/* We need a safe address that is cheap to find and that is already
in L1 during context switch. The best choices are unfortunately
different for UP and SMP */
#ifdef CONFIG_SMP
#define safe_address (__per_cpu_offset[0])
#else
#define safe_address (kstat_cpu(0).cpustat.user)
#endif

/*
* These must be called with preempt disabled
*/
static inline void __save_init_fpu( struct task_struct *tsk )
{
/* Use more nops than strictly needed in case the compiler
varies code */
alternative_input(
"fnsave %1 ; fwait ;" GENERIC_NOP2,
"fxsave %1 ; fnclex",
"fnsave %[fx] ;fwait;" GENERIC_NOP8 GENERIC_NOP4,
"fxsave %[fx]\n"
"bt $7,%[fsw] ; jc 1f ; fnclex\n1:",
X86_FEATURE_FXSR,
"m" (tsk->thread.i387.fxsave)
:"memory");
[fx] "m" (tsk->thread.i387.fxsave),
[fsw] "m" (tsk->thread.i387.fxsave.swd) : "memory");
/* AMD K7/K8 CPUs don't save/restore FDP/FIP/FOP unless an exception
is pending. Clear the x87 state here by setting it to fixed
values. __per_cpu_offset[0] is a random variable that should be in L1 */
alternative_input(
GENERIC_NOP8 GENERIC_NOP2,
"emms\n\t" /* clear stack tags */
"fildl %[addr]", /* set F?P to defined value */
X86_FEATURE_FXSAVE_LEAK,
[addr] "m" (safe_address));
task_thread_info(tsk)->status &= ~TS_USEDFPU;
}

Expand Down
2 changes: 1 addition & 1 deletion trunk/include/asm-sparc/unistd.h
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@
#define __NR_setfsgid 229 /* Linux Specific */
#define __NR__newselect 230 /* Linux Specific */
#define __NR_time 231 /* Linux Specific */
#define __NR_sys_splice 232 /* Linux Specific */
#define __NR_splice 232 /* Linux Specific */
#define __NR_stime 233 /* Linux Specific */
#define __NR_statfs64 234 /* Linux Specific */
#define __NR_fstatfs64 235 /* Linux Specific */
Expand Down
2 changes: 1 addition & 1 deletion trunk/include/asm-sparc64/unistd.h
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@
#ifdef __KERNEL__
#define __NR_time 231 /* Linux sparc32 */
#endif
#define __NR_sys_splice 232 /* Linux Specific */
#define __NR_splice 232 /* Linux Specific */
#define __NR_stime 233 /* Linux Specific */
#define __NR_statfs64 234 /* Linux Specific */
#define __NR_fstatfs64 235 /* Linux Specific */
Expand Down
4 changes: 2 additions & 2 deletions trunk/include/asm-x86_64/cache.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@
__attribute__((__section__(".data.page_aligned")))
#endif

#define __read_mostly __attribute__((__section__(".data.read_mostly")))

#endif

#define __read_mostly __attribute__((__section__(".data.read_mostly")))

#endif
1 change: 1 addition & 0 deletions trunk/include/asm-x86_64/cpufeature.h
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@
#define X86_FEATURE_REP_GOOD (3*32+ 4) /* rep microcode works well on this CPU */
#define X86_FEATURE_CONSTANT_TSC (3*32+5) /* TSC runs at constant rate */
#define X86_FEATURE_SYNC_RDTSC (3*32+6) /* RDTSC syncs CPU core */
#define X86_FEATURE_FXSAVE_LEAK (3*32+7) /* FIP/FOP/FDP leaks through FXSAVE */

/* Intel-defined CPU features, CPUID level 0x00000001 (ecx), word 4 */
#define X86_FEATURE_XMM3 (4*32+ 0) /* Streaming SIMD Extensions-3 */
Expand Down
Loading

0 comments on commit 73306a9

Please sign in to comment.