Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 15226
b: refs/heads/master
c: 567bd98
h: refs/heads/master
v: v3
  • Loading branch information
Russell King authored and Russell King committed Dec 17, 2005
1 parent c874d27 commit 3f641fc
Show file tree
Hide file tree
Showing 20 changed files with 87 additions and 208 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: df7addbb45874f0f992266003155de5a22e1872f
refs/heads/master: 567bd98017d9c9f2ac1c148ddc78c062e8abd398
4 changes: 2 additions & 2 deletions trunk/Makefile
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
VERSION = 2
PATCHLEVEL = 6
SUBLEVEL = 15
EXTRAVERSION =-rc6
NAME=Sliding Snow Leopard
EXTRAVERSION =-rc5
NAME=Affluent Albatross

# *DOCUMENTATION*
# To see a list of typical targets execute "make help"
Expand Down
8 changes: 4 additions & 4 deletions trunk/arch/arm/kernel/calls.S
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ __syscall_start:
.long sys_wait4
/* 115 */ .long sys_swapoff
.long sys_sysinfo
.long sys_ipc_wrapper
.long sys_ipc
.long sys_fsync
.long sys_sigreturn_wrapper
/* 120 */ .long sys_clone_wrapper
Expand Down Expand Up @@ -254,7 +254,7 @@ __syscall_start:
.long sys_fremovexattr
.long sys_tkill
.long sys_sendfile64
/* 240 */ .long sys_futex_wrapper
/* 240 */ .long sys_futex
.long sys_sched_setaffinity
.long sys_sched_getaffinity
.long sys_io_setup
Expand Down Expand Up @@ -284,7 +284,7 @@ __syscall_start:
.long sys_fstatfs64
.long sys_tgkill
.long sys_utimes
/* 270 */ .long sys_arm_fadvise64_64_wrapper
/* 270 */ .long sys_arm_fadvise64_64
.long sys_pciconfig_iobase
.long sys_pciconfig_read
.long sys_pciconfig_write
Expand Down Expand Up @@ -333,7 +333,7 @@ __syscall_start:
.long sys_inotify_init
.long sys_inotify_add_watch
.long sys_inotify_rm_watch
.long sys_mbind_wrapper
.long sys_mbind
/* 320 */ .long sys_get_mempolicy
.long sys_set_mempolicy
__syscall_end:
Expand Down
20 changes: 2 additions & 18 deletions trunk/arch/arm/kernel/entry-common.S
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ ENTRY(vector_swi)
#endif
enable_irq

