Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 15224
b: refs/heads/master
c: 23cb3ad
h: refs/heads/master
v: v3
  • Loading branch information
Linus Torvalds committed Dec 19, 2005
1 parent b887493 commit 7fbf169
Show file tree
Hide file tree
Showing 25 changed files with 167 additions and 88 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: 16e842a62a8ffcc2e51def6ef9fd6e0926539bc5
refs/heads/master: 23cb3ada1b011f708ff881b66b2cfb6c11068fa5
2 changes: 1 addition & 1 deletion trunk/arch/ia64/configs/sn2_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ CONFIG_IOSAPIC=y
CONFIG_IA64_SGI_SN_XP=m
CONFIG_FORCE_MAX_ZONEORDER=17
CONFIG_SMP=y
CONFIG_NR_CPUS=512
CONFIG_NR_CPUS=1024
# CONFIG_HOTPLUG_CPU is not set
CONFIG_SCHED_SMT=y
CONFIG_PREEMPT=y
Expand Down
29 changes: 29 additions & 0 deletions trunk/arch/ia64/kernel/time.c
Original file line number Diff line number Diff line change
Expand Up @@ -249,3 +249,32 @@ time_init (void)
*/
set_normalized_timespec(&wall_to_monotonic, -xtime.tv_sec, -xtime.tv_nsec);
}

#define SMALLUSECS 100

void
udelay (unsigned long usecs)
{
unsigned long start;
unsigned long cycles;
unsigned long smallusecs;

/*
* Execute the non-preemptible delay loop (because the ITC might
* not be synchronized between CPUS) in relatively short time
* chunks, allowing preemption between the chunks.
*/
while (usecs > 0) {
smallusecs = (usecs > SMALLUSECS) ? SMALLUSECS : usecs;
preempt_disable();
cycles = smallusecs*local_cpu_data->cyc_per_usec;
start = ia64_get_itc();

while (ia64_get_itc() - start < cycles)
cpu_relax();

preempt_enable();
usecs -= smallusecs;
}
}
EXPORT_SYMBOL(udelay);
6 changes: 3 additions & 3 deletions trunk/arch/ia64/kernel/uncached.c
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ static void uncached_ipi_visibility(void *data)
if ((status != PAL_VISIBILITY_OK) &&
(status != PAL_VISIBILITY_OK_REMOTE_NEEDED))
printk(KERN_DEBUG "pal_prefetch_visibility() returns %i on "
"CPU %i\n", status, get_cpu());
"CPU %i\n", status, raw_smp_processor_id());
}


Expand All @@ -63,7 +63,7 @@ static void uncached_ipi_mc_drain(void *data)
status = ia64_pal_mc_drain();
if (status)
printk(KERN_WARNING "ia64_pal_mc_drain() failed with %i on "
"CPU %i\n", status, get_cpu());
"CPU %i\n", status, raw_smp_processor_id());
}


Expand Down Expand Up @@ -105,7 +105,7 @@ uncached_get_new_chunk(struct gen_pool *poolp)
status = ia64_pal_prefetch_visibility(PAL_VISIBILITY_PHYSICAL);

dprintk(KERN_INFO "pal_prefetch_visibility() returns %i on cpu %i\n",
status, get_cpu());
status, raw_smp_processor_id());

if (!status) {
status = smp_call_function(uncached_ipi_visibility, NULL, 0, 1);
Expand Down
3 changes: 3 additions & 0 deletions trunk/arch/ia64/kernel/vmlinux.lds.S
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,9 @@ SECTIONS
}
. = ALIGN(PAGE_SIZE); /* make sure the gate page doesn't expose kernel data */

.data.read_mostly : AT(ADDR(.data.read_mostly) - LOAD_OFFSET)
{ *(.data.read_mostly) }

