Skip to content

Commit

Permalink
Merge branch 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git…
Browse files Browse the repository at this point in the history
…/benh/powerpc

* 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc:
  serial: Add 16850 uart type support to OF uart driver
  hvc_console: Remove tty->low_latency
  powerpc: Get the number of SLBs from "slb-size" property
  powerpc: is_hugepage_only_range() must account for both 4kB and 64kB slices
  powerpc/ps3: printing fixups for l64 to ll64 conversion drivers/video
  powerpc/ps3: Printing fixups for l64 to ll64 conversion drivers/scsi
  powerpc/ps3: Printing fixups for l64 to ll64 conversion drivers/ps3
  powerpc/ps3: Printing fixups for l64 to ll64 conversion sound/ppc
  powerpc/ps3: Printing fixups for l64 to ll64 conversion drivers/char
  powerpc/ps3: Printing fixups for l64 to ll64 conversion drivers/block
  powerpc/ps3: Printing fixups for l64 to ll64 conversion arch/powerpc
  powerpc/ps3: ps3_repository_read_mm_info() takes u64 * arguments
  powerpc/ps3: clear_bit()/set_bit() operate on unsigned longs
  powerpc/ps3: The lv1_ routines have u64 parameters
  powerpc/ps3: Use dma_addr_t down through the stack
  powerpc/ps3: set_dabr() takes an unsigned long
  powerpc: Cleanup from l64 to ll64 change drivers/scsi
  • Loading branch information