str r4, [sp, #-S_OFF]! @ push fifth arg
stmdb sp!, {r4, r5} @ push fifth and sixth args

get_thread_info tsk
ldr ip, [tsk, #TI_FLAGS] @ check for syscall tracing
Expand Down Expand Up @@ -204,7 +204,7 @@ ENTRY(sys_call_table)
* Special system call wrappers
*/
@ r0 = syscall number
@ r5 = syscall table
@ r8 = syscall table
.type sys_syscall, #function
sys_syscall:
eor scno, r0, #__NR_SYSCALL_BASE
Expand Down Expand Up @@ -255,22 +255,6 @@ sys_sigaltstack_wrapper:
ldr r2, [sp, #S_OFF + S_SP]
b do_sigaltstack

sys_futex_wrapper:
str r5, [sp, #4] @ push sixth arg
b sys_futex

sys_arm_fadvise64_64_wrapper:
str r5, [sp, #4] @ push r5 to stack
b sys_arm_fadvise64_64

sys_mbind_wrapper:
str r5, [sp, #4]
b sys_mbind

sys_ipc_wrapper:
str r5, [sp, #4] @ push sixth arg
b sys_ipc

/*
* Note: off_4k (r5) is always units of 4K. If we can't do the requested
* offset, we return EINVAL.
Expand Down
2 changes: 0 additions & 2 deletions trunk/arch/um/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -289,8 +289,6 @@ source "arch/um/Kconfig.net"

source "drivers/net/Kconfig"

source "drivers/connector/Kconfig"

source "fs/Kconfig"

source "security/Kconfig"
Expand Down
4 changes: 0 additions & 4 deletions trunk/arch/um/Makefile-x86_64
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,3 @@ 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: 13 additions & 16 deletions trunk/arch/um/include/sysdep-i386/stub.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,8 @@
#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 @@ -80,22 +76,23 @@ static inline long stub_syscall5(long syscall, long arg1, long arg2, long arg3,
return ret;
}

static inline void trap_myself(void)
static inline long stub_syscall6(long syscall, long arg1, long arg2, long arg3,
long arg4, long arg5, long arg6)
{
__asm("int3");
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;
}

static inline void remap_stack(int fd, unsigned long offset)
static inline void trap_myself(void)
{
__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");
__asm("int3");
}

#endif
30 changes: 13 additions & 17 deletions trunk/arch/um/include/sysdep-x86_64/stub.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,8 @@
#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 @@ -85,23 +81,23 @@ static inline long stub_syscall5(long syscall, long arg1, long arg2, long arg3,
return ret;
}

static inline void trap_myself(void)
static inline long stub_syscall6(long syscall, long arg1, long arg2, long arg3,
long arg4, long arg5, long arg6)
{
__asm("int3");
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;
}

static inline void remap_stack(long fd, unsigned long offset)
static inline void trap_myself(void)
{
__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" );
__asm("int3");
}

#endif
23 changes: 10 additions & 13 deletions trunk/arch/um/kernel/skas/clone.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,11 @@
* 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 @@ -34,21 +35,17 @@ stub_clone_handler(void)
if(err)
goto out;

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

remap_stack(data->fd, data->offset);
goto done;

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));
out:
/* save current result.
* Parent: pid;
* child: retcode of mmap already saved and it jumps around this
* assignment
*/
data->err = err;
done:
/* save current result. Parent: pid; child: retcode of mmap */
STUB_DATA(err) = err;
trap_myself();
}
5 changes: 5 additions & 0 deletions trunk/arch/um/scripts/Makefile.rules
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,11 @@ 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
1 change: 0 additions & 1 deletion trunk/drivers/ieee1394/hosts.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ struct hpsb_host {
/* this nodes state */
unsigned in_bus_reset:1;
unsigned is_shutdown:1;
unsigned resume_packet_sent:1;

/* this nodes' duties on the bus */
unsigned is_root:1;
Expand Down
67 changes: 10 additions & 57 deletions trunk/drivers/ieee1394/nodemgr.c
Original file line number Diff line number Diff line change
Expand Up @@ -1349,33 +1349,6 @@ static void nodemgr_update_pdrv(struct node_entry *ne)
}


/* Write the BROADCAST_CHANNEL as per IEEE1394a 8.3.2.3.11 and 8.4.2.3. This
* seems like an optional service but in the end it is practically mandatory
* as a consequence of these clauses.
*
* Note that we cannot do a broadcast write to all nodes at once because some
* pre-1394a devices would hang. */
static void nodemgr_irm_write_bc(struct node_entry *ne, int generation)
{
const u64 bc_addr = (CSR_REGISTER_BASE | CSR_BROADCAST_CHANNEL);
quadlet_t bc_remote, bc_local;
int ret;

if (!ne->host->is_irm || ne->generation != generation ||
ne->nodeid == ne->host->node_id)
return;

bc_local = cpu_to_be32(ne->host->csr.broadcast_channel);

/* Check if the register is implemented and 1394a compliant. */
ret = hpsb_read(ne->host, ne->nodeid, generation, bc_addr, &bc_remote,
sizeof(bc_remote));
if (!ret && bc_remote & cpu_to_be32(0x80000000) &&
bc_remote != bc_local)
hpsb_node_write(ne, bc_addr, &bc_local, sizeof(bc_local));
}


static void nodemgr_probe_ne(struct host_info *hi, struct node_entry *ne, int generation)
{
struct device *dev;
Expand All @@ -1387,8 +1360,6 @@ static void nodemgr_probe_ne(struct host_info *hi, struct node_entry *ne, int ge
if (!dev)
return;

nodemgr_irm_write_bc(ne, generation);

/* If "needs_probe", then this is either a new or changed node we
* rescan totally. If the generation matches for an existing node
* (one that existed prior to the bus reset) we send update calls
Expand Down Expand Up @@ -1442,25 +1413,9 @@ static void nodemgr_node_probe(struct host_info *hi, int generation)
return;
}

static int nodemgr_send_resume_packet(struct hpsb_host *host)
{
struct hpsb_packet *packet;
int ret = 1;

packet = hpsb_make_phypacket(host,
0x003c0000 | NODEID_TO_NODE(host->node_id) << 24);
if (packet) {
packet->no_waiter = 1;
packet->generation = get_hpsb_generation(host);
ret = hpsb_send_packet(packet);
}
if (ret)
HPSB_WARN("fw-host%d: Failed to broadcast resume packet",
host->id);
return ret;
}

/* Perform a few high-level IRM responsibilities. */
/* Because we are a 1394a-2000 compliant IRM, we need to inform all the other
* nodes of the broadcast channel. (Really we're only setting the validity
* bit). Other IRM responsibilities go in here as well. */
static int nodemgr_do_irm_duties(struct hpsb_host *host, int cycles)
{
quadlet_t bc;
Expand All @@ -1469,8 +1424,13 @@ static int nodemgr_do_irm_duties(struct hpsb_host *host, int cycles)
if (!host->is_irm || host->irm_id == (nodeid_t)-1)
return 1;

/* We are a 1394a-2000 compliant IRM. Set the validity bit. */
host->csr.broadcast_channel |= 0x40000000;
host->csr.broadcast_channel |= 0x40000000; /* set validity bit */

bc = cpu_to_be32(host->csr.broadcast_channel);

hpsb_write(host, LOCAL_BUS | ALL_NODES, get_hpsb_generation(host),
(CSR_REGISTER_BASE | CSR_BROADCAST_CHANNEL),
&bc, sizeof(quadlet_t));

/* If there is no bus manager then we should set the root node's
* force_root bit to promote bus stability per the 1394
Expand Down Expand Up @@ -1503,13 +1463,6 @@ static int nodemgr_do_irm_duties(struct hpsb_host *host, int cycles)
}
}

/* Some devices suspend their ports while being connected to an inactive
* host adapter, i.e. if connected before the low-level driver is
* loaded. They become visible either when physically unplugged and
* replugged, or when receiving a resume packet. Send one once. */
if (!host->resume_packet_sent && !nodemgr_send_resume_packet(host))
host->resume_packet_sent = 1;

return 1;
}

Expand Down
Loading

0 comments on commit 3f641fc

Please sign in to comment.