Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 81328
b: refs/heads/master
c: 034e0ab
h: refs/heads/master
v: v3
  • Loading branch information
Geert Uytterhoeven authored and Paul Mackerras committed Jan 25, 2008
1 parent 97cbe60 commit 11943f0
Show file tree
Hide file tree
Showing 8 changed files with 32 additions and 37 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: cda563fb9ca2c26ff720110b25e96205b71d3bae
refs/heads/master: 034e0ab54bfe57bc980452f991d3ab443f1b085a
4 changes: 2 additions & 2 deletions trunk/arch/powerpc/platforms/ps3/device-init.c
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,7 @@ static int ps3_storage_wait_for_device(const struct ps3_repository_device *repo)
u64 dev_port;
} *notify_event;

pr_debug(" -> %s:%u: (%u:%u:%u)\n", __func__, __LINE__, repo->bus_id,
pr_debug(" -> %s:%u: (%lu:%lu:%u)\n", __func__, __LINE__, repo->bus_id,
repo->dev_id, repo->dev_type);

buf = kzalloc(512, GFP_KERNEL);
Expand Down Expand Up @@ -384,7 +384,7 @@ static int ps3_storage_wait_for_device(const struct ps3_repository_device *repo)

if (notify_event->dev_id == repo->dev_id &&
notify_event->dev_type == PS3_DEV_TYPE_NOACCESS) {
pr_debug("%s:%u: no access: dev_id %u\n", __func__,
pr_debug("%s:%u: no access: dev_id %lu\n", __func__,
__LINE__, repo->dev_id);
break;
}
Expand Down
8 changes: 4 additions & 4 deletions trunk/arch/powerpc/platforms/ps3/mm.c
Original file line number Diff line number Diff line change
Expand Up @@ -359,7 +359,7 @@ static unsigned long dma_sb_lpar_to_bus(struct ps3_dma_region *r,
static void __maybe_unused _dma_dump_region(const struct ps3_dma_region *r,
const char *func, int line)
{
DBG("%s:%d: dev %u:%u\n", func, line, r->dev->bus_id,
DBG("%s:%d: dev %lu:%lu\n", func, line, r->dev->bus_id,
r->dev->dev_id);
DBG("%s:%d: page_size %u\n", func, line, r->page_size);
DBG("%s:%d: bus_addr %lxh\n", func, line, r->bus_addr);
Expand Down Expand Up @@ -394,7 +394,7 @@ struct dma_chunk {
static void _dma_dump_chunk (const struct dma_chunk* c, const char* func,
int line)
{
DBG("%s:%d: r.dev %u:%u\n", func, line,
DBG("%s:%d: r.dev %lu:%lu\n", func, line,
c->region->dev->bus_id, c->region->dev->dev_id);
DBG("%s:%d: r.bus_addr %lxh\n", func, line, c->region->bus_addr);
DBG("%s:%d: r.page_size %u\n", func, line, c->region->page_size);
Expand Down Expand Up @@ -658,7 +658,7 @@ static int dma_sb_region_create(struct ps3_dma_region *r)
BUG_ON(!r);

if (!r->dev->bus_id) {
pr_info("%s:%d: %u:%u no dma\n", __func__, __LINE__,
pr_info("%s:%d: %lu:%lu no dma\n", __func__, __LINE__,
r->dev->bus_id, r->dev->dev_id);
return 0;
}
Expand Down Expand Up @@ -724,7 +724,7 @@ static int dma_sb_region_free(struct ps3_dma_region *r)
BUG_ON(!r);

if (!r->dev->bus_id) {
pr_info("%s:%d: %u:%u no dma\n", __func__, __LINE__,
pr_info("%s:%d: %lu:%lu no dma\n", __func__, __LINE__,
r->dev->bus_id, r->dev->dev_id);
return 0;
}
Expand Down
12 changes: 6 additions & 6 deletions trunk/arch/powerpc/platforms/ps3/platform.h
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ enum ps3_dev_type {

int ps3_repository_read_bus_str(unsigned int bus_index, const char *bus_str,
u64 *value);
int ps3_repository_read_bus_id(unsigned int bus_index, unsigned int *bus_id);
int ps3_repository_read_bus_id(unsigned int bus_index, u64 *bus_id);
int ps3_repository_read_bus_type(unsigned int bus_index,
enum ps3_bus_type *bus_type);
int ps3_repository_read_bus_num_dev(unsigned int bus_index,
Expand All @@ -119,7 +119,7 @@ enum ps3_reg_type {
int ps3_repository_read_dev_str(unsigned int bus_index,
unsigned int dev_index, const char *dev_str, u64 *value);
int ps3_repository_read_dev_id(unsigned int bus_index, unsigned int dev_index,
unsigned int *dev_id);
u64 *dev_id);
int ps3_repository_read_dev_type(unsigned int bus_index,
unsigned int dev_index, enum ps3_dev_type *dev_type);
int ps3_repository_read_dev_intr(unsigned int bus_index,
Expand All @@ -138,12 +138,12 @@ int ps3_repository_read_dev_reg(unsigned int bus_index,
/* repository bus enumerators */

struct ps3_repository_device {
enum ps3_bus_type bus_type;
unsigned int bus_index;
unsigned int bus_id;
enum ps3_dev_type dev_type;
unsigned int dev_index;
unsigned int dev_id;
enum ps3_bus_type bus_type;
enum ps3_dev_type dev_type;
u64 bus_id;
u64 dev_id;
};

static inline struct ps3_repository_device *ps3_repository_bump_device(
Expand Down
21 changes: 8 additions & 13 deletions trunk/arch/powerpc/platforms/ps3/repository.c
Original file line number Diff line number Diff line change
Expand Up @@ -168,18 +168,15 @@ int ps3_repository_read_bus_str(unsigned int bus_index, const char *bus_str,
value, 0);
}

int ps3_repository_read_bus_id(unsigned int bus_index, unsigned int *bus_id)
int ps3_repository_read_bus_id(unsigned int bus_index, u64 *bus_id)
{
int result;
u64 v1;
u64 v2; /* unused */

result = read_node(PS3_LPAR_ID_PME,
make_first_field("bus", bus_index),
make_field("id", 0),
0, 0,
&v1, &v2);
*bus_id = v1;
bus_id, NULL);
return result;
}

Expand Down Expand Up @@ -225,18 +222,16 @@ int ps3_repository_read_dev_str(unsigned int bus_index,
}

int ps3_repository_read_dev_id(unsigned int bus_index, unsigned int dev_index,
unsigned int *dev_id)
u64 *dev_id)
{
int result;
u64 v1;

result = read_node(PS3_LPAR_ID_PME,
make_first_field("bus", bus_index),
make_field("dev", dev_index),
make_field("id", 0),
0,
&v1, 0);
*dev_id = v1;
dev_id, 0);
return result;
}

Expand Down Expand Up @@ -332,7 +327,7 @@ int ps3_repository_find_device(struct ps3_repository_device *repo)
return result;
}

pr_debug("%s:%d: bus_type %u, bus_index %u, bus_id %u, num_dev %u\n",
pr_debug("%s:%d: bus_type %u, bus_index %u, bus_id %lu, num_dev %u\n",
__func__, __LINE__, tmp.bus_type, tmp.bus_index, tmp.bus_id,
num_dev);

Expand Down Expand Up @@ -387,7 +382,7 @@ int ps3_repository_find_device(struct ps3_repository_device *repo)
return result;
}

pr_debug("%s:%d: found: dev_type %u, dev_index %u, dev_id %u\n",
pr_debug("%s:%d: found: dev_type %u, dev_index %u, dev_id %lu\n",
__func__, __LINE__, tmp.dev_type, tmp.dev_index, tmp.dev_id);

*repo = tmp;
Expand Down Expand Up @@ -1034,7 +1029,7 @@ static int dump_device_info(struct ps3_repository_device *repo,
continue;
}

pr_debug("%s:%d (%u:%u): dev_type %u, dev_id %u\n", __func__,
pr_debug("%s:%d (%u:%u): dev_type %u, dev_id %lu\n", __func__,
__LINE__, repo->bus_index, repo->dev_index,
repo->dev_type, repo->dev_id);

Expand Down Expand Up @@ -1091,7 +1086,7 @@ int ps3_repository_dump_bus_info(void)
continue;
}

pr_debug("%s:%d bus_%u: bus_type %u, bus_id %u, num_dev %u\n",
pr_debug("%s:%d bus_%u: bus_type %u, bus_id %lu, num_dev %u\n",
__func__, __LINE__, repo.bus_index, repo.bus_type,
repo.bus_id, num_dev);

Expand Down
14 changes: 7 additions & 7 deletions trunk/arch/powerpc/platforms/ps3/system-bus.c
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ struct {
int gpu;
} static usage_hack;

static int ps3_is_device(struct ps3_system_bus_device *dev,
unsigned int bus_id, unsigned int dev_id)
static int ps3_is_device(struct ps3_system_bus_device *dev, u64 bus_id,
u64 dev_id)
{
return dev->bus_id == bus_id && dev->dev_id == dev_id;
}
Expand Down Expand Up @@ -182,8 +182,8 @@ int ps3_open_hv_device(struct ps3_system_bus_device *dev)
case PS3_MATCH_ID_SYSTEM_MANAGER:
pr_debug("%s:%d: unsupported match_id: %u\n", __func__,
__LINE__, dev->match_id);
pr_debug("%s:%d: bus_id: %u\n", __func__,
__LINE__, dev->bus_id);
pr_debug("%s:%d: bus_id: %lu\n", __func__, __LINE__,
dev->bus_id);
BUG();
return -EINVAL;

Expand Down Expand Up @@ -220,8 +220,8 @@ int ps3_close_hv_device(struct ps3_system_bus_device *dev)
case PS3_MATCH_ID_SYSTEM_MANAGER:
pr_debug("%s:%d: unsupported match_id: %u\n", __func__,
__LINE__, dev->match_id);
pr_debug("%s:%d: bus_id: %u\n", __func__,
__LINE__, dev->bus_id);
pr_debug("%s:%d: bus_id: %lu\n", __func__, __LINE__,
dev->bus_id);
BUG();
return -EINVAL;

Expand All @@ -240,7 +240,7 @@ EXPORT_SYMBOL_GPL(ps3_close_hv_device);
static void _dump_mmio_region(const struct ps3_mmio_region* r,
const char* func, int line)
{
pr_debug("%s:%d: dev %u:%u\n", func, line, r->dev->bus_id,
pr_debug("%s:%d: dev %lu:%lu\n", func, line, r->dev->bus_id,
r->dev->dev_id);
pr_debug("%s:%d: bus_addr %lxh\n", func, line, r->bus_addr);
pr_debug("%s:%d: len %lxh\n", func, line, r->len);
Expand Down
4 changes: 2 additions & 2 deletions trunk/drivers/net/ps3_gelic_net.c
Original file line number Diff line number Diff line change
Expand Up @@ -58,11 +58,11 @@ static inline struct device *ctodev(struct gelic_net_card *card)
{
return &card->dev->core;
}
static inline unsigned int bus_id(struct gelic_net_card *card)
static inline u64 bus_id(struct gelic_net_card *card)
{
return card->dev->bus_id;
}
static inline unsigned int dev_id(struct gelic_net_card *card)
static inline u64 dev_id(struct gelic_net_card *card)
{
return card->dev->dev_id;
}
Expand Down
4 changes: 2 additions & 2 deletions trunk/include/asm-powerpc/ps3.h
Original file line number Diff line number Diff line change
Expand Up @@ -344,8 +344,8 @@ struct ps3_system_bus_device {
enum ps3_match_id match_id;
enum ps3_system_bus_device_type dev_type;

unsigned int bus_id; /* SB */
unsigned int dev_id; /* SB */
u64 bus_id; /* SB */
u64 dev_id; /* SB */
unsigned int interrupt_id; /* SB */
struct ps3_dma_region *d_region; /* SB, IOC0 */
struct ps3_mmio_region *m_region; /* SB, IOC0*/
Expand Down

0 comments on commit 11943f0

Please sign in to comment.