Skip to content

Commit

Permalink
Merge branch 'master' of /pub/scm/linux/kernel/git/torvalds/linux-2.6
Browse files Browse the repository at this point in the history
  • Loading branch information
Steve French committed Jul 18, 2009
2 parents f6c4338 + a1cc1ba commit 287638b
Show file tree
Hide file tree
Showing 36 changed files with 175 additions and 88 deletions.
13 changes: 7 additions & 6 deletions Documentation/scheduler/sched-rt-group.txt
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ The remaining CPU time will be used for user input and other tasks. Because
realtime tasks have explicitly allocated the CPU time they need to perform
their tasks, buffer underruns in the graphics or audio can be eliminated.

NOTE: the above example is not fully implemented as of yet (2.6.25). We still
NOTE: the above example is not fully implemented yet. We still
lack an EDF scheduler to make non-uniform periods usable.


Expand Down Expand Up @@ -140,14 +140,15 @@ The other option is:

.o CONFIG_CGROUP_SCHED (aka "Basis for grouping tasks" = "Control groups")

This uses the /cgroup virtual file system and "/cgroup/<cgroup>/cpu.rt_runtime_us"
to control the CPU time reserved for each control group instead.
This uses the /cgroup virtual file system and
"/cgroup/<cgroup>/cpu.rt_runtime_us" to control the CPU time reserved for each
control group instead.

For more information on working with control groups, you should read
Documentation/cgroups/cgroups.txt as well.

Group settings are checked against the following limits in order to keep the configuration
schedulable:
Group settings are checked against the following limits in order to keep the
configuration schedulable:

\Sum_{i} runtime_{i} / global_period <= global_runtime / global_period

Expand Down Expand Up @@ -189,7 +190,7 @@ Implementing SCHED_EDF might take a while to complete. Priority Inheritance is
the biggest challenge as the current linux PI infrastructure is geared towards
the limited static priority levels 0-99. With deadline scheduling you need to
do deadline inheritance (since priority is inversely proportional to the
deadline delta (deadline - now).
deadline delta (deadline - now)).

This means the whole PI machinery will have to be reworked - and that is one of
the most complex pieces of code we have.
3 changes: 2 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -343,7 +343,8 @@ KBUILD_CPPFLAGS := -D__KERNEL__
KBUILD_CFLAGS := -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs \
-fno-strict-aliasing -fno-common \
-Werror-implicit-function-declaration \
-Wno-format-security
-Wno-format-security \
-fno-delete-null-pointer-checks
KBUILD_AFLAGS := -D__ASSEMBLY__

# Read KERNELRELEASE from include/config/kernel.release (if it exists)
Expand Down
2 changes: 2 additions & 0 deletions arch/ia64/include/asm/fpu.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
* David Mosberger-Tang <davidm@hpl.hp.com>
*/

#include <linux/types.h>

/* floating point status register: */
#define FPSR_TRAP_VD (1 << 0) /* invalid op trap disabled */
#define FPSR_TRAP_DD (1 << 1) /* denormal trap disabled */
Expand Down
1 change: 1 addition & 0 deletions arch/ia64/include/asm/xen/hypervisor.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
#ifndef _ASM_IA64_XEN_HYPERVISOR_H
#define _ASM_IA64_XEN_HYPERVISOR_H

#include <linux/err.h>
#include <xen/interface/xen.h>
#include <xen/interface/version.h> /* to compile feature.c */
#include <xen/features.h> /* to comiple xen-netfront.c */
Expand Down
8 changes: 8 additions & 0 deletions arch/ia64/kernel/dma-mapping.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,14 @@ int iommu_detected __read_mostly;
struct dma_map_ops *dma_ops;
EXPORT_SYMBOL(dma_ops);

#define PREALLOC_DMA_DEBUG_ENTRIES (1 << 16)

static int __init dma_init(void)
{
dma_debug_init(PREALLOC_DMA_DEBUG_ENTRIES);
}
fs_initcall(dma_init);