.data.cacheline_aligned : AT(ADDR(.data.cacheline_aligned) - LOAD_OFFSET)
{ *(.data.cacheline_aligned) }

Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/ia64/sn/kernel/sn2/sn2_smp.c
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ sn2_global_tlb_purge(struct mm_struct *mm, unsigned long start,
unsigned long end, unsigned long nbits)
{
int i, opt, shub1, cnode, mynasid, cpu, lcpu = 0, nasid, flushed = 0;
int mymm = (mm == current->active_mm);
int mymm = (mm == current->active_mm && current->mm);
volatile unsigned long *ptc0, *ptc1;
unsigned long itc, itc2, flags, data0 = 0, data1 = 0, rr_value;
short nasids[MAX_NUMNODES], nix;
Expand Down
1 change: 1 addition & 0 deletions trunk/arch/ppc/syslib/ppc4xx_dma.c
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@

#include <asm/system.h>
#include <asm/io.h>
#include <asm/dma.h>
#include <asm/ppc4xx_dma.h>

ppc_dma_ch_t dma_channels[MAX_PPC4xx_DMA_CHANNELS];
Expand Down
2 changes: 2 additions & 0 deletions trunk/arch/um/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -289,6 +289,8 @@ source "arch/um/Kconfig.net"

source "drivers/net/Kconfig"

source "drivers/connector/Kconfig"

source "fs/Kconfig"

source "security/Kconfig"
Expand Down
4 changes: 4 additions & 0 deletions trunk/arch/um/Makefile-x86_64
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,7 @@ CHECKFLAGS += -m64

ELF_ARCH := i386:x86-64
ELF_FORMAT := elf64-x86-64

# Not on all 64-bit distros /lib is a symlink to /lib64. PLD is an example.

LINK-$(CONFIG_LD_SCRIPT_DYN) += -Wl,-rpath,/lib64
29 changes: 16 additions & 13 deletions trunk/arch/um/include/sysdep-i386/stub.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,12 @@
#ifndef __SYSDEP_STUB_H
#define __SYSDEP_STUB_H

#include <sys/mman.h>
#include <asm/ptrace.h>
#include <asm/unistd.h>
#include "stub-data.h"
#include "kern_constants.h"
#include "uml-config.h"

extern void stub_segv_handler(int sig);
extern void stub_clone_handler(void);
Expand Down Expand Up @@ -76,23 +80,22 @@ static inline long stub_syscall5(long syscall, long arg1, long arg2, long arg3,
return ret;
}

static inline long stub_syscall6(long syscall, long arg1, long arg2, long arg3,
long arg4, long arg5, long arg6)
static inline void trap_myself(void)
{
long ret;

__asm__ volatile ("push %%ebp ; movl %%eax,%%ebp ; movl %1,%%eax ; "
"int $0x80 ; pop %%ebp"
: "=a" (ret)
: "g" (syscall), "b" (arg1), "c" (arg2), "d" (arg3),
"S" (arg4), "D" (arg5), "0" (arg6));

return ret;
__asm("int3");
}

static inline void trap_myself(void)
static inline void remap_stack(int fd, unsigned long offset)
{
__asm("int3");
__asm__ volatile ("movl %%eax,%%ebp ; movl %0,%%eax ; int $0x80 ;"
"movl %7, %%ebx ; movl %%eax, (%%ebx)"
: : "g" (STUB_MMAP_NR), "b" (UML_CONFIG_STUB_DATA),
"c" (UM_KERN_PAGE_SIZE),
"d" (PROT_READ | PROT_WRITE),
"S" (MAP_FIXED | MAP_SHARED), "D" (fd),
"a" (offset),
"i" (&((struct stub_data *) UML_CONFIG_STUB_DATA)->err)
: "memory");
}

#endif
30 changes: 17 additions & 13 deletions trunk/arch/um/include/sysdep-x86_64/stub.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,12 @@
#ifndef __SYSDEP_STUB_H
#define __SYSDEP_STUB_H

#include <sys/mman.h>
#include <asm/unistd.h>
#include <sysdep/ptrace_user.h>
#include "stub-data.h"
#include "kern_constants.h"
#include "uml-config.h"

extern void stub_segv_handler(int sig);
extern void stub_clone_handler(void);
Expand Down Expand Up @@ -81,23 +85,23 @@ static inline long stub_syscall5(long syscall, long arg1, long arg2, long arg3,
return ret;
}

static inline long stub_syscall6(long syscall, long arg1, long arg2, long arg3,
long arg4, long arg5, long arg6)
static inline void trap_myself(void)
{
long ret;

__asm__ volatile ("movq %5,%%r10 ; movq %6,%%r8 ; "
"movq %7, %%r9; " __syscall : "=a" (ret)
: "0" (syscall), "D" (arg1), "S" (arg2), "d" (arg3),
"g" (arg4), "g" (arg5), "g" (arg6)
: __syscall_clobber, "r10", "r8", "r9" );

return ret;
__asm("int3");
}

static inline void trap_myself(void)
static inline void remap_stack(long fd, unsigned long offset)
{
__asm("int3");
__asm__ volatile ("movq %4,%%r10 ; movq %5,%%r8 ; "
"movq %6, %%r9; " __syscall "; movq %7, %%rbx ; "
"movq %%rax, (%%rbx)":
: "a" (STUB_MMAP_NR), "D" (UML_CONFIG_STUB_DATA),
"S" (UM_KERN_PAGE_SIZE),
"d" (PROT_READ | PROT_WRITE),
"g" (MAP_FIXED | MAP_SHARED), "g" (fd),
"g" (offset),
"i" (&((struct stub_data *) UML_CONFIG_STUB_DATA)->err)
: __syscall_clobber, "r10", "r8", "r9" );
}

#endif
23 changes: 13 additions & 10 deletions trunk/arch/um/kernel/skas/clone.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,10 @@
* on some systems.
*/

#define STUB_DATA(field) (((struct stub_data *) UML_CONFIG_STUB_DATA)->field)

void __attribute__ ((__section__ (".__syscall_stub")))
stub_clone_handler(void)
{
struct stub_data *data = (struct stub_data *) UML_CONFIG_STUB_DATA;
long err;

err = stub_syscall2(__NR_clone, CLONE_PARENT | CLONE_FILES | SIGCHLD,
Expand All @@ -35,17 +34,21 @@ stub_clone_handler(void)
if(err)
goto out;

err = stub_syscall3(__NR_setitimer, ITIMER_VIRTUAL,
(long) &STUB_DATA(timer), 0);
err = stub_syscall3(__NR_setitimer, ITIMER_VIRTUAL,
(long) &data->timer, 0);
if(err)
goto out;

err = stub_syscall6(STUB_MMAP_NR, UML_CONFIG_STUB_DATA,
UM_KERN_PAGE_SIZE, PROT_READ | PROT_WRITE,
MAP_FIXED | MAP_SHARED, STUB_DATA(fd),
STUB_DATA(offset));
remap_stack(data->fd, data->offset);
goto done;

out:
/* save current result. Parent: pid; child: retcode of mmap */
STUB_DATA(err) = err;
/* save current result.
* Parent: pid;
* child: retcode of mmap already saved and it jumps around this
* assignment
*/
data->err = err;
done:
trap_myself();
}
5 changes: 0 additions & 5 deletions trunk/arch/um/scripts/Makefile.rules
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,6 @@ define unprofile
endef


# The stubs and unmap.o can't try to call mcount or update basic block data
define unprofile
$(patsubst -pg,,$(patsubst -fprofile-arcs -ftest-coverage,,$(1)))
endef

# cmd_make_link checks to see if the $(foo-dir) variable starts with a /. If
# so, it's considered to be a path relative to $(srcdir) rather than
# $(srcdir)/arch/$(SUBARCH). This is because x86_64 wants to get ldt.c from
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/char/drm/radeon_cp.c
Original file line number Diff line number Diff line change
Expand Up @@ -1311,7 +1311,7 @@ static void radeon_set_pcigart(drm_radeon_private_t * dev_priv, int on)

static int radeon_do_init_cp(drm_device_t * dev, drm_radeon_init_t * init)
{
drm_radeon_private_t *dev_priv = dev->dev_private;;
drm_radeon_private_t *dev_priv = dev->dev_private;
unsigned int mem_size;

DRM_DEBUG("\n");
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/char/watchdog/booke_wdt.c
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ static int __init booke_wdt_init(void)
int ret = 0;

printk (KERN_INFO "PowerPC Book-E Watchdog Timer Loaded\n");
ident.firmware_version = cpu_specs[0].pvr_value;
ident.firmware_version = cur_cpu_spec->pvr_value;

ret = misc_register(&booke_wdt_miscdev);
if (ret) {
Expand Down
6 changes: 5 additions & 1 deletion trunk/drivers/message/i2o/pci.c
Original file line number Diff line number Diff line change
Expand Up @@ -303,6 +303,7 @@ static int __devinit i2o_pci_probe(struct pci_dev *pdev,
struct i2o_controller *c;
int rc;
struct pci_dev *i960 = NULL;
int pci_dev_busy = 0;

printk(KERN_INFO "i2o: Checking for PCI I2O controllers...\n");

Expand Down Expand Up @@ -395,6 +396,8 @@ static int __devinit i2o_pci_probe(struct pci_dev *pdev,
if ((rc = i2o_pci_alloc(c))) {
printk(KERN_ERR "%s: DMA / IO allocation for I2O controller "
" failed\n", c->name);
if (rc == -ENODEV)
pci_dev_busy = 1;
goto free_controller;
}

Expand Down Expand Up @@ -425,7 +428,8 @@ static int __devinit i2o_pci_probe(struct pci_dev *pdev,
i2o_iop_free(c);

disable:
pci_disable_device(pdev);
if (!pci_dev_busy)
pci_disable_device(pdev);

return rc;
}
Expand Down
4 changes: 2 additions & 2 deletions trunk/drivers/mtd/onenand/generic.c
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@
* This is a device driver for the OneNAND flash for generic boards.
*/

#include <linux/device.h>
#include <linux/module.h>
#include <linux/init.h>
#include <linux/platform_device.h>
#include <linux/mtd/mtd.h>
#include <linux/mtd/onenand.h>
#include <linux/mtd/partitions.h>
Expand All @@ -39,7 +39,7 @@ static int __devinit generic_onenand_probe(struct device *dev)
{
struct onenand_info *info;
struct platform_device *pdev = to_platform_device(dev);
struct onenand_platform_data *pdata = pdev->dev.platform_data;
struct flash_platform_data *pdata = pdev->dev.platform_data;
struct resource *res = pdev->resource;
unsigned long size = res->end - res->start + 1;
int err;
Expand Down
Loading

0 comments on commit 7fbf169

Please sign in to comment.