Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 72765
b: refs/heads/master
c: be5f1f2
h: refs/heads/master
i:
  72763: 64521fa
v: v3
  • Loading branch information
Kevin D. Kissell authored and Ralf Baechle committed Oct 29, 2007
1 parent 8da1a3c commit dcde5b5
Show file tree
Hide file tree
Showing 118 changed files with 1,125 additions and 3,174 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: db8185360d91c01f6e482db5ee402c0ad90dec52
refs/heads/master: be5f1f2114665508a722e3924a3a7f477c502841
19 changes: 0 additions & 19 deletions trunk/Documentation/scsi/link_power_management_policy.txt

This file was deleted.

57 changes: 44 additions & 13 deletions trunk/arch/mips/kernel/smtc.c
Original file line number Diff line number Diff line change
Expand Up @@ -88,11 +88,19 @@ unsigned int smtc_status = 0;

/* Boot command line configuration overrides */

static int vpe0limit;
static int ipibuffers = 0;
static int nostlb = 0;
static int asidmask = 0;
unsigned long smtc_asid_mask = 0xff;

static int __init vpe0tcs(char *str)
{
get_option(&str, &vpe0limit);

return 1;
}

static int __init ipibufs(char *str)
{
get_option(&str, &ipibuffers);
Expand Down Expand Up @@ -125,6 +133,7 @@ static int __init asidmask_set(char *str)
return 1;
}

__setup("vpe0tcs=", vpe0tcs);
__setup("ipibufs=", ipibufs);
__setup("nostlb", stlb_disable);
__setup("asidmask=", asidmask_set);
Expand Down Expand Up @@ -340,7 +349,7 @@ static void smtc_tc_setup(int vpe, int tc, int cpu)

