Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 87947
b: refs/heads/master
c: a77df5c
h: refs/heads/master
i:
  87945: 095dd59
  87943: a80f899
v: v3
  • Loading branch information
Linus Torvalds committed Mar 30, 2008
1 parent 9aa7a82 commit d70f67b
Show file tree
Hide file tree
Showing 66 changed files with 197 additions and 200 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: 3ec25ebd69dc120d0590e64caaf1477aa88c8a93
refs/heads/master: a77df5cd1cde203ef11c8e5a3ca47def5f5a1687
37 changes: 16 additions & 21 deletions trunk/arch/powerpc/oprofile/cell/vma_map.c
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ vma_map_add(struct vma_to_fileoffset_map *map, unsigned int vma,
* A pointer to the first vma_map in the generated list
* of vma_maps is returned. */
struct vma_to_fileoffset_map *create_vma_map(const struct spu *aSpu,
unsigned long spu_elf_start)
unsigned long __spu_elf_start)
{
static const unsigned char expected[EI_PAD] = {
[EI_MAG0] = ELFMAG0,
Expand All @@ -107,9 +107,11 @@ struct vma_to_fileoffset_map *create_vma_map(const struct spu *aSpu,

int grd_val;
struct vma_to_fileoffset_map *map = NULL;
void __user *spu_elf_start = (void __user *)__spu_elf_start;
struct spu_overlay_info ovly;
unsigned int overlay_tbl_offset = -1;
unsigned long phdr_start, shdr_start;
Elf32_Phdr __user *phdr_start;
Elf32_Shdr __user *shdr_start;
Elf32_Ehdr ehdr;
Elf32_Phdr phdr;
Elf32_Shdr shdr, shdr_str;
Expand All @@ -121,12 +123,12 @@ struct vma_to_fileoffset_map *create_vma_map(const struct spu *aSpu,
unsigned int ovly_buf_table_sym = 0;
unsigned int ovly_table_end_sym = 0;
unsigned int ovly_buf_table_end_sym = 0;
unsigned long ovly_table;
struct spu_overlay_info __user *ovly_table;
unsigned int n_ovlys;

/* Get and validate ELF header. */

if (copy_from_user(&ehdr, (void *) spu_elf_start, sizeof (ehdr)))
if (copy_from_user(&ehdr, spu_elf_start, sizeof (ehdr)))
goto fail;

if (memcmp(ehdr.e_ident, expected, EI_PAD) != 0) {
Expand All @@ -152,9 +154,7 @@ struct vma_to_fileoffset_map *create_vma_map(const struct spu *aSpu,

/* Traverse program headers. */
for (i = 0; i < ehdr.e_phnum; i++) {
if (copy_from_user(&phdr,
(void *) (phdr_start + i * sizeof(phdr)),
sizeof(phdr)))
if (copy_from_user(&phdr, phdr_start + i, sizeof(phdr)))
goto fail;

if (phdr.p_type != PT_LOAD)
Expand All @@ -171,9 +171,7 @@ struct vma_to_fileoffset_map *create_vma_map(const struct spu *aSpu,
pr_debug("SPU_PROF: Created non-overlay maps\n");
/* Traverse section table and search for overlay-related symbols. */
for (i = 0; i < ehdr.e_shnum; i++) {
if (copy_from_user(&shdr,
(void *) (shdr_start + i * sizeof(shdr)),
sizeof(shdr)))
if (copy_from_user(&shdr, shdr_start + i, sizeof(shdr)))
goto fail;

if (shdr.sh_type != SHT_SYMTAB)
Expand All @@ -182,24 +180,23 @@ struct vma_to_fileoffset_map *create_vma_map(const struct spu *aSpu,
continue;

if (copy_from_user(&shdr_str,
(void *) (shdr_start + shdr.sh_link *
sizeof(shdr)),
shdr_start + shdr.sh_link,
sizeof(shdr)))
goto fail;

if (shdr_str.sh_type != SHT_STRTAB)
goto fail;;

for (j = 0; j < shdr.sh_size / sizeof (sym); j++) {
if (copy_from_user(&sym, (void *) (spu_elf_start +
shdr.sh_offset + j *
sizeof (sym)),
if (copy_from_user(&sym, spu_elf_start +
shdr.sh_offset +
j * sizeof (sym),
sizeof (sym)))
goto fail;

if (copy_from_user(name, (void *)
(spu_elf_start + shdr_str.sh_offset +
sym.st_name),
if (copy_from_user(name,
spu_elf_start + shdr_str.sh_offset +
sym.st_name,
20))
goto fail;

Expand Down Expand Up @@ -245,9 +242,7 @@ struct vma_to_fileoffset_map *create_vma_map(const struct spu *aSpu,

/* Traverse overlay table. */
for (i = 0; i < n_ovlys; i++) {
if (copy_from_user(&ovly, (void *)
(ovly_table + i * sizeof (ovly)),
sizeof (ovly)))
if (copy_from_user(&ovly, ovly_table + i, sizeof (ovly)))
goto fail;

/* The ovly.vma/size/offset arguments are analogous to the same
Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/powerpc/platforms/pseries/xics.c
Original file line number Diff line number Diff line change
Expand Up @@ -763,7 +763,7 @@ void xics_request_IPIs(void)
}
#endif /* CONFIG_SMP */

void xics_teardown_cpu()
void xics_teardown_cpu(void)
{
int cpu = smp_processor_id();

Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/char/n_tty.c
Original file line number Diff line number Diff line change
Expand Up @@ -1183,7 +1183,7 @@ static int copy_from_read_buf(struct tty_struct *tty,
return retval;
}

extern ssize_t redirected_tty_write(struct file *, const char *,
extern ssize_t redirected_tty_write(struct file *, const char __user *,
size_t, loff_t *);

/**
Expand Down
20 changes: 10 additions & 10 deletions trunk/drivers/char/nozomi.c
Original file line number Diff line number Diff line change
Expand Up @@ -438,7 +438,7 @@ static void read_mem32(u32 *buf, const void __iomem *mem_addr_start,
u32 size_bytes)
{
u32 i = 0;
const u32 *ptr = (__force u32 *) mem_addr_start;
const u32 __iomem *ptr = mem_addr_start;
u16 *buf16;

if (unlikely(!ptr || !buf))
Expand All @@ -448,11 +448,11 @@ static void read_mem32(u32 *buf, const void __iomem *mem_addr_start,
switch (size_bytes) {
case 2: /* 2 bytes */
buf16 = (u16 *) buf;
*buf16 = __le16_to_cpu(readw((void __iomem *)ptr));
*buf16 = __le16_to_cpu(readw(ptr));
goto out;
break;
case 4: /* 4 bytes */
*(buf) = __le32_to_cpu(readl((void __iomem *)ptr));
*(buf) = __le32_to_cpu(readl(ptr));
goto out;
break;
}
Expand All @@ -461,11 +461,11 @@ static void read_mem32(u32 *buf, const void __iomem *mem_addr_start,
if (size_bytes - i == 2) {
/* Handle 2 bytes in the end */
buf16 = (u16 *) buf;
*(buf16) = __le16_to_cpu(readw((void __iomem *)ptr));
*(buf16) = __le16_to_cpu(readw(ptr));
i += 2;
} else {
/* Read 4 bytes */
*(buf) = __le32_to_cpu(readl((void __iomem *)ptr));
*(buf) = __le32_to_cpu(readl(ptr));
i += 4;
}
buf++;
Expand All @@ -484,7 +484,7 @@ static u32 write_mem32(void __iomem *mem_addr_start, const u32 *buf,
u32 size_bytes)
{
u32 i = 0;
u32 *ptr = (__force u32 *) mem_addr_start;
u32 __iomem *ptr = mem_addr_start;
const u16 *buf16;

if (unlikely(!ptr || !buf))
Expand All @@ -494,15 +494,15 @@ static u32 write_mem32(void __iomem *mem_addr_start, const u32 *buf,
switch (size_bytes) {
case 2: /* 2 bytes */
buf16 = (const u16 *)buf;
writew(__cpu_to_le16(*buf16), (void __iomem *)ptr);
writew(__cpu_to_le16(*buf16), ptr);
return 2;
break;
case 1: /*
* also needs to write 4 bytes in this case
* so falling through..
*/
case 4: /* 4 bytes */
writel(__cpu_to_le32(*buf), (void __iomem *)ptr);
writel(__cpu_to_le32(*buf), ptr);
return 4;
break;
}
Expand All @@ -511,11 +511,11 @@ static u32 write_mem32(void __iomem *mem_addr_start, const u32 *buf,
if (size_bytes - i == 2) {
/* 2 bytes */
buf16 = (const u16 *)buf;
writew(__cpu_to_le16(*buf16), (void __iomem *)ptr);
writew(__cpu_to_le16(*buf16), ptr);
i += 2;
} else {
/* 4 bytes */
writel(__cpu_to_le32(*buf), (void __iomem *)ptr);
writel(__cpu_to_le32(*buf), ptr);
i += 4;
}
buf++;
Expand Down
28 changes: 14 additions & 14 deletions trunk/drivers/crypto/hifn_795x.c
Original file line number Diff line number Diff line change
Expand Up @@ -392,8 +392,8 @@ static atomic_t hifn_dev_number;

struct hifn_desc
{
volatile u32 l;
volatile u32 p;
volatile __le32 l;
volatile __le32 p;
};

struct hifn_dma {
Expand Down Expand Up @@ -481,10 +481,10 @@ struct hifn_device

struct hifn_base_command
{
volatile u16 masks;
volatile u16 session_num;
volatile u16 total_source_count;
volatile u16 total_dest_count;
volatile __le16 masks;
volatile __le16 session_num;
volatile __le16 total_source_count;
volatile __le16 total_dest_count;
};

#define HIFN_BASE_CMD_COMP 0x0100 /* enable compression engine */
Expand All @@ -504,10 +504,10 @@ struct hifn_base_command
*/
struct hifn_crypt_command
{
volatile u16 masks;
volatile u16 header_skip;
volatile u16 source_count;
volatile u16 reserved;
volatile __le16 masks;
volatile __le16 header_skip;
volatile __le16 source_count;
volatile __le16 reserved;
};

#define HIFN_CRYPT_CMD_ALG_MASK 0x0003 /* algorithm: */
Expand Down Expand Up @@ -670,7 +670,7 @@ static inline u32 hifn_read_0(struct hifn_device *dev, u32 reg)
{
u32 ret;

ret = readl((char *)(dev->bar[0]) + reg);
ret = readl(dev->bar[0] + reg);

return ret;
}
Expand All @@ -679,19 +679,19 @@ static inline u32 hifn_read_1(struct hifn_device *dev, u32 reg)
{
u32 ret;

ret = readl((char *)(dev->bar[1]) + reg);
ret = readl(dev->bar[1] + reg);

return ret;
}

static inline void hifn_write_0(struct hifn_device *dev, u32 reg, u32 val)
{
writel(val, (char *)(dev->bar[0]) + reg);
writel(val, dev->bar[0] + reg);
}

static inline void hifn_write_1(struct hifn_device *dev, u32 reg, u32 val)
{
writel(val, (char *)(dev->bar[1]) + reg);
writel(val, dev->bar[1] + reg);
}

static void hifn_wait_puc(struct hifn_device *dev)
Expand Down
47 changes: 27 additions & 20 deletions trunk/drivers/dma/fsldma.h
Original file line number Diff line number Diff line change
Expand Up @@ -75,12 +75,15 @@
#define FSL_DMA_DGSR_EOSI 0x02
#define FSL_DMA_DGSR_EOLSI 0x01

typedef u64 __bitwise v64;
typedef u32 __bitwise v32;

struct fsl_dma_ld_hw {
u64 __bitwise src_addr;
u64 __bitwise dst_addr;
u64 __bitwise next_ln_addr;
u32 __bitwise count;
u32 __bitwise reserve;
v64 src_addr;
v64 dst_addr;
v64 next_ln_addr;
v32 count;
v32 reserve;
} __attribute__((aligned(32)));

struct fsl_desc_sw {
Expand All @@ -92,13 +95,13 @@ struct fsl_desc_sw {
} __attribute__((aligned(32)));

struct fsl_dma_chan_regs {
u32 __bitwise mr; /* 0x00 - Mode Register */
u32 __bitwise sr; /* 0x04 - Status Register */
u64 __bitwise cdar; /* 0x08 - Current descriptor address register */
u64 __bitwise sar; /* 0x10 - Source Address Register */
u64 __bitwise dar; /* 0x18 - Destination Address Register */
u32 __bitwise bcr; /* 0x20 - Byte Count Register */
u64 __bitwise ndar; /* 0x24 - Next Descriptor Address Register */
u32 mr; /* 0x00 - Mode Register */
u32 sr; /* 0x04 - Status Register */
u64 cdar; /* 0x08 - Current descriptor address register */
u64 sar; /* 0x10 - Source Address Register */
u64 dar; /* 0x18 - Destination Address Register */
u32 bcr; /* 0x20 - Byte Count Register */
u64 ndar; /* 0x24 - Next Descriptor Address Register */
};

struct fsl_dma_chan;
Expand Down Expand Up @@ -151,25 +154,27 @@ struct fsl_dma_chan {
#ifndef __powerpc64__
static u64 in_be64(const u64 __iomem *addr)
{
return ((u64)in_be32((u32 *)addr) << 32) | (in_be32((u32 *)addr + 1));
return ((u64)in_be32((u32 __iomem *)addr) << 32) |
(in_be32((u32 __iomem *)addr + 1));
}

static void out_be64(u64 __iomem *addr, u64 val)
{
out_be32((u32 *)addr, val >> 32);
out_be32((u32 *)addr + 1, (u32)val);
out_be32((u32 __iomem *)addr, val >> 32);
out_be32((u32 __iomem *)addr + 1, (u32)val);
}

/* There is no asm instructions for 64 bits reverse loads and stores */
static u64 in_le64(const u64 __iomem *addr)
{
return ((u64)in_le32((u32 *)addr + 1) << 32) | (in_le32((u32 *)addr));
return ((u64)in_le32((u32 __iomem *)addr + 1) << 32) |
(in_le32((u32 __iomem *)addr));
}

static void out_le64(u64 __iomem *addr, u64 val)
{
out_le32((u32 *)addr + 1, val >> 32);
out_le32((u32 *)addr, (u32)val);
out_le32((u32 __iomem *)addr + 1, val >> 32);
out_le32((u32 __iomem *)addr, (u32)val);
}
#endif

Expand All @@ -182,9 +187,11 @@ static void out_le64(u64 __iomem *addr, u64 val)

#define DMA_TO_CPU(fsl_chan, d, width) \
(((fsl_chan)->feature & FSL_DMA_BIG_ENDIAN) ? \
be##width##_to_cpu(d) : le##width##_to_cpu(d))
be##width##_to_cpu((__force __be##width)(v##width)d) : \
le##width##_to_cpu((__force __le##width)(v##width)d))
#define CPU_TO_DMA(fsl_chan, c, width) \
(((fsl_chan)->feature & FSL_DMA_BIG_ENDIAN) ? \
cpu_to_be##width(c) : cpu_to_le##width(c))
(__force v##width)cpu_to_be##width(c) : \
(__force v##width)cpu_to_le##width(c))

#endif /* __DMA_FSLDMA_H */
4 changes: 2 additions & 2 deletions trunk/drivers/dma/ioat_dca.c
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ struct ioat_dca_slot {

struct ioat_dca_priv {
void __iomem *iobase;
void *dca_base;
void __iomem *dca_base;
int max_requesters;
int requester_count;
u8 tag_map[IOAT_TAG_MAP_LEN];
Expand Down Expand Up @@ -338,7 +338,7 @@ static struct dca_ops ioat2_dca_ops = {
.get_tag = ioat2_dca_get_tag,
};

static int ioat2_dca_count_dca_slots(void *iobase, u16 dca_offset)
static int ioat2_dca_count_dca_slots(void __iomem *iobase, u16 dca_offset)
{
int slots = 0;
u32 req;
Expand Down
1 change: 1 addition & 0 deletions trunk/drivers/ide/ide-iops.c
Original file line number Diff line number Diff line change
Expand Up @@ -595,6 +595,7 @@ u8 eighty_ninty_three (ide_drive_t *drive)

/*
* FIXME:
* - change master/slave IDENTIFY order
* - force bit13 (80c cable present) check also for !ivb devices
* (unless the slave device is pre-ATA3)
*/
Expand Down
Loading

0 comments on commit d70f67b

Please sign in to comment.