torvalds committed Jan 16, 2009
2 parents e58d4fd + 0025e75 commit b762666
Show file tree
Hide file tree
Showing 24 changed files with 196 additions and 168 deletions.
8 changes: 4 additions & 4 deletions arch/powerpc/include/asm/ps3.h
Original file line number Diff line number Diff line change
Expand Up @@ -103,10 +103,10 @@ struct ps3_dma_region_ops {
int (*map)(struct ps3_dma_region *,
unsigned long virt_addr,
unsigned long len,
unsigned long *bus_addr,
dma_addr_t *bus_addr,
u64 iopte_pp);
int (*unmap)(struct ps3_dma_region *,
unsigned long bus_addr,
dma_addr_t bus_addr,
unsigned long len);
};
/**
Expand All @@ -124,9 +124,9 @@ int ps3_dma_region_init(struct ps3_system_bus_device *dev,
int ps3_dma_region_create(struct ps3_dma_region *r);
int ps3_dma_region_free(struct ps3_dma_region *r);
int ps3_dma_map(struct ps3_dma_region *r, unsigned long virt_addr,
unsigned long len, unsigned long *bus_addr,
unsigned long len, dma_addr_t *bus_addr,
u64 iopte_pp);
int ps3_dma_unmap(struct ps3_dma_region *r, unsigned long bus_addr,
int ps3_dma_unmap(struct ps3_dma_region *r, dma_addr_t bus_addr,
unsigned long len);

/* mmio routines */
Expand Down
5 changes: 5 additions & 0 deletions arch/powerpc/kernel/prom.c
Original file line number Diff line number Diff line change
Expand Up @@ -590,6 +590,11 @@ static void __init check_cpu_slb_size(unsigned long node)
{
u32 *slb_size_ptr;

slb_size_ptr = of_get_flat_dt_prop(node, "slb-size", NULL);
if (slb_size_ptr != NULL) {
mmu_slb_size = *slb_size_ptr;
return;
}
slb_size_ptr = of_get_flat_dt_prop(node, "ibm,slb-size", NULL);
if (slb_size_ptr != NULL) {
mmu_slb_size = *slb_size_ptr;
Expand Down
11 changes: 10 additions & 1 deletion arch/powerpc/mm/slice.c
Original file line number Diff line number Diff line change
Expand Up @@ -710,9 +710,18 @@ int is_hugepage_only_range(struct mm_struct *mm, unsigned long addr,
unsigned long len)
{
struct slice_mask mask, available;
unsigned int psize = mm->context.user_psize;

mask = slice_range_to_mask(addr, len);
available = slice_mask_for_size(mm, mm->context.user_psize);
available = slice_mask_for_size(mm, psize);
#ifdef CONFIG_PPC_64K_PAGES
/* We need to account for 4k slices too */
if (psize == MMU_PAGE_64K) {
struct slice_mask compat_mask;
compat_mask = slice_mask_for_size(mm, MMU_PAGE_4K);
or_mask(available, compat_mask);
}
#endif

#if 0 /* too verbose */
slice_dbg("is_hugepage_only_range(mm=%p, addr=%lx, len=%lx)\n",
Expand Down
26 changes: 13 additions & 13 deletions arch/powerpc/platforms/ps3/device-init.c
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ static int __init ps3_register_lpm_devices(void)
goto fail_rights;
}

pr_debug("%s:%d: pu_id %lu, rights %lu(%lxh)\n",
pr_debug("%s:%d: pu_id %llu, rights %llu(%llxh)\n",
__func__, __LINE__, dev->lpm.pu_id, dev->lpm.rights,
dev->lpm.rights);

Expand Down Expand Up @@ -348,7 +348,7 @@ static int ps3_setup_storage_dev(const struct ps3_repository_device *repo,
return -ENODEV;
}

pr_debug("%s:%u: (%u:%u:%u): port %lu blk_size %lu num_blocks %lu "
pr_debug("%s:%u: (%u:%u:%u): port %llu blk_size %llu num_blocks %llu "
"num_regions %u\n", __func__, __LINE__, repo->bus_index,
repo->dev_index, repo->dev_type, port, blk_size, num_blocks,
num_regions);
Expand Down Expand Up @@ -394,7 +394,7 @@ static int ps3_setup_storage_dev(const struct ps3_repository_device *repo,
result = -ENODEV;
goto fail_read_region;
}
pr_debug("%s:%u: region %u: id %u start %lu size %lu\n",
pr_debug("%s:%u: region %u: id %u start %llu size %llu\n",
__func__, __LINE__, i, id, start, size);

p->regions[i].id = id;
Expand Down Expand Up @@ -662,13 +662,13 @@ static void ps3_find_and_add_device(u64 bus_id, u64 dev_id)
if (rem)
break;
}
pr_warning("%s:%u: device %lu:%lu not found\n", __func__, __LINE__,
pr_warning("%s:%u: device %llu:%llu not found\n", __func__, __LINE__,
bus_id, dev_id);
return;

found:
if (retries)
pr_debug("%s:%u: device %lu:%lu found after %u retries\n",
pr_debug("%s:%u: device %llu:%llu found after %u retries\n",
__func__, __LINE__, bus_id, dev_id, retries);

ps3_setup_dynamic_device(&repo);
Expand Down Expand Up @@ -715,14 +715,14 @@ static irqreturn_t ps3_notification_interrupt(int irq, void *data)
res = lv1_storage_get_async_status(PS3_NOTIFICATION_DEV_ID, &tag,
&status);
if (tag != dev->tag)
pr_err("%s:%u: tag mismatch, got %lx, expected %lx\n",
pr_err("%s:%u: tag mismatch, got %llx, expected %llx\n",
__func__, __LINE__, tag, dev->tag);

if (res) {
pr_err("%s:%u: res %d status 0x%lx\n", __func__, __LINE__, res,
pr_err("%s:%u: res %d status 0x%llx\n", __func__, __LINE__, res,
status);
} else {
pr_debug("%s:%u: completed, status 0x%lx\n", __func__,
pr_debug("%s:%u: completed, status 0x%llx\n", __func__,
__LINE__, status);
dev->lv1_status = status;
complete(&dev->done);
Expand Down Expand Up @@ -761,7 +761,7 @@ static int ps3_notification_read_write(struct ps3_notification_device *dev,
}

if (dev->lv1_status) {
pr_err("%s:%u: %s not completed, status 0x%lx\n", __func__,
pr_err("%s:%u: %s not completed, status 0x%llx\n", __func__,
__LINE__, op, dev->lv1_status);
return -EIO;
}
Expand Down Expand Up @@ -850,16 +850,16 @@ static int ps3_probe_thread(void *data)
if (res)
break;

pr_debug("%s:%u: notify event type 0x%lx bus id %lu dev id %lu"
" type %lu port %lu\n", __func__, __LINE__,
pr_debug("%s:%u: notify event type 0x%llx bus id %llu dev id %llu"
" type %llu port %llu\n", __func__, __LINE__,
notify_event->event_type, notify_event->bus_id,
notify_event->dev_id, notify_event->dev_type,
notify_event->dev_port);

if (notify_event->event_type != notify_region_probe ||
notify_event->bus_id != dev.sbd.bus_id) {
pr_warning("%s:%u: bad notify_event: event %lu, "
"dev_id %lu, dev_type %lu\n",
pr_warning("%s:%u: bad notify_event: event %llu, "
"dev_id %llu, dev_type %llu\n",
__func__, __LINE__, notify_event->event_type,
notify_event->dev_id,
notify_event->dev_type);
Expand Down
2 changes: 1 addition & 1 deletion arch/powerpc/platforms/ps3/htab.c
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ static long ps3_hpte_insert(unsigned long hpte_group, unsigned long va,

if (result) {
/* all entries bolted !*/
pr_info("%s:result=%d va=%lx pa=%lx ix=%lx v=%lx r=%lx\n",
pr_info("%s:result=%d va=%lx pa=%lx ix=%lx v=%llx r=%llx\n",
__func__, result, va, pa, hpte_group, hpte_v, hpte_r);
BUG();
}
Expand Down
28 changes: 15 additions & 13 deletions arch/powerpc/platforms/ps3/interrupt.c
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,8 @@
* gives a usable range of plug values of {NUM_ISA_INTERRUPTS..63}. Note
* that there is no constraint on how many in this set an individual thread
* can acquire.
*
* The mask is declared as unsigned long so we can use set/clear_bit on it.
*/

#define PS3_BMP_MINALIGN 64
Expand All @@ -68,7 +70,7 @@ struct ps3_bmp {
struct {
u64 status;
u64 unused_1[3];
u64 mask;
unsigned long mask;
u64 unused_2[3];
};
u64 ipi_debug_brk_mask;
Expand Down Expand Up @@ -102,7 +104,7 @@ static void ps3_chip_mask(unsigned int virq)
struct ps3_private *pd = get_irq_chip_data(virq);
unsigned long flags;

pr_debug("%s:%d: thread_id %lu, virq %d\n", __func__, __LINE__,
pr_debug("%s:%d: thread_id %llu, virq %d\n", __func__, __LINE__,
pd->thread_id, virq);

local_irq_save(flags);
Expand All @@ -123,7 +125,7 @@ static void ps3_chip_unmask(unsigned int virq)
struct ps3_private *pd = get_irq_chip_data(virq);
unsigned long flags;

pr_debug("%s:%d: thread_id %lu, virq %d\n", __func__, __LINE__,
pr_debug("%s:%d: thread_id %llu, virq %d\n", __func__, __LINE__,
pd->thread_id, virq);

local_irq_save(flags);
Expand Down Expand Up @@ -221,7 +223,7 @@ static int ps3_virq_destroy(unsigned int virq)
{
const struct ps3_private *pd = get_irq_chip_data(virq);

pr_debug("%s:%d: ppe_id %lu, thread_id %lu, virq %u\n", __func__,
pr_debug("%s:%d: ppe_id %llu, thread_id %llu, virq %u\n", __func__,
__LINE__, pd->ppe_id, pd->thread_id, virq);

set_irq_chip_data(virq, NULL);
Expand Down Expand Up @@ -291,7 +293,7 @@ int ps3_irq_plug_destroy(unsigned int virq)
int result;
const struct ps3_private *pd = get_irq_chip_data(virq);

pr_debug("%s:%d: ppe_id %lu, thread_id %lu, virq %u\n", __func__,
pr_debug("%s:%d: ppe_id %llu, thread_id %llu, virq %u\n", __func__,
__LINE__, pd->ppe_id, pd->thread_id, virq);

ps3_chip_mask(virq);
Expand Down Expand Up @@ -322,7 +324,7 @@ EXPORT_SYMBOL_GPL(ps3_irq_plug_destroy);
int ps3_event_receive_port_setup(enum ps3_cpu_binding cpu, unsigned int *virq)
{
int result;
unsigned long outlet;
u64 outlet;

result = lv1_construct_event_receive_port(&outlet);

Expand Down Expand Up @@ -468,7 +470,7 @@ int ps3_io_irq_setup(enum ps3_cpu_binding cpu, unsigned int interrupt_id,
unsigned int *virq)
{
int result;
unsigned long outlet;
u64 outlet;

result = lv1_construct_io_irq_outlet(interrupt_id, &outlet);

Expand Down Expand Up @@ -525,7 +527,7 @@ int ps3_vuart_irq_setup(enum ps3_cpu_binding cpu, void* virt_addr_bmp,
unsigned int *virq)
{
int result;
unsigned long outlet;
u64 outlet;
u64 lpar_addr;

BUG_ON(!is_kernel_addr((u64)virt_addr_bmp));
Expand Down Expand Up @@ -581,7 +583,7 @@ int ps3_spe_irq_setup(enum ps3_cpu_binding cpu, unsigned long spe_id,
unsigned int class, unsigned int *virq)
{
int result;
unsigned long outlet;
u64 outlet;

BUG_ON(class > 2);

Expand Down Expand Up @@ -691,7 +693,7 @@ void __init ps3_register_ipi_debug_brk(unsigned int cpu, unsigned int virq)

pd->bmp.ipi_debug_brk_mask = 0x8000000000000000UL >> virq;

pr_debug("%s:%d: cpu %u, virq %u, mask %lxh\n", __func__, __LINE__,
pr_debug("%s:%d: cpu %u, virq %u, mask %llxh\n", __func__, __LINE__,
cpu, virq, pd->bmp.ipi_debug_brk_mask);
}

Expand All @@ -710,7 +712,7 @@ static unsigned int ps3_get_irq(void)
plug &= 0x3f;

if (unlikely(plug == NO_IRQ)) {
pr_debug("%s:%d: no plug found: thread_id %lu\n", __func__,
pr_debug("%s:%d: no plug found: thread_id %llu\n", __func__,
__LINE__, pd->thread_id);
dump_bmp(&per_cpu(ps3_private, 0));
dump_bmp(&per_cpu(ps3_private, 1));
Expand Down Expand Up @@ -745,7 +747,7 @@ void __init ps3_init_IRQ(void)
pd->thread_id = get_hard_smp_processor_id(cpu);
spin_lock_init(&pd->bmp.lock);

pr_debug("%s:%d: ppe_id %lu, thread_id %lu, bmp %lxh\n",
pr_debug("%s:%d: ppe_id %llu, thread_id %llu, bmp %lxh\n",
__func__, __LINE__, pd->ppe_id, pd->thread_id,
ps3_mm_phys_to_lpar(__pa(&pd->bmp)));

Expand All @@ -770,6 +772,6 @@ void ps3_shutdown_IRQ(int cpu)
lv1_get_logical_ppe_id(&ppe_id);
result = lv1_configure_irq_state_bitmap(ppe_id, thread_id, 0);

DBG("%s:%d: lv1_configure_irq_state_bitmap (%lu:%lu/%d) %s\n", __func__,
DBG("%s:%d: lv1_configure_irq_state_bitmap (%llu:%llu/%d) %s\n", __func__,
__LINE__, ppe_id, thread_id, cpu, ps3_result(result));
}
Loading

0 comments on commit b762666

Please sign in to comment.