struct dma_map_ops *dma_get_ops(struct device *dev)
{
return dma_ops;
Expand Down
17 changes: 9 additions & 8 deletions arch/powerpc/kernel/ptrace.c
Original file line number Diff line number Diff line change
Expand Up @@ -736,15 +736,16 @@ void user_disable_single_step(struct task_struct *task)
{
struct pt_regs *regs = task->thread.regs;


#if defined(CONFIG_BOOKE)
/* If DAC then do not single step, skip */
if (task->thread.dabr)
return;
#endif

if (regs != NULL) {
#if defined(CONFIG_40x) || defined(CONFIG_BOOKE)
#if defined(CONFIG_BOOKE)
/* If DAC don't clear DBCRO_IDM or MSR_DE */
if (task->thread.dabr)
task->thread.dbcr0 &= ~(DBCR0_IC | DBCR0_BT);
else {
task->thread.dbcr0 &= ~(DBCR0_IC | DBCR0_BT | DBCR0_IDM);
regs->msr &= ~MSR_DE;
}
#elif defined(CONFIG_40x)
task->thread.dbcr0 &= ~(DBCR0_IC | DBCR0_BT | DBCR0_IDM);
regs->msr &= ~MSR_DE;
#else
Expand Down
6 changes: 3 additions & 3 deletions arch/powerpc/kernel/vector.S
Original file line number Diff line number Diff line change
Expand Up @@ -80,10 +80,10 @@ _GLOBAL(load_up_altivec)
mtvscr vr0
REST_32VRS(0,r4,r5)
#ifndef CONFIG_SMP
/* Update last_task_used_math to 'current' */
/* Update last_task_used_altivec to 'current' */
subi r4,r5,THREAD /* Back to 'current' */
fromreal(r4)
PPC_STL r4,ADDROFF(last_task_used_math)(r3)
PPC_STL r4,ADDROFF(last_task_used_altivec)(r3)
#endif /* CONFIG_SMP */
/* restore registers and return */
blr
Expand Down Expand Up @@ -172,7 +172,7 @@ _GLOBAL(load_up_vsx)
oris r12,r12,MSR_VSX@h
std r12,_MSR(r1)
#ifndef CONFIG_SMP
/* Update last_task_used_math to 'current' */
/* Update last_task_used_vsx to 'current' */
ld r4,PACACURRENT(r13)
std r4,0(r3)
#endif /* CONFIG_SMP */
Expand Down
2 changes: 2 additions & 0 deletions arch/x86/include/asm/io_apic.h
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,7 @@ extern int io_apic_set_pci_routing(struct device *dev, int irq,
struct io_apic_irq_attr *irq_attr);
extern int (*ioapic_renumber_irq)(int ioapic, int irq);
extern void ioapic_init_mappings(void);
extern void ioapic_insert_resources(void);

extern struct IO_APIC_route_entry **alloc_ioapic_entries(void);
extern void free_ioapic_entries(struct IO_APIC_route_entry **ioapic_entries);
Expand All @@ -180,6 +181,7 @@ extern void ioapic_write_entry(int apic, int pin,
#define io_apic_assign_pci_irqs 0
static const int timer_through_8259 = 0;
static inline void ioapic_init_mappings(void) { }
static inline void ioapic_insert_resources(void) { }

static inline void probe_nr_irqs_gsi(void) { }
#endif
Expand Down
2 changes: 1 addition & 1 deletion arch/x86/include/asm/lguest_hcall.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
#include <asm/hw_irq.h>
#include <asm/kvm_para.h>

/*G:031 But first, how does our Guest contact the Host to ask for privileged
/*G:030 But first, how does our Guest contact the Host to ask for privileged
* operations? There are two ways: the direct way is to make a "hypercall",
* to make requests of the Host Itself.
*
Expand Down
14 changes: 3 additions & 11 deletions arch/x86/kernel/apic/io_apic.c
Original file line number Diff line number Diff line change
Expand Up @@ -4181,28 +4181,20 @@ void __init ioapic_init_mappings(void)
}
}

static int __init ioapic_insert_resources(void)
void __init ioapic_insert_resources(void)
{
int i;
struct resource *r = ioapic_resources;

if (!r) {
if (nr_ioapics > 0) {
if (nr_ioapics > 0)
printk(KERN_ERR
"IO APIC resources couldn't be allocated.\n");
return -1;
}
return 0;
return;
}

for (i = 0; i < nr_ioapics; i++) {
insert_resource(&iomem_resource, r);
r++;
}

return 0;
}

/* Insert the IO APIC resources after PCI initialization has occured to handle
* IO APICS that are mapped in on a BAR in PCI space. */
late_initcall(ioapic_insert_resources);
7 changes: 6 additions & 1 deletion arch/x86/lguest/boot.c
Original file line number Diff line number Diff line change
Expand Up @@ -379,6 +379,11 @@ static void lguest_cpuid(unsigned int *ax, unsigned int *bx,

native_cpuid(ax, bx, cx, dx);
switch (function) {
case 0: /* ID and highest CPUID. Futureproof a little by sticking to
* older ones. */
if (*ax > 5)
*ax = 5;
break;
case 1: /* Basic feature request. */
/* We only allow kernel to see SSE3, CMPXCHG16B and SSSE3 */
*cx &= 0x00002201;
Expand Down Expand Up @@ -1079,7 +1084,7 @@ static unsigned lguest_patch(u8 type, u16 clobber, void *ibuf,
return insn_len;
}

/*G:030 Once we get to lguest_init(), we know we're a Guest. The various
/*G:029 Once we get to lguest_init(), we know we're a Guest. The various
* pv_ops structures in the kernel provide points for (almost) every routine we
* have to override to avoid privileged instructions. */
__init void lguest_init(void)
Expand Down
7 changes: 7 additions & 0 deletions arch/x86/pci/i386.c
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
#include <asm/pat.h>
#include <asm/e820.h>
#include <asm/pci_x86.h>
#include <asm/io_apic.h>


static int
Expand Down Expand Up @@ -227,6 +228,12 @@ void __init pcibios_resource_survey(void)
pcibios_allocate_resources(1);

e820_reserve_resources_late();
/*
* Insert the IO APIC resources after PCI initialization has
* occured to handle IO APICS that are mapped in on a BAR in
* PCI space, but before trying to assign unassigned pci res.
*/
ioapic_insert_resources();
}

/**
Expand Down
5 changes: 4 additions & 1 deletion drivers/block/virtio_blk.c
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ static int virtblk_ioctl(struct block_device *bdev, fmode_t mode,
* Only allow the generic SCSI ioctls if the host can support it.
*/
if (!virtio_has_feature(vblk->vdev, VIRTIO_BLK_F_SCSI))
return -ENOIOCTLCMD;
return -ENOTTY;

return scsi_cmd_ioctl(disk->queue, disk, mode, cmd, argp);
}
Expand Down Expand Up @@ -360,6 +360,9 @@ static int __devinit virtblk_probe(struct virtio_device *vdev)
blk_queue_max_phys_segments(vblk->disk->queue, vblk->sg_elems-2);
blk_queue_max_hw_segments(vblk->disk->queue, vblk->sg_elems-2);

/* No need to bounce any requests */
blk_queue_bounce_limit(vblk->disk->queue, BLK_BOUNCE_ANY);

/* No real sector limit. */
blk_queue_max_sectors(vblk->disk->queue, -1U);

Expand Down
3 changes: 0 additions & 3 deletions drivers/char/n_tty.c
Original file line number Diff line number Diff line change
Expand Up @@ -1331,9 +1331,6 @@ static inline void n_tty_receive_char(struct tty_struct *tty, unsigned char c)

static void n_tty_write_wakeup(struct tty_struct *tty)
{
/* Write out any echoed characters that are still pending */
process_echoes(tty);

if (tty->fasync && test_and_clear_bit(TTY_DO_WRITE_WAKEUP, &tty->flags))
kill_fasync(&tty->fasync, SIGIO, POLL_OUT);
}
Expand Down
12 changes: 8 additions & 4 deletions drivers/char/nozomi.c
Original file line number Diff line number Diff line change
Expand Up @@ -828,7 +828,7 @@ static int receive_data(enum port_type index, struct nozomi *dc)
struct port *port = &dc->port[index];
void __iomem *addr = port->dl_addr[port->toggle_dl];
struct tty_struct *tty = tty_port_tty_get(&port->port);
int i;
int i, ret;

if (unlikely(!tty)) {
DBG1("tty not open for port: %d?", index);
Expand All @@ -844,12 +844,14 @@ static int receive_data(enum port_type index, struct nozomi *dc)

/* disable interrupt in downlink... */
disable_transmit_dl(index, dc);
return 0;
ret = 0;
goto put;
}

if (unlikely(size == 0)) {
dev_err(&dc->pdev->dev, "size == 0?\n");
return 1;
ret = 1;
goto put;
}

tty_buffer_request_room(tty, size);
Expand All @@ -871,8 +873,10 @@ static int receive_data(enum port_type index, struct nozomi *dc)
}

set_bit(index, &dc->flip);
ret = 1;
put:
tty_kref_put(tty);
return 1;
return ret;
}

/* Debug for interrupts */
Expand Down
25 changes: 15 additions & 10 deletions drivers/char/tty_ldisc.c
Original file line number Diff line number Diff line change
Expand Up @@ -790,17 +790,20 @@ void tty_ldisc_hangup(struct tty_struct *tty)
* N_TTY.
*/
if (tty->driver->flags & TTY_DRIVER_RESET_TERMIOS) {
/* Avoid racing set_ldisc */
/* Avoid racing set_ldisc or tty_ldisc_release */
mutex_lock(&tty->ldisc_mutex);
/* Switch back to N_TTY */
tty_ldisc_halt(tty);
tty_ldisc_wait_idle(tty);
tty_ldisc_reinit(tty);
/* At this point we have a closed ldisc and we want to
reopen it. We could defer this to the next open but
it means auditing a lot of other paths so this is a FIXME */
WARN_ON(tty_ldisc_open(tty, tty->ldisc));
tty_ldisc_enable(tty);
if (tty->ldisc) { /* Not yet closed */
/* Switch back to N_TTY */
tty_ldisc_halt(tty);
tty_ldisc_wait_idle(tty);
tty_ldisc_reinit(tty);
/* At this point we have a closed ldisc and we want to
reopen it. We could defer this to the next open but
it means auditing a lot of other paths so this is
a FIXME */
WARN_ON(tty_ldisc_open(tty, tty->ldisc));
tty_ldisc_enable(tty);
}
mutex_unlock(&tty->ldisc_mutex);
tty_reset_termios(tty);
}
Expand Down Expand Up @@ -865,6 +868,7 @@ void tty_ldisc_release(struct tty_struct *tty, struct tty_struct *o_tty)

tty_ldisc_wait_idle(tty);

mutex_lock(&tty->ldisc_mutex);
/*
* Now kill off the ldisc
*/
Expand All @@ -875,6 +879,7 @@ void tty_ldisc_release(struct tty_struct *tty, struct tty_struct *o_tty)

/* Ensure the next open requests the N_TTY ldisc */
tty_set_termios_ldisc(tty, N_TTY);
mutex_unlock(&tty->ldisc_mutex);

/* This will need doing differently if we need to lock */
if (o_tty)
Expand Down
2 changes: 1 addition & 1 deletion drivers/char/tty_port.c
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@ int tty_port_block_til_ready(struct tty_port *port,
if (retval == 0)
port->flags |= ASYNC_NORMAL_ACTIVE;
spin_unlock_irqrestore(&port->lock, flags);
return 0;
return retval;

}
EXPORT_SYMBOL(tty_port_block_til_ready);
Expand Down
12 changes: 3 additions & 9 deletions drivers/char/vt.c
Original file line number Diff line number Diff line change
Expand Up @@ -770,14 +770,12 @@ int vc_allocate(unsigned int currcons) /* return 0 on success */
visual_init(vc, currcons, 1);
if (!*vc->vc_uni_pagedir_loc)
con_set_default_unimap(vc);
if (!vc->vc_kmalloced)
vc->vc_screenbuf = kmalloc(vc->vc_screenbuf_size, GFP_KERNEL);
vc->vc_screenbuf = kmalloc(vc->vc_screenbuf_size, GFP_KERNEL);
if (!vc->vc_screenbuf) {
kfree(vc);
vc_cons[currcons].d = NULL;
return -ENOMEM;
}
vc->vc_kmalloced = 1;
vc_init(vc, vc->vc_rows, vc->vc_cols, 1);
vcs_make_sysfs(currcons);
atomic_notifier_call_chain(&vt_notifier_list, VT_ALLOCATE, &param);
Expand Down Expand Up @@ -913,10 +911,8 @@ static int vc_do_resize(struct tty_struct *tty, struct vc_data *vc,
if (new_scr_end > new_origin)
scr_memsetw((void *)new_origin, vc->vc_video_erase_char,
new_scr_end - new_origin);
if (vc->vc_kmalloced)
kfree(vc->vc_screenbuf);
kfree(vc->vc_screenbuf);
vc->vc_screenbuf = newscreen;
vc->vc_kmalloced = 1;
vc->vc_screenbuf_size = new_screen_size;
set_origin(vc);

Expand Down Expand Up @@ -995,8 +991,7 @@ void vc_deallocate(unsigned int currcons)
vc->vc_sw->con_deinit(vc);
put_pid(vc->vt_pid);
module_put(vc->vc_sw->owner);
if (vc->vc_kmalloced)
kfree(vc->vc_screenbuf);
kfree(vc->vc_screenbuf);
if (currcons >= MIN_NR_CONSOLES)
kfree(vc);
vc_cons[currcons].d = NULL;
Expand Down Expand Up @@ -2881,7 +2876,6 @@ static int __init con_init(void)
INIT_WORK(&vc_cons[currcons].SAK_work, vc_SAK);
visual_init(vc, currcons, 1);
vc->vc_screenbuf = kzalloc(vc->vc_screenbuf_size, GFP_NOWAIT);
vc->vc_kmalloced = 0;
vc_init(vc, vc->vc_rows, vc->vc_cols,
currcons || !vc->vc_sw->con_save_screen);
}
Expand Down
Loading

0 comments on commit 287638b

Please sign in to comment.