void mipsmt_prepare_cpus(void)
{
int i, vpe, tc, ntc, nvpe, tcpervpe, slop, cpu;
int i, vpe, tc, ntc, nvpe, tcpervpe[NR_CPUS], slop, cpu;
unsigned long flags;
unsigned long val;
int nipi;
Expand Down Expand Up @@ -401,8 +410,39 @@ void mipsmt_prepare_cpus(void)
ntc = NR_CPUS;
if (tclimit > 0 && ntc > tclimit)
ntc = tclimit;
tcpervpe = ntc / nvpe;
slop = ntc % nvpe; /* Residual TCs, < NVPE */
slop = ntc % nvpe;
for (i = 0; i < nvpe; i++) {
tcpervpe[i] = ntc / nvpe;
if (slop) {
if((slop - i) > 0) tcpervpe[i]++;
}
}
/* Handle command line override for VPE0 */
if (vpe0limit > ntc) vpe0limit = ntc;
if (vpe0limit > 0) {
int slopslop;
if (vpe0limit < tcpervpe[0]) {
/* Reducing TC count - distribute to others */
slop = tcpervpe[0] - vpe0limit;
slopslop = slop % (nvpe - 1);
tcpervpe[0] = vpe0limit;
for (i = 1; i < nvpe; i++) {
tcpervpe[i] += slop / (nvpe - 1);
if(slopslop && ((slopslop - (i - 1) > 0)))
tcpervpe[i]++;
}
} else if (vpe0limit > tcpervpe[0]) {
/* Increasing TC count - steal from others */
slop = vpe0limit - tcpervpe[0];
slopslop = slop % (nvpe - 1);
tcpervpe[0] = vpe0limit;
for (i = 1; i < nvpe; i++) {
tcpervpe[i] -= slop / (nvpe - 1);
if(slopslop && ((slopslop - (i - 1) > 0)))
tcpervpe[i]--;
}
}
}

/* Set up shared TLB */
smtc_configure_tlb();
Expand All @@ -416,7 +456,7 @@ void mipsmt_prepare_cpus(void)
if (vpe != 0)
printk(", ");
printk("VPE %d: TC", vpe);
for (i = 0; i < tcpervpe; i++) {
for (i = 0; i < tcpervpe[vpe]; i++) {
/*
* TC 0 is bound to VPE 0 at reset,
* and is presumably executing this
Expand All @@ -429,15 +469,6 @@ void mipsmt_prepare_cpus(void)
printk(" %d", tc);
tc++;
}
if (slop) {
if (tc != 0) {
smtc_tc_setup(vpe, tc, cpu);
cpu++;
}
printk(" %d", tc);
tc++;
slop--;
}
if (vpe != 0) {
/*
* Clear any stale software interrupts from VPE's Cause
Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/um/Kconfig.i386
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
menu "Host processor type and features"

source "arch/x86/Kconfig.cpu"
source "arch/i386/Kconfig.cpu"

endmenu

Expand Down
5 changes: 3 additions & 2 deletions trunk/arch/um/Makefile-i386
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ ELF_ARCH := $(SUBARCH)
ELF_FORMAT := elf32-$(SUBARCH)
OBJCOPYFLAGS := -O binary -R .note -R .comment -S
HEADER_ARCH := x86
CHECKFLAGS += -D__i386__

ifeq ("$(origin SUBARCH)", "command line")
ifneq ("$(shell uname -m | sed -e s/i.86/i386/)", "$(SUBARCH)")
Expand All @@ -27,8 +26,10 @@ AFLAGS += -DCONFIG_X86_32
CONFIG_X86_32 := y
export CONFIG_X86_32

ARCH_KERNEL_DEFINES += -U__$(SUBARCH)__ -U$(SUBARCH)

# First of all, tune CFLAGS for the specific CPU. This actually sets cflags-y.
include $(srctree)/arch/x86/Makefile_32.cpu
include $(srctree)/arch/i386/Makefile.cpu

# prevent gcc from keeping the stack 16 byte aligned. Taken from i386.
cflags-y += $(call cc-option,-mpreferred-stack-boundary=2)
Expand Down
5 changes: 4 additions & 1 deletion trunk/arch/um/Makefile-x86_64
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,12 @@ START := 0x60000000

_extra_flags_ = -fno-builtin -m64

#We #undef __x86_64__ for kernelspace, not for userspace where
#it's needed for headers to work!
ARCH_KERNEL_DEFINES = -U__$(SUBARCH)__
KBUILD_CFLAGS += $(_extra_flags_)

CHECKFLAGS += -m64 -D__x86_64__
CHECKFLAGS += -m64
KBUILD_AFLAGS += -m64
LDFLAGS += -m elf_x86_64
KBUILD_CPPFLAGS += -m64
Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/um/kernel/mem.c
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ static void __init kmap_init(void)
kmap_prot = PAGE_KERNEL;
}

static void __init init_highmem(void)
static void init_highmem(void)
{
pgd_t *pgd;
pud_t *pud;
Expand Down
8 changes: 4 additions & 4 deletions trunk/arch/um/sys-i386/ptrace.c
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ int get_fpregs(struct user_i387_struct __user *buf, struct task_struct *child)
if (err)
return err;

n = copy_to_user(buf, fpregs, sizeof(fpregs));
n = copy_to_user((void *) buf, fpregs, sizeof(fpregs));
if(n > 0)
return -EFAULT;

Expand All @@ -168,7 +168,7 @@ int set_fpregs(struct user_i387_struct __user *buf, struct task_struct *child)
long fpregs[HOST_FP_SIZE];

BUG_ON(sizeof(*buf) != sizeof(fpregs));
n = copy_from_user(fpregs, buf, sizeof(fpregs));
n = copy_from_user(fpregs, (void *) buf, sizeof(fpregs));
if (n > 0)
return -EFAULT;

Expand All @@ -185,7 +185,7 @@ int get_fpxregs(struct user_fxsr_struct __user *buf, struct task_struct *child)
if (err)
return err;

n = copy_to_user(buf, fpregs, sizeof(fpregs));
n = copy_to_user((void *) buf, fpregs, sizeof(fpregs));
if(n > 0)
return -EFAULT;

Expand All @@ -198,7 +198,7 @@ int set_fpxregs(struct user_fxsr_struct __user *buf, struct task_struct *child)
long fpregs[HOST_XFP_SIZE];

BUG_ON(sizeof(*buf) != sizeof(fpregs));
n = copy_from_user(fpregs, buf, sizeof(fpregs));
n = copy_from_user(fpregs, (void *) buf, sizeof(fpregs));
if (n > 0)
return -EFAULT;

Expand Down
4 changes: 2 additions & 2 deletions trunk/arch/um/sys-x86_64/ptrace.c
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ int get_fpregs(struct user_i387_struct __user *buf, struct task_struct *child)
if (err)
return err;

n = copy_to_user(buf, fpregs, sizeof(fpregs));
n = copy_to_user((void *) buf, fpregs, sizeof(fpregs));
if(n > 0)
return -EFAULT;

Expand All @@ -167,7 +167,7 @@ int set_fpregs(struct user_i387_struct __user *buf, struct task_struct *child)
long fpregs[HOST_FP_SIZE];

BUG_ON(sizeof(*buf) != sizeof(fpregs));
n = copy_from_user(fpregs, buf, sizeof(fpregs));
n = copy_from_user(fpregs, (void *) buf, sizeof(fpregs));
if (n > 0)
return -EFAULT;

Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/x86/kernel/pci-gart_64.c
Original file line number Diff line number Diff line change
Expand Up @@ -435,7 +435,7 @@ static int gart_map_sg(struct device *dev, struct scatterlist *sg, int nents,

error:
flush_gart();
gart_unmap_sg(dev, sg, out, dir);
gart_unmap_sg(dev, sg, nents, dir);
/* When it was forced or merged try again in a dumb way */
if (force_iommu || iommu_merge) {
out = dma_map_sg_nonforce(dev, sg, nents, dir);
Expand Down
6 changes: 6 additions & 0 deletions trunk/arch/x86/mm/init_64.c
Original file line number Diff line number Diff line change
Expand Up @@ -728,6 +728,12 @@ int in_gate_area_no_task(unsigned long addr)
return (addr >= VSYSCALL_START) && (addr < VSYSCALL_END);
}

void * __init alloc_bootmem_high_node(pg_data_t *pgdat, unsigned long size)
{
return __alloc_bootmem_core(pgdat->bdata, size,
SMP_CACHE_BYTES, (4UL*1024*1024*1024), 0);
}

const char *arch_vma_name(struct vm_area_struct *vma)
{
if (vma->vm_mm && vma->vm_start == (long)vma->vm_mm->context.vdso)
Expand Down
7 changes: 2 additions & 5 deletions trunk/block/cfq-iosched.c
Original file line number Diff line number Diff line change
Expand Up @@ -1443,11 +1443,8 @@ cfq_get_queue(struct cfq_data *cfqd, int is_sync, struct task_struct *tsk,
cfqq = *async_cfqq;
}

if (!cfqq) {
if (!cfqq)
cfqq = cfq_find_alloc_queue(cfqd, is_sync, tsk, gfp_mask);
if (!cfqq)
return NULL;
}

/*
* pin the queue now that it's allocated, scheduler exit will prune it
Expand Down Expand Up @@ -2056,7 +2053,7 @@ static void cfq_shutdown_timer_wq(struct cfq_data *cfqd)
{
del_timer_sync(&cfqd->idle_slice_timer);
del_timer_sync(&cfqd->idle_class_timer);
kblockd_flush_work(&cfqd->unplug_work);
blk_sync_queue(cfqd->queue);
}

static void cfq_put_async_queues(struct cfq_data *cfqd)
Expand Down
2 changes: 1 addition & 1 deletion trunk/block/compat_ioctl.c
Original file line number Diff line number Diff line change
Expand Up @@ -581,7 +581,7 @@ static int compat_blkdev_driver_ioctl(struct inode *inode, struct file *file,
{
int ret;

switch (cmd) {
switch (arg) {
case HDIO_GET_UNMASKINTR:
case HDIO_GET_MULTCOUNT:
case HDIO_GET_KEEPSETTINGS:
Expand Down
Loading

0 comments on commit dcde5b5

Please sign in to comment.