Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 15228
b: refs/heads/master
c: d898d48
h: refs/heads/master
v: v3
  • Loading branch information
Linus Torvalds committed Dec 20, 2005
1 parent 88c805d commit 5dde361
Show file tree
Hide file tree
Showing 18 changed files with 186 additions and 81 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: 7c612bfd4ed3064fd48a4877a114c8186547367b
refs/heads/master: d898d485e721db45be555c27df5de03281f2fd05
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 =-rc5
NAME=Affluent Albatross
EXTRAVERSION =-rc6
NAME=Sliding Snow Leopard

# *DOCUMENTATION*
# To see a list of typical targets execute "make help"
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
1 change: 1 addition & 0 deletions trunk/drivers/ieee1394/hosts.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ 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: 57 additions & 10 deletions trunk/drivers/ieee1394/nodemgr.c
Original file line number Diff line number Diff line change
Expand Up @@ -1349,6 +1349,33 @@ 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 @@ -1360,6 +1387,8 @@ 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 @@ -1413,9 +1442,25 @@ static void nodemgr_node_probe(struct host_info *hi, int generation)
return;
}

/* 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_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. */
static int nodemgr_do_irm_duties(struct hpsb_host *host, int cycles)
{
quadlet_t bc;
Expand All @@ -1424,13 +1469,8 @@ static int nodemgr_do_irm_duties(struct hpsb_host *host, int cycles)
if (!host->is_irm || host->irm_id == (nodeid_t)-1)
return 1;

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));
/* We are a 1394a-2000 compliant IRM. Set the validity bit. */
host->csr.broadcast_channel |= 0x40000000;

/* 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 @@ -1463,6 +1503,13 @@ 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
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 5dde361

Please sign in to comment.