* [patch 1/9] ps3fb: Convert from printk()/DPRINTK() to dev_*()/pr_*()
From: Geert Uytterhoeven @ 2007-10-08 16:14 UTC (permalink / raw)
To: Antonino A. Daplas, linux-fbdev-devel
Cc: Geert Uytterhoeven, linuxppc-dev, cbe-oss-dev
In-Reply-To: <20071008161421.818458000@pademelon.sonytel.be>
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 17664 bytes --]
From: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com>
Convert ps3fb from printk()/DPRINTK() to dev_*()/pr_*()
Signed-off-by: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com>
---
drivers/video/ps3fb.c | 183 ++++++++++++++++++++++++++------------------------
1 files changed, 96 insertions(+), 87 deletions(-)
--- a/drivers/video/ps3fb.c
+++ b/drivers/video/ps3fb.c
@@ -48,12 +48,6 @@
#define DEVICE_NAME "ps3fb"
-#ifdef PS3FB_DEBUG
-#define DPRINTK(fmt, args...) printk("%s: " fmt, __func__ , ##args)
-#else
-#define DPRINTK(fmt, args...)
-#endif
-
#define L1GPU_CONTEXT_ATTRIBUTE_DISPLAY_SYNC 0x101
#define L1GPU_CONTEXT_ATTRIBUTE_DISPLAY_FLIP 0x102
#define L1GPU_CONTEXT_ATTRIBUTE_FB_SETUP 0x600
@@ -316,7 +310,7 @@ static int ps3fb_get_res_table(u32 xres,
f = ps3fb_res[i].type;
if (!x) {
- DPRINTK("ERROR: ps3fb_get_res_table()\n");
+ pr_debug("ERROR: ps3fb_get_res_table()\n");
return -1;
}
@@ -357,11 +351,11 @@ static unsigned int ps3fb_find_mode(cons
/* Full broadcast modes have the full mode bit set */
mode = i > 12 ? (i - 12) | PS3FB_FULL_MODE_BIT : i + 1;
- DPRINTK("ps3fb_find_mode: mode %u\n", mode);
+ pr_debug("ps3fb_find_mode: mode %u\n", mode);
return mode;
}
- DPRINTK("ps3fb_find_mode: mode not found\n");
+ pr_debug("ps3fb_find_mode: mode not found\n");
return 0;
}
@@ -384,7 +378,7 @@ static const struct fb_videomode *ps3fb_
return &ps3fb_modedb[mode - 1];
}
-static int ps3fb_sync(u32 frame)
+static int ps3fb_sync(struct fb_info *info, u32 frame)
{
int i, status;
u32 xres, yres;
@@ -395,8 +389,8 @@ static int ps3fb_sync(u32 frame)
yres = ps3fb_res[i].yres;
if (frame > ps3fb.num_frames - 1) {
- printk(KERN_WARNING "%s: invalid frame number (%u)\n",
- __func__, frame);
+ dev_warn(info->device, "%s: invalid frame number (%u)\n",
+ __func__, frame);
return -EINVAL;
}
offset = xres * yres * BPP * frame;
@@ -409,26 +403,26 @@ static int ps3fb_sync(u32 frame)
(xres << 16) | yres,
xres * BPP); /* line_length */
if (status)
- printk(KERN_ERR
- "%s: lv1_gpu_context_attribute FB_BLIT failed: %d\n",
- __func__, status);
+ dev_err(info->device,
+ "%s: lv1_gpu_context_attribute FB_BLIT failed: %d\n",
+ __func__, status);
#ifdef HEAD_A
status = lv1_gpu_context_attribute(ps3fb.context_handle,
L1GPU_CONTEXT_ATTRIBUTE_DISPLAY_FLIP,
0, offset, 0, 0);
if (status)
- printk(KERN_ERR
- "%s: lv1_gpu_context_attribute FLIP failed: %d\n",
- __func__, status);
+ dev_err(info->device,
+ "%s: lv1_gpu_context_attribute FLIP failed: %d\n",
+ __func__, status);
#endif
#ifdef HEAD_B
status = lv1_gpu_context_attribute(ps3fb.context_handle,
L1GPU_CONTEXT_ATTRIBUTE_DISPLAY_FLIP,
1, offset, 0, 0);
if (status)
- printk(KERN_ERR
- "%s: lv1_gpu_context_attribute FLIP failed: %d\n",
- __func__, status);
+ dev_err(info->device,
+ "%s: lv1_gpu_context_attribute FLIP failed: %d\n",
+ __func__, status);
#endif
return 0;
}
@@ -445,7 +439,7 @@ static int ps3fb_release(struct fb_info
if (atomic_dec_and_test(&ps3fb.f_count)) {
if (atomic_read(&ps3fb.ext_flip)) {
atomic_set(&ps3fb.ext_flip, 0);
- ps3fb_sync(0); /* single buffer */
+ ps3fb_sync(info, 0); /* single buffer */
}
}
return 0;
@@ -465,8 +459,10 @@ static int ps3fb_check_var(struct fb_var
int mode;
int i;
- DPRINTK("var->xres:%u info->var.xres:%u\n", var->xres, info->var.xres);
- DPRINTK("var->yres:%u info->var.yres:%u\n", var->yres, info->var.yres);
+ dev_dbg(info->device, "var->xres:%u info->var.xres:%u\n", var->xres,
+ info->var.xres);
+ dev_dbg(info->device, "var->yres:%u info->var.yres:%u\n", var->yres,
+ info->var.yres);
/* FIXME For now we do exact matches only */
mode = ps3fb_find_mode(var, &line_length);
@@ -487,7 +483,8 @@ static int ps3fb_check_var(struct fb_var
/* Virtual screen and panning are not supported */
if (var->xres_virtual > var->xres || var->yres_virtual > var->yres ||
var->xoffset || var->yoffset) {
- DPRINTK("Virtual screen and panning are not supported\n");
+ dev_dbg(info->device,
+ "Virtual screen and panning are not supported\n");
return -EINVAL;
}
@@ -502,7 +499,7 @@ static int ps3fb_check_var(struct fb_var
var->blue.length > 8 || var->transp.length > 8 ||
var->red.msb_right || var->green.msb_right ||
var->blue.msb_right || var->transp.msb_right || var->nonstd) {
- DPRINTK("We support ARGB8888 only\n");
+ dev_dbg(info->device, "We support ARGB8888 only\n");
return -EINVAL;
}
@@ -522,14 +519,14 @@ static int ps3fb_check_var(struct fb_var
/* Rotation is not supported */
if (var->rotate) {
- DPRINTK("Rotation is not supported\n");
+ dev_dbg(info->device, "Rotation is not supported\n");
return -EINVAL;
}
/* Memory limit */
i = ps3fb_get_res_table(var->xres, var->yres, mode);
if (ps3fb_res[i].xres*ps3fb_res[i].yres*BPP > ps3fb_videomemory.size) {
- DPRINTK("Not enough memory\n");
+ dev_dbg(info->device, "Not enough memory\n");
return -ENOMEM;
}
@@ -549,7 +546,7 @@ static int ps3fb_set_par(struct fb_info
int i;
unsigned long offset;
- DPRINTK("xres:%d xv:%d yres:%d yv:%d clock:%d\n",
+ dev_dbg(info->device, "xres:%d xv:%d yres:%d yv:%d clock:%d\n",
info->var.xres, info->var.xres_virtual,
info->var.yres, info->var.yres_virtual, info->var.pixclock);
@@ -623,8 +620,8 @@ static int ps3fb_mmap(struct fb_info *in
size, vma->vm_page_prot))
return -EAGAIN;
- printk(KERN_DEBUG "ps3fb: mmap framebuffer P(%lx)->V(%lx)\n", offset,
- vma->vm_start);
+ dev_dbg(info->device, "ps3fb: mmap framebuffer P(%lx)->V(%lx)\n",
+ offset, vma->vm_start);
return 0;
}
@@ -636,7 +633,7 @@ static int ps3fb_blank(int blank, struct
{
int retval;
- DPRINTK("%s: blank:%d\n", __func__, blank);
+ dev_dbg(info->device, "%s: blank:%d\n", __func__, blank);
switch (blank) {
case FB_BLANK_POWERDOWN:
case FB_BLANK_HSYNC_SUSPEND:
@@ -705,7 +702,7 @@ static int ps3fb_ioctl(struct fb_info *i
case FBIOGET_VBLANK:
{
struct fb_vblank vblank;
- DPRINTK("FBIOGET_VBLANK:\n");
+ dev_dbg(info->device, "FBIOGET_VBLANK:\n");
retval = ps3fb_get_vblank(&vblank);
if (retval)
break;
@@ -718,7 +715,7 @@ static int ps3fb_ioctl(struct fb_info *i
case FBIO_WAITFORVSYNC:
{
u32 crt;
- DPRINTK("FBIO_WAITFORVSYNC:\n");
+ dev_dbg(info->device, "FBIO_WAITFORVSYNC:\n");
if (get_user(crt, (u32 __user *) arg))
break;
@@ -739,7 +736,7 @@ static int ps3fb_ioctl(struct fb_info *i
if (id > 0)
val = (val & ~PS3AV_MODE_MASK) | id;
}
- DPRINTK("PS3FB_IOCTL_SETMODE:%x\n", val);
+ dev_dbg(info->device, "PS3FB_IOCTL_SETMODE:%x\n", val);
retval = -EINVAL;
old_mode = ps3fb_mode;
ps3fb_mode = val;
@@ -762,7 +759,7 @@ static int ps3fb_ioctl(struct fb_info *i
case PS3FB_IOCTL_GETMODE:
val = ps3av_get_mode();
- DPRINTK("PS3FB_IOCTL_GETMODE:%x\n", val);
+ dev_dbg(info->device, "PS3FB_IOCTL_GETMODE:%x\n", val);
if (!copy_to_user(argp, &val, sizeof(val)))
retval = 0;
break;
@@ -771,7 +768,7 @@ static int ps3fb_ioctl(struct fb_info *i
{
struct ps3fb_ioctl_res res;
int i = ps3fb.res_index;
- DPRINTK("PS3FB_IOCTL_SCREENINFO:\n");
+ dev_dbg(info->device, "PS3FB_IOCTL_SCREENINFO:\n");
res.xres = ps3fb_res[i].xres;
res.yres = ps3fb_res[i].yres;
res.xoff = ps3fb_res[i].xoff;
@@ -783,13 +780,13 @@ static int ps3fb_ioctl(struct fb_info *i
}
case PS3FB_IOCTL_ON:
- DPRINTK("PS3FB_IOCTL_ON:\n");
+ dev_dbg(info->device, "PS3FB_IOCTL_ON:\n");
atomic_inc(&ps3fb.ext_flip);
retval = 0;
break;
case PS3FB_IOCTL_OFF:
- DPRINTK("PS3FB_IOCTL_OFF:\n");
+ dev_dbg(info->device, "PS3FB_IOCTL_OFF:\n");
atomic_dec_if_positive(&ps3fb.ext_flip);
retval = 0;
break;
@@ -798,8 +795,8 @@ static int ps3fb_ioctl(struct fb_info *i
if (copy_from_user(&val, argp, sizeof(val)))
break;
- DPRINTK("PS3FB_IOCTL_FSEL:%d\n", val);
- retval = ps3fb_sync(val);
+ dev_dbg(info->device, "PS3FB_IOCTL_FSEL:%d\n", val);
+ retval = ps3fb_sync(info, val);
break;
default:
@@ -811,13 +808,15 @@ static int ps3fb_ioctl(struct fb_info *i
static int ps3fbd(void *arg)
{
+ struct fb_info *info = arg;
+
set_freezable();
while (!kthread_should_stop()) {
try_to_freeze();
set_current_state(TASK_INTERRUPTIBLE);
if (ps3fb.is_kicked) {
ps3fb.is_kicked = 0;
- ps3fb_sync(0); /* single buffer */
+ ps3fb_sync(info, 0); /* single buffer */
}
schedule();
}
@@ -826,14 +825,15 @@ static int ps3fbd(void *arg)
static irqreturn_t ps3fb_vsync_interrupt(int irq, void *ptr)
{
+ struct device *dev = ptr;
u64 v1;
int status;
struct display_head *head = &ps3fb.dinfo->display_head[1];
status = lv1_gpu_context_intr(ps3fb.context_handle, &v1);
if (status) {
- printk(KERN_ERR "%s: lv1_gpu_context_intr failed: %d\n",
- __func__, status);
+ dev_err(dev, "%s: lv1_gpu_context_intr failed: %d\n", __func__,
+ status);
return IRQ_NONE;
}
@@ -853,35 +853,35 @@ static irqreturn_t ps3fb_vsync_interrupt
static int ps3fb_vsync_settings(struct gpu_driver_info *dinfo,
- struct ps3_system_bus_device *dev)
+ struct device *dev)
{
int error;
- DPRINTK("version_driver:%x\n", dinfo->version_driver);
- DPRINTK("irq outlet:%x\n", dinfo->irq.irq_outlet);
- DPRINTK("version_gpu:%x memory_size:%x ch:%x core_freq:%d mem_freq:%d\n",
+ dev_dbg(dev, "version_driver:%x\n", dinfo->version_driver);
+ dev_dbg(dev, "irq outlet:%x\n", dinfo->irq.irq_outlet);
+ dev_dbg(dev,
+ "version_gpu: %x memory_size: %x ch: %x core_freq: %d "
+ "mem_freq:%d\n",
dinfo->version_gpu, dinfo->memory_size, dinfo->hardware_channel,
dinfo->nvcore_frequency/1000000, dinfo->memory_frequency/1000000);
if (dinfo->version_driver != GPU_DRIVER_INFO_VERSION) {
- printk(KERN_ERR "%s: version_driver err:%x\n", __func__,
- dinfo->version_driver);
+ dev_err(dev, "%s: version_driver err:%x\n", __func__,
+ dinfo->version_driver);
return -EINVAL;
}
error = ps3_irq_plug_setup(PS3_BINDING_CPU_ANY, dinfo->irq.irq_outlet,
&ps3fb.irq_no);
if (error) {
- printk(KERN_ERR "%s: ps3_alloc_irq failed %d\n", __func__,
- error);
+ dev_err(dev, "%s: ps3_alloc_irq failed %d\n", __func__, error);
return error;
}
error = request_irq(ps3fb.irq_no, ps3fb_vsync_interrupt, IRQF_DISABLED,
DEVICE_NAME, dev);
if (error) {
- printk(KERN_ERR "%s: request_irq failed %d\n", __func__,
- error);
+ dev_err(dev, "%s: request_irq failed %d\n", __func__, error);
ps3_irq_plug_destroy(ps3fb.irq_no);
return error;
}
@@ -891,18 +891,19 @@ static int ps3fb_vsync_settings(struct g
return 0;
}
-static int ps3fb_xdr_settings(u64 xdr_lpar)
+static int ps3fb_xdr_settings(u64 xdr_lpar, struct device *dev)
{
int status;
status = lv1_gpu_context_iomap(ps3fb.context_handle, GPU_IOIF,
xdr_lpar, ps3fb_videomemory.size, 0);
if (status) {
- printk(KERN_ERR "%s: lv1_gpu_context_iomap failed: %d\n",
- __func__, status);
+ dev_err(dev, "%s: lv1_gpu_context_iomap failed: %d\n",
+ __func__, status);
return -ENXIO;
}
- DPRINTK("video:%p xdr_ea:%p ioif:%lx lpar:%lx phys:%lx size:%lx\n",
+ dev_dbg(dev,
+ "video:%p xdr_ea:%p ioif:%lx lpar:%lx phys:%lx size:%lx\n",
ps3fb_videomemory.address, ps3fb.xdr_ea, GPU_IOIF, xdr_lpar,
virt_to_abs(ps3fb.xdr_ea), ps3fb_videomemory.size);
@@ -911,9 +912,9 @@ static int ps3fb_xdr_settings(u64 xdr_lp
xdr_lpar, ps3fb_videomemory.size,
GPU_IOIF, 0);
if (status) {
- printk(KERN_ERR
- "%s: lv1_gpu_context_attribute FB_SETUP failed: %d\n",
- __func__, status);
+ dev_err(dev,
+ "%s: lv1_gpu_context_attribute FB_SETUP failed: %d\n",
+ __func__, status);
return -ENXIO;
}
return 0;
@@ -943,7 +944,7 @@ static struct fb_fix_screeninfo ps3fb_fi
.accel = FB_ACCEL_NONE,
};
-static int ps3fb_set_sync(void)
+static int ps3fb_set_sync(struct device *dev)
{
int status;
@@ -952,8 +953,10 @@ static int ps3fb_set_sync(void)
L1GPU_CONTEXT_ATTRIBUTE_DISPLAY_SYNC,
0, L1GPU_DISPLAY_SYNC_VSYNC, 0, 0);
if (status) {
- printk(KERN_ERR "%s: lv1_gpu_context_attribute DISPLAY_SYNC "
- "failed: %d\n", __func__, status);
+ dev_err(dev,
+ "%s: lv1_gpu_context_attribute DISPLAY_SYNC failed: "
+ "%d\n",
+ __func__, status);
return -1;
}
#endif
@@ -963,8 +966,10 @@ static int ps3fb_set_sync(void)
1, L1GPU_DISPLAY_SYNC_VSYNC, 0, 0);
if (status) {
- printk(KERN_ERR "%s: lv1_gpu_context_attribute DISPLAY_MODE "
- "failed: %d\n", __func__, status);
+ dev_err(dev,
+ "%s: lv1_gpu_context_attribute DISPLAY_SYNC failed: "
+ "%d\n",
+ __func__, status);
return -1;
}
#endif
@@ -988,18 +993,19 @@ static int __devinit ps3fb_probe(struct
status = ps3_open_hv_device(dev);
if (status) {
- printk(KERN_ERR "%s: ps3_open_hv_device failed\n", __func__);
+ dev_err(&dev->core, "%s: ps3_open_hv_device failed\n",
+ __func__);
goto err;
}
if (!ps3fb_mode)
ps3fb_mode = ps3av_get_mode();
- DPRINTK("ps3av_mode:%d\n", ps3fb_mode);
+ dev_dbg(&dev->core, "ps3av_mode:%d\n", ps3fb_mode);
if (ps3fb_mode > 0 &&
!ps3av_video_mode2res(ps3fb_mode, &xres, &yres)) {
ps3fb.res_index = ps3fb_get_res_table(xres, yres, ps3fb_mode);
- DPRINTK("res_index:%d\n", ps3fb.res_index);
+ dev_dbg(&dev->core, "res_index:%d\n", ps3fb.res_index);
} else
ps3fb.res_index = GPU_RES_INDEX;
@@ -1008,43 +1014,44 @@ static int __devinit ps3fb_probe(struct
init_waitqueue_head(&ps3fb.wait_vsync);
ps3fb.num_frames = 1;
- ps3fb_set_sync();
+ ps3fb_set_sync(&dev->core);
/* get gpu context handle */
status = lv1_gpu_memory_allocate(DDR_SIZE, 0, 0, 0, 0,
&ps3fb.memory_handle, &ddr_lpar);
if (status) {
- printk(KERN_ERR "%s: lv1_gpu_memory_allocate failed: %d\n",
- __func__, status);
+ dev_err(&dev->core, "%s: lv1_gpu_memory_allocate failed: %d\n",
+ __func__, status);
goto err;
}
- DPRINTK("ddr:lpar:0x%lx\n", ddr_lpar);
+ dev_dbg(&dev->core, "ddr:lpar:0x%lx\n", ddr_lpar);
status = lv1_gpu_context_allocate(ps3fb.memory_handle, 0,
&ps3fb.context_handle,
&lpar_dma_control, &lpar_driver_info,
&lpar_reports, &lpar_reports_size);
if (status) {
- printk(KERN_ERR "%s: lv1_gpu_context_attribute failed: %d\n",
- __func__, status);
+ dev_err(&dev->core,
+ "%s: lv1_gpu_context_attribute failed: %d\n", __func__,
+ status);
goto err_gpu_memory_free;
}
/* vsync interrupt */
ps3fb.dinfo = ioremap(lpar_driver_info, 128 * 1024);
if (!ps3fb.dinfo) {
- printk(KERN_ERR "%s: ioremap failed\n", __func__);
+ dev_err(&dev->core, "%s: ioremap failed\n", __func__);
goto err_gpu_context_free;
}
- retval = ps3fb_vsync_settings(ps3fb.dinfo, dev);
+ retval = ps3fb_vsync_settings(ps3fb.dinfo, &dev->core);
if (retval)
goto err_iounmap_dinfo;
/* xdr frame buffer */
ps3fb.xdr_ea = ps3fb_videomemory.address;
xdr_lpar = ps3_mm_phys_to_lpar(__pa(ps3fb.xdr_ea));
- retval = ps3fb_xdr_settings(xdr_lpar);
+ retval = ps3fb_xdr_settings(xdr_lpar, &dev->core);
if (retval)
goto err_free_irq;
@@ -1087,9 +1094,9 @@ static int __devinit ps3fb_probe(struct
dev->core.driver_data = info;
- printk(KERN_INFO
- "fb%d: PS3 frame buffer device, using %ld KiB of video memory\n",
- info->node, ps3fb_videomemory.size >> 10);
+ dev_info(info->device, "%s %s, using %lu KiB of video memory\n",
+ dev_driver_string(info->dev), info->dev->bus_id,
+ ps3fb_videomemory.size >> 10);
task = kthread_run(ps3fbd, info, DEVICE_NAME);
if (IS_ERR(task)) {
@@ -1126,7 +1133,7 @@ static int ps3fb_shutdown(struct ps3_sys
int status;
struct fb_info *info = dev->core.driver_data;
- DPRINTK(" -> %s:%d\n", __func__, __LINE__);
+ dev_dbg(&dev->core, " -> %s:%d\n", __func__, __LINE__);
ps3fb_flip_ctl(0, &ps3fb); /* flip off */
ps3fb.dinfo->irq.mask = 0;
@@ -1151,14 +1158,16 @@ static int ps3fb_shutdown(struct ps3_sys
status = lv1_gpu_context_free(ps3fb.context_handle);
if (status)
- DPRINTK("lv1_gpu_context_free failed: %d\n", status);
+ dev_dbg(&dev->core, "lv1_gpu_context_free failed: %d\n",
+ status);
status = lv1_gpu_memory_free(ps3fb.memory_handle);
if (status)
- DPRINTK("lv1_gpu_memory_free failed: %d\n", status);
+ dev_dbg(&dev->core, "lv1_gpu_memory_free failed: %d\n",
+ status);
ps3_close_hv_device(dev);
- DPRINTK(" <- %s:%d\n", __func__, __LINE__);
+ dev_dbg(&dev->core, " <- %s:%d\n", __func__, __LINE__);
return 0;
}
@@ -1211,9 +1220,9 @@ static int __init ps3fb_init(void)
static void __exit ps3fb_exit(void)
{
- DPRINTK(" -> %s:%d\n", __func__, __LINE__);
+ pr_debug(" -> %s:%d\n", __func__, __LINE__);
ps3_system_bus_driver_unregister(&ps3fb_driver);
- DPRINTK(" <- %s:%d\n", __func__, __LINE__);
+ pr_debug(" <- %s:%d\n", __func__, __LINE__);
}
module_init(ps3fb_init);
--
With kind regards,
Geert Uytterhoeven
Software Architect
Sony Network and Software Technology Center Europe
The Corporate Village · Da Vincilaan 7-D1 · B-1935 Zaventem · Belgium
Phone: +32 (0)2 700 8453
Fax: +32 (0)2 700 8622
E-mail: Geert.Uytterhoeven@sonycom.com
Internet: http://www.sony-europe.com/
Sony Network and Software Technology Center Europe
A division of Sony Service Centre (Europe) N.V.
Registered office: Technologielaan 7 · B-1840 Londerzeel · Belgium
VAT BE 0413.825.160 · RPR Brussels
Fortis Bank Zaventem · Swift GEBABEBB08A · IBAN BE39001382358619
^ permalink raw reply
* [patch 0/9] PS3 Virtual Frame Buffer Device Driver patches for 2.6.24
From: Geert Uytterhoeven @ 2007-10-08 16:14 UTC (permalink / raw)
To: Antonino A. Daplas, linux-fbdev-devel; +Cc: linuxppc-dev, cbe-oss-dev
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 1276 bytes --]
Hi,
Here are some new patches for the PS3 Virtual Frame Buffer Device Driver
(ps3fb):
[1] ps3fb: Convert from printk()/DPRINTK() to dev_*()/pr_*()
[2] ps3fb: Do not print warnings on invalid frame numbers
[3] ps3fb: Clean up includes
[4] ps3fb: Make ps3fb_wait_for_vsync() and ps3fb_flip_ctl() static
[5] ps3fb: Fix possible overlap of GPU command buffer and frame buffer
[6] ps3fb: Use fb_info.par properly
[7] ps3fb: Don't keep the borders for non-fullscreen modes in XDR memory
[8] ps3fb: Add virtual screen and panning support
[9] ps3fb: Enhance horizontal panning on firmware 1.90 and up
Please review, and queue for 2.6.24 if they're ok. Thanks!
With kind regards,
Geert Uytterhoeven
Software Architect
Sony Network and Software Technology Center Europe
The Corporate Village · Da Vincilaan 7-D1 · B-1935 Zaventem · Belgium
Phone: +32 (0)2 700 8453
Fax: +32 (0)2 700 8622
E-mail: Geert.Uytterhoeven@sonycom.com
Internet: http://www.sony-europe.com/
Sony Network and Software Technology Center Europe
A division of Sony Service Centre (Europe) N.V.
Registered office: Technologielaan 7 · B-1840 Londerzeel · Belgium
VAT BE 0413.825.160 · RPR Brussels
Fortis Bank Zaventem · Swift GEBABEBB08A · IBAN BE39001382358619
^ permalink raw reply
* Re: [linux-usb-devel] [PATCH] OHCI: add PowerPC 440EP/440EPx support
From: Valentine Barshak @ 2007-10-08 16:06 UTC (permalink / raw)
To: David Brownell; +Cc: linuxppc-dev, linux-usb-devel
In-Reply-To: <20071008150125.26C802393C7@adsl-69-226-248-13.dsl.pltn13.pacbell.net>
David Brownell wrote:
>> @@ -612,7 +612,7 @@ static inline u32 hc32_to_cpup (const st
>> * to arch/powerpc
>> */
>>
>> -#ifdef CONFIG_STB03xxx
>> +#if defined(CONFIG_STB03xxx) || defined(CONFIG_440EP) || defined(CONFIG_440EPX)
>> #define OHCI_BE_FRAME_NO_SHIFT 16
>> #else
>> #define OHCI_BE_FRAME_NO_SHIFT 0
>
> Near as I can tell, the original code is wrong ... the hcca->frame_no
> byte offset is fully specified, so that shift should always be 16.
>
> - Dave
>
Are you saying that it should always be #define OHCI_BE_FRAME_NO_SHIFT
16 for big endian platforms?
^ permalink raw reply
* Re: [PATCH] Eval boards should not need to mess with ROOT_DEV
From: Kumar Gala @ 2007-10-08 15:27 UTC (permalink / raw)
To: Grant Likely; +Cc: linuxppc-dev
In-Reply-To: <20071008151254.7777.38512.stgit@trillian.cg.shawcable.net>
On Oct 8, 2007, at 10:12 AM, Grant Likely wrote:
> From: Grant Likely <grant.likely@secretlab.ca>
>
> I can't see a good reason for eval board platform code to mess with
> the
> ROOT_DEV value instead of using the default behaviour (so I'm writing
> this patch to see if anyone will clue me in).
>
> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
> ---
>
> arch/powerpc/platforms/52xx/efika.c | 9 ---------
> arch/powerpc/platforms/52xx/lite5200.c | 12 ------------
> arch/powerpc/platforms/82xx/mpc82xx_ads.c | 6 ------
> arch/powerpc/platforms/8xx/mpc86xads_setup.c | 2 --
> arch/powerpc/platforms/8xx/mpc885ads_setup.c | 2 --
> arch/powerpc/platforms/chrp/setup.c | 10 ----------
> 6 files changed, 0 insertions(+), 41 deletions(-)
FYI, 82xx_ads and 885ads don't have this issue in my tree based on
fixes from Scott.
- k
^ permalink raw reply
* Re: [PATCH 07/15] [POWERPC] Promess Motion-PRO DTS
From: Grant Likely @ 2007-10-08 15:16 UTC (permalink / raw)
To: Scott Wood; +Cc: linuxppc-dev, Marian Balakowicz
In-Reply-To: <20071008145823.GA4289@loki.buserror.net>
Hey Scott.
Pretty much all your comments below directly apply to the existing
Lite5200 device tree and the Efika firmware. These are issues that
were created a while ago and I've never gone back to clean up the
mpc5200 device tree bindings. (Plus we need to have code to maintian
compatibility with the Efika firmware.
g.
On 10/8/07, Scott Wood <scottwood@freescale.com> wrote:
> On Sun, Oct 07, 2007 at 01:25:33PM +0200, Marian Balakowicz wrote:
> > + gpt@600 { // General Purpose Timer
> > + compatible = "mpc5200b-gpt\0mpc5200-gpt";
> > + device_type = "gpt";
>
> "timer" would be a better node name than "gpt", and the device type should be
> left out entirely. As others pointed out, compatible should be
> "fsl,mpc5200b-gpt", "fsl,mpc5200-gpt".
>
> > + has-wdt;
>
> fsl,has-wdt
>
> > + rtc@800 { // Real time clock
> > + compatible = "mpc5200b-rtc\0mpc5200-rtc";
> > + device_type = "rtc";
>
> This doesn't actually implement the OF rtc interface...
>
> > + mscan@980 {
>
> What is mscan?
>
> > + device_type = "mscan";
>
> This is not a standard device type.
>
> > + bestcomm@1200 {
> > + device_type = "dma-controller";
>
> dma-controller should be the node name, and device_type should be omitted.
>
> > + ethernet@3000 {
> > + device_type = "network";
> > + compatible = "mpc5200b-fec\0mpc5200-fec";
> > + reg = <3000 800>;
> > + mac-address = [ 02 03 04 05 06 07 ]; // Bad!
>
> Should be local-mac-address.
> And yes, hardcoding a mac address is bad. Don't do it. :-)
>
> > + i2c@3d40 {
> > + device_type = "i2c";
> > + compatible = "mpc5200b-i2c\0mpc5200-i2c\0fsl-i2c";
> > + cell-index = <1>;
>
> What is cell-index? The fsl-i2c driver doesn't use it AFAICT.
>
> > + sram@8000 {
> > + device_type = "sram";
>
> No device type.
>
> > + cpld {
> > + device_type = "cpld";
> > + compatible = "cpld";
> > + reg = <50010000 ffff>;
> > + };
>
> This device is compatible with every CPLD that has ever existed? Wow! :-)
>
> -Scott
> _______________________________________________
> Linuxppc-dev mailing list
> Linuxppc-dev@ozlabs.org
> https://ozlabs.org/mailman/listinfo/linuxppc-dev
>
--
Grant Likely, B.Sc., P.Eng.
Secret Lab Technologies Ltd.
grant.likely@secretlab.ca
(403) 399-0195
^ permalink raw reply
* [PATCH] Eval boards should not need to mess with ROOT_DEV
From: Grant Likely @ 2007-10-08 15:12 UTC (permalink / raw)
To: linuxppc-dev, galak
From: Grant Likely <grant.likely@secretlab.ca>
I can't see a good reason for eval board platform code to mess with the
ROOT_DEV value instead of using the default behaviour (so I'm writing
this patch to see if anyone will clue me in).
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
---
arch/powerpc/platforms/52xx/efika.c | 9 ---------
arch/powerpc/platforms/52xx/lite5200.c | 12 ------------
arch/powerpc/platforms/82xx/mpc82xx_ads.c | 6 ------
arch/powerpc/platforms/8xx/mpc86xads_setup.c | 2 --
arch/powerpc/platforms/8xx/mpc885ads_setup.c | 2 --
arch/powerpc/platforms/chrp/setup.c | 10 ----------
6 files changed, 0 insertions(+), 41 deletions(-)
diff --git a/arch/powerpc/platforms/52xx/efika.c b/arch/powerpc/platforms/52xx/efika.c
index 4263158..0b1e60a 100644
--- a/arch/powerpc/platforms/52xx/efika.c
+++ b/arch/powerpc/platforms/52xx/efika.c
@@ -197,15 +197,6 @@ static void __init efika_setup_arch(void)
{
rtas_initialize();
-#ifdef CONFIG_BLK_DEV_INITRD
- initrd_below_start_ok = 1;
-
- if (initrd_start)
- ROOT_DEV = Root_RAM0;
- else
-#endif
- ROOT_DEV = Root_SDA2; /* sda2 (sda1 is for the kernel) */
-
efika_pcisetup();
#ifdef CONFIG_PM
diff --git a/arch/powerpc/platforms/52xx/lite5200.c b/arch/powerpc/platforms/52xx/lite5200.c
index e11d27f..48fc662 100644
--- a/arch/powerpc/platforms/52xx/lite5200.c
+++ b/arch/powerpc/platforms/52xx/lite5200.c
@@ -136,18 +136,6 @@ static void __init lite5200_setup_arch(void)
of_node_put(np);
}
#endif
-
-#ifdef CONFIG_BLK_DEV_INITRD
- if (initrd_start)
- ROOT_DEV = Root_RAM0;
- else
-#endif
-#ifdef CONFIG_ROOT_NFS
- ROOT_DEV = Root_NFS;
-#else
- ROOT_DEV = Root_HDA1;
-#endif
-
}
static void lite5200_show_cpuinfo(struct seq_file *m)
diff --git a/arch/powerpc/platforms/82xx/mpc82xx_ads.c b/arch/powerpc/platforms/82xx/mpc82xx_ads.c
index 4008795..a1af287 100644
--- a/arch/powerpc/platforms/82xx/mpc82xx_ads.c
+++ b/arch/powerpc/platforms/82xx/mpc82xx_ads.c
@@ -575,12 +575,6 @@ static void __init mpc82xx_ads_setup_arch(void)
of_node_put(np);
#endif
-#ifdef CONFIG_ROOT_NFS
- ROOT_DEV = Root_NFS;
-#else
- ROOT_DEV = Root_HDA1;
-#endif
-
if (ppc_md.progress)
ppc_md.progress("mpc82xx_ads_setup_arch(), finish", 0);
}
diff --git a/arch/powerpc/platforms/8xx/mpc86xads_setup.c b/arch/powerpc/platforms/8xx/mpc86xads_setup.c
index 8f64f48..c712ce0 100644
--- a/arch/powerpc/platforms/8xx/mpc86xads_setup.c
+++ b/arch/powerpc/platforms/8xx/mpc86xads_setup.c
@@ -256,8 +256,6 @@ static void __init mpc86xads_setup_arch(void)
cpm_reset();
mpc86xads_board_setup();
-
- ROOT_DEV = Root_NFS;
}
static int __init mpc86xads_probe(void)
diff --git a/arch/powerpc/platforms/8xx/mpc885ads_setup.c b/arch/powerpc/platforms/8xx/mpc885ads_setup.c
index a1dab4c..4c67cf6 100644
--- a/arch/powerpc/platforms/8xx/mpc885ads_setup.c
+++ b/arch/powerpc/platforms/8xx/mpc885ads_setup.c
@@ -408,8 +408,6 @@ static void __init mpc885ads_setup_arch(void)
cpm_reset();
mpc885ads_board_setup();
-
- ROOT_DEV = Root_NFS;
}
static int __init mpc885ads_probe(void)
diff --git a/arch/powerpc/platforms/chrp/setup.c b/arch/powerpc/platforms/chrp/setup.c
index 96498ad..5930626 100644
--- a/arch/powerpc/platforms/chrp/setup.c
+++ b/arch/powerpc/platforms/chrp/setup.c
@@ -290,16 +290,6 @@ void __init chrp_setup_arch(void)
ppc_md.set_rtc_time = rtas_set_rtc_time;
}
-#ifdef CONFIG_BLK_DEV_INITRD
- /* this is fine for chrp */
- initrd_below_start_ok = 1;
-
- if (initrd_start)
- ROOT_DEV = Root_RAM0;
- else
-#endif
- ROOT_DEV = Root_SDA2; /* sda2 (sda1 is for the kernel) */
-
/* On pegasos, enable the L2 cache if not already done by OF */
pegasos_set_l2cr();
^ permalink raw reply related
* Re: [POWERPC 03/15] [POWERPC] TQM5200 board support
From: Scott Wood @ 2007-10-08 15:04 UTC (permalink / raw)
To: Marian Balakowicz; +Cc: linuxppc-dev
In-Reply-To: <4708C0DA.2040606@semihalf.com>
On Sun, Oct 07, 2007 at 01:19:54PM +0200, Marian Balakowicz wrote:
> + np = of_find_node_by_type(NULL, "cpu");
> + if (np) {
> + unsigned int *fp =
> + (int *)of_get_property(np, "clock-frequency", NULL);
> + if (fp != 0)
> + loops_per_jiffy = *fp / HZ;
> + else
> + loops_per_jiffy = 50000000 / HZ;
> + of_node_put(np);
> + }
This is unnecessary legacy cruft.
> +#ifdef CONFIG_PCI
> + np = of_find_node_by_type(NULL, "pci");
> + if (np) {
> + mpc52xx_add_bridge(np);
> + of_node_put(np);
> + }
> +#endif
You should check for a specific compatible, so that you don't match
PCI-to-PCI bridges.
> +#ifdef CONFIG_BLK_DEV_INITRD
> + if (initrd_start)
> + /*
> + * We want the proper initrd behavior, i.e., launching of
> + * /linuxrc from the initial root file system, and not only
> + * mounting it as the normal root file system.
> + */
> + ROOT_DEV = 0x0;
> + else
> +#endif
> +#ifdef CONFIG_ROOT_NFS
> + ROOT_DEV = Root_NFS;
> +#else
> + ROOT_DEV = Root_HDA1;
> +#endif
More legacy cruft.
> +void tqm5200_show_cpuinfo(struct seq_file *m)
> +{
> + struct device_node* np = of_find_all_nodes(NULL);
> + const char *model = NULL;
> +
> + if (np)
> + model = of_get_property(np, "model", NULL);
> +
> + seq_printf(m, "vendor\t\t: Freescale Semiconductor\n");
> + seq_printf(m, "machine\t\t: %s\n", model ? model : "unknown");
> +
> + of_node_put(np);
> +}
Get rid of this.
-Scott
^ permalink raw reply
* Re: [linux-usb-devel] [PATCH] OHCI: add PowerPC 440EP/440EPx support
From: David Brownell @ 2007-10-08 15:01 UTC (permalink / raw)
To: vbarshak, linuxppc-dev; +Cc: linux-usb-devel
In-Reply-To: <20071008142554.GA15175@ru.mvista.com>
> @@ -612,7 +612,7 @@ static inline u32 hc32_to_cpup (const st
> * to arch/powerpc
> */
>
> -#ifdef CONFIG_STB03xxx
> +#if defined(CONFIG_STB03xxx) || defined(CONFIG_440EP) || defined(CONFIG_440EPX)
> #define OHCI_BE_FRAME_NO_SHIFT 16
> #else
> #define OHCI_BE_FRAME_NO_SHIFT 0
Near as I can tell, the original code is wrong ... the hcca->frame_no
byte offset is fully specified, so that shift should always be 16.
- Dave
^ permalink raw reply
* Re: [PATCH 07/15] [POWERPC] Promess Motion-PRO DTS
From: Scott Wood @ 2007-10-08 14:58 UTC (permalink / raw)
To: Marian Balakowicz; +Cc: linuxppc-dev
In-Reply-To: <4708C22D.5060805@semihalf.com>
On Sun, Oct 07, 2007 at 01:25:33PM +0200, Marian Balakowicz wrote:
> + gpt@600 { // General Purpose Timer
> + compatible = "mpc5200b-gpt\0mpc5200-gpt";
> + device_type = "gpt";
"timer" would be a better node name than "gpt", and the device type should be
left out entirely. As others pointed out, compatible should be
"fsl,mpc5200b-gpt", "fsl,mpc5200-gpt".
> + has-wdt;
fsl,has-wdt
> + rtc@800 { // Real time clock
> + compatible = "mpc5200b-rtc\0mpc5200-rtc";
> + device_type = "rtc";
This doesn't actually implement the OF rtc interface...
> + mscan@980 {
What is mscan?
> + device_type = "mscan";
This is not a standard device type.
> + bestcomm@1200 {
> + device_type = "dma-controller";
dma-controller should be the node name, and device_type should be omitted.
> + ethernet@3000 {
> + device_type = "network";
> + compatible = "mpc5200b-fec\0mpc5200-fec";
> + reg = <3000 800>;
> + mac-address = [ 02 03 04 05 06 07 ]; // Bad!
Should be local-mac-address.
And yes, hardcoding a mac address is bad. Don't do it. :-)
> + i2c@3d40 {
> + device_type = "i2c";
> + compatible = "mpc5200b-i2c\0mpc5200-i2c\0fsl-i2c";
> + cell-index = <1>;
What is cell-index? The fsl-i2c driver doesn't use it AFAICT.
> + sram@8000 {
> + device_type = "sram";
No device type.
> + cpld {
> + device_type = "cpld";
> + compatible = "cpld";
> + reg = <50010000 ffff>;
> + };
This device is compatible with every CPLD that has ever existed? Wow! :-)
-Scott
^ permalink raw reply
* [PATCH] PowerPC 440EPx Sequoia USB OHCI DTS entry
From: Valentine Barshak @ 2007-10-08 14:26 UTC (permalink / raw)
To: linuxppc-dev; +Cc: linux-usb-devel
PowerPC 440EPx Sequoia USB OHCI device tree entry.
Signed-off-by: Valentine Barshak <vbarshak@ru.mvista.com>
---
arch/powerpc/boot/dts/sequoia.dts | 7 +++++++
1 files changed, 7 insertions(+)
diff -pruN linux-2.6.orig/arch/powerpc/boot/dts/sequoia.dts linux-2.6/arch/powerpc/boot/dts/sequoia.dts
--- linux-2.6.orig/arch/powerpc/boot/dts/sequoia.dts 2007-10-08 16:29:54.000000000 +0400
+++ linux-2.6/arch/powerpc/boot/dts/sequoia.dts 2007-10-08 17:56:05.000000000 +0400
@@ -122,6 +122,13 @@
interrupt-map-mask = <ffffffff>;
};
+ USB1: usb@e0000400 {
+ compatible = "ohci-be";
+ reg = <0 e0000400 60>;
+ interrupt-parent = <&UIC0>;
+ interrupts = <15 8>;
+ };
+
POB0: opb {
compatible = "ibm,opb-440epx", "ibm,opb";
#address-cells = <1>;
^ permalink raw reply
* [PATCH] OHCI: add PowerPC 440EP/440EPx support
From: Valentine Barshak @ 2007-10-08 14:25 UTC (permalink / raw)
To: linuxppc-dev; +Cc: linux-usb-devel
PowerPC 440EP 440EPx OHCI controller needs frame number value shift.
Signed-off-by: Valentine Barshak <vbarshak@ru.mvista.com>
---
drivers/usb/host/ohci.h | 2 +-
1 files changed, 1 insertion(+), 1 deletion(-)
diff -pruN linux-2.6.orig/drivers/usb/host/ohci.h linux-2.6/drivers/usb/host/ohci.h
--- linux-2.6.orig/drivers/usb/host/ohci.h 2007-10-08 16:30:28.000000000 +0400
+++ linux-2.6/drivers/usb/host/ohci.h 2007-10-08 17:55:43.000000000 +0400
@@ -612,7 +612,7 @@ static inline u32 hc32_to_cpup (const st
* to arch/powerpc
*/
-#ifdef CONFIG_STB03xxx
+#if defined(CONFIG_STB03xxx) || defined(CONFIG_440EP) || defined(CONFIG_440EPX)
#define OHCI_BE_FRAME_NO_SHIFT 16
#else
#define OHCI_BE_FRAME_NO_SHIFT 0
^ permalink raw reply
* Re: [PATCH] fsl_spi_init: Support non-QE processors
From: Kumar Gala @ 2007-10-08 14:09 UTC (permalink / raw)
To: Peter Korsgaard; +Cc: PowerPC dev list, Stephen Rothwell
In-Reply-To: <87ejg8vwhb.fsf@macbook.be.48ers.dk>
On Oct 6, 2007, at 3:06 PM, Peter Korsgaard wrote:
>>>>>> "Kumar" == Kumar Gala <galak@kernel.crashing.org> writes:
>
> Kumar> On Oct 3, 2007, at 11:01 PM, Stephen Rothwell wrote:
>
>>> On Wed, 03 Oct 2007 17:43:50 +0200 Peter Korsgaard
>>> <jacmet@sunsite.dk> wrote:
>>>>
>>>> @@ -1220,14 +1220,17 @@ int __init fsl_spi_init(struct
>>>> spi_board_info *board_infos,
>>>> {
>>>> struct device_node *np;
>>>> unsigned int i;
>>>> - const u32 *sysclk;
>>>> + const u32 *qe_sysclk = 0, *soc_sysclk = 0;
>>>
>>> Please use NULL when referring to pointers.
>
> Kumar> Peter, any chance of getting a respin. I'd like this to go
> Kumar> into 2.6.24.
>
> Certainly. Sorry for the delay, I have been offline for 2 days
> building my house ..
applied.
No problem, sounds like fun.
If you get a chance can you test my for-2.6.24 board to make SPI is
functional as you expect.
thanks
- k
^ permalink raw reply
* [PATCH] ehea: use kernel event queue
From: Jan-Bernd Themann @ 2007-10-08 14:01 UTC (permalink / raw)
To: Jeff Garzik
Cc: Thomas Klein, Jan-Bernd Themann, netdev, linux-kernel, linux-ppc,
Christoph Raisch, Marcus Eder, Stefan Roscher, Anton Blanchard
eHEA recovery and DLPAR functions are called seldomly. The eHEA workqueues
are replaced by the kernel event queue.
Signed-off-by: Jan-Bernd Themann <themann@de.ibm.com>
---
The patch has been built against upstream git
drivers/net/ehea/ehea.h | 3 +--
drivers/net/ehea/ehea_main.c | 28 ++++++++--------------------
drivers/net/ehea/ehea_qmr.c | 3 +--
3 files changed, 10 insertions(+), 24 deletions(-)
diff --git a/drivers/net/ehea/ehea.h b/drivers/net/ehea/ehea.h
index 3022089..ac21526 100644
--- a/drivers/net/ehea/ehea.h
+++ b/drivers/net/ehea/ehea.h
@@ -40,7 +40,7 @@
#include <asm/io.h>
#define DRV_NAME "ehea"
-#define DRV_VERSION "EHEA_0077"
+#define DRV_VERSION "EHEA_0078"
/* eHEA capability flags */
#define DLPAR_PORT_ADD_REM 1
@@ -391,7 +391,6 @@ struct ehea_adapter {
struct ibmebus_dev *ebus_dev;
struct ehea_port *port[EHEA_MAX_PORTS];
struct ehea_eq *neq; /* notification event queue */
- struct workqueue_struct *ehea_wq;
struct tasklet_struct neq_tasklet;
struct ehea_mr mr;
u32 pd; /* protection domain */
diff --git a/drivers/net/ehea/ehea_main.c b/drivers/net/ehea/ehea_main.c
index 5bc0a15..2ba57e6 100644
--- a/drivers/net/ehea/ehea_main.c
+++ b/drivers/net/ehea/ehea_main.c
@@ -94,7 +94,6 @@ MODULE_PARM_DESC(use_lro, " Large Receive Offload, 1: enable, 0: disable, "
static int port_name_cnt = 0;
static LIST_HEAD(adapter_list);
u64 ehea_driver_flags = 0;
-struct workqueue_struct *ehea_driver_wq;
struct work_struct ehea_rereg_mr_task;
struct semaphore dlpar_mem_lock;
@@ -421,7 +420,7 @@ static int ehea_treat_poll_error(struct ehea_port_res *pr, int rq,
if (cqe->status & EHEA_CQE_STAT_FAT_ERR_MASK) {
ehea_error("Critical receive error. Resetting port.");
- queue_work(pr->port->adapter->ehea_wq, &pr->port->reset_task);
+ schedule_work(&pr->port->reset_task);
return 1;
}
@@ -596,8 +595,7 @@ static struct ehea_cqe *ehea_proc_cqes(struct ehea_port_res *pr, int my_quota)
ehea_error("Send Completion Error: Resetting port");
if (netif_msg_tx_err(pr->port))
ehea_dump(cqe, sizeof(*cqe), "Send CQE");
- queue_work(pr->port->adapter->ehea_wq,
- &pr->port->reset_task);
+ schedule_work(&pr->port->reset_task);
break;
}
@@ -716,7 +714,7 @@ static irqreturn_t ehea_qp_aff_irq_handler(int irq, void *param)
eqe = ehea_poll_eq(port->qp_eq);
}
- queue_work(port->adapter->ehea_wq, &port->reset_task);
+ schedule_work(&port->reset_task);
return IRQ_HANDLED;
}
@@ -2395,7 +2393,7 @@ static int ehea_stop(struct net_device *dev)
if (netif_msg_ifdown(port))
ehea_info("disabling port %s", dev->name);
- flush_workqueue(port->adapter->ehea_wq);
+ flush_scheduled_work();
down(&port->port_lock);
netif_stop_queue(dev);
ret = ehea_down(dev);
@@ -2710,7 +2708,7 @@ static void ehea_tx_watchdog(struct net_device *dev)
if (netif_carrier_ok(dev) &&
!test_bit(__EHEA_STOP_XFER, &ehea_driver_flags))
- queue_work(port->adapter->ehea_wq, &port->reset_task);
+ schedule_work(&port->reset_task);
}
int ehea_sense_adapter_attr(struct ehea_adapter *adapter)
@@ -3243,15 +3241,9 @@ static int __devinit ehea_probe_adapter(struct ibmebus_dev *dev,
goto out_kill_eq;
}
- adapter->ehea_wq = create_workqueue("ehea_wq");
- if (!adapter->ehea_wq) {
- ret = -EIO;
- goto out_free_irq;
- }
-
ret = ehea_create_device_sysfs(dev);
if (ret)
- goto out_kill_wq;
+ goto out_free_irq;
ret = ehea_setup_ports(adapter);
if (ret) {
@@ -3265,9 +3257,6 @@ static int __devinit ehea_probe_adapter(struct ibmebus_dev *dev,
out_rem_dev_sysfs:
ehea_remove_device_sysfs(dev);
-out_kill_wq:
- destroy_workqueue(adapter->ehea_wq);
-
out_free_irq:
ibmebus_free_irq(NULL, adapter->neq->attr.ist1, adapter);
@@ -3293,7 +3282,7 @@ static int __devexit ehea_remove(struct ibmebus_dev *dev)
ehea_remove_device_sysfs(dev);
- destroy_workqueue(adapter->ehea_wq);
+ flush_scheduled_work();
ibmebus_free_irq(NULL, adapter->neq->attr.ist1, adapter);
tasklet_kill(&adapter->neq_tasklet);
@@ -3351,7 +3340,6 @@ int __init ehea_module_init(void)
printk(KERN_INFO "IBM eHEA ethernet device driver (Release %s)\n",
DRV_VERSION);
- ehea_driver_wq = create_workqueue("ehea_driver_wq");
INIT_WORK(&ehea_rereg_mr_task, ehea_rereg_mrs);
sema_init(&dlpar_mem_lock, 1);
@@ -3385,7 +3373,7 @@ out:
static void __exit ehea_module_exit(void)
{
- destroy_workqueue(ehea_driver_wq);
+ flush_scheduled_work();
driver_remove_file(&ehea_driver.driver, &driver_attr_capabilities);
ibmebus_unregister_driver(&ehea_driver);
ehea_destroy_busmap();
diff --git a/drivers/net/ehea/ehea_qmr.c b/drivers/net/ehea/ehea_qmr.c
index 329a252..83b7643 100644
--- a/drivers/net/ehea/ehea_qmr.c
+++ b/drivers/net/ehea/ehea_qmr.c
@@ -34,7 +34,6 @@
struct ehea_busmap ehea_bmap = { 0, 0, NULL };
extern u64 ehea_driver_flags;
-extern struct workqueue_struct *ehea_driver_wq;
extern struct work_struct ehea_rereg_mr_task;
@@ -618,7 +617,7 @@ u64 ehea_map_vaddr(void *caddr)
if (unlikely(mapped_addr == -1))
if (!test_and_set_bit(__EHEA_STOP_XFER, &ehea_driver_flags))
- queue_work(ehea_driver_wq, &ehea_rereg_mr_task);
+ schedule_work(&ehea_rereg_mr_task);
return mapped_addr;
}
--
1.5.2
^ permalink raw reply related
* Re: [patch 2/6] PS3: Remove unused os-area params
From: Ranulf Doswell @ 2007-10-08 14:00 UTC (permalink / raw)
To: geoffrey.levand@am.sony.com; +Cc: linuxppc-dev
In-Reply-To: <20071006213542.595771597@am.sony.com>
[-- Attachment #1: Type: text/plain, Size: 1144 bytes --]
On 06/10/2007, geoffrey.levand@am.sony.com <geoffrey.levand@am.sony.com>
wrote:
> struct saved_params {
>- /* param 0 */
> s64 rtc_diff;
> unsigned int av_multi_out;
>- unsigned int ctrl_button;
>- /* param 1 */
>- u8 static_ip_addr[4];
>- u8 network_mask[4];
>- u8 default_gateway[4];
>- /* param 2 */
>- u8 dns_primary[4];
>- u8 dns_secondary[4];
> } static saved_params;
As these values are correctly populated by the hypervisor from the
preferences on the standard PS3 OS, it is incredibly useful to have this
information available.
Whilst none of the current 'popular' distributions use these fields, I am
currently in the process of making a bootable CD image that does use them in
order to initialise the network. Not having this information available means
that the only sensible option is to use DHCP, which may well not be
available in every case.
Please can we have these fields back? They don't actually take up all that
much room, yet they are incredibly useful.
--
Ranulf Doswell
One of the major reasons for the downfall of the Roman Empire was, lacking
zero, they had no way to indicate termination of their C strings.
[-- Attachment #2: Type: text/html, Size: 1425 bytes --]
^ permalink raw reply
* Re: [PATCH 00/15] [POWERPC] TQM5200, CM5200 and Motion-PRO support
From: Kumar Gala @ 2007-10-08 13:57 UTC (permalink / raw)
To: Marian Balakowicz; +Cc: linuxppc-dev
In-Reply-To: <47075FA7.3030108@semihalf.com>
On Oct 6, 2007, at 5:12 AM, Marian Balakowicz wrote:
> Hello,
>
> The following series of patches adds arch/powerpc support for three
> MPC5200 based boards:
> TQM5200, CM5200 and Motion-PRO.
>
> Included are also patches with modifications to common 52xx code.
> New helper
> routine mpc52xx_find_and_map_path() is added, and is being used in
> LED driver
> for Motion-PRO. Another patch adds mpc52xx_restart(), mpc52xx_halt()
> and mpc52xx_power_off(). This modification has been around for some
> time now
> and relies on Sascha Hauer's patch.
>
> 01/15 [POWERPC] TQM5200 DTS
> 02/15 [POWERPC] TQM5200 defconfig
> 03/15 [POWERPC] TQM5200 board support
> 04/15 [POWERPC] cm5200 DTS
> 05/15 [POWERPC] cm5200 defconfig
> 06/15 [POWERPC] cm5200 board support
> 07/15 [POWERPC] Promess motionpro DTS
> 08/15 [POWERPC] Promess motionpro defconfig
> 09/15 [POWERPC] Promess motionpro board support
> 10/15 [POWERPC] Add mpc52xx_find_and_map_path(), refactor utility
> functions.
> 11/15 [POWERPC] Motion-PRO: Add LED support.
> 12/15 [POWERPC] Add mpc52xx_restart(), mpc52xx_halt(),
> mpc52xx_power_off().
> 13/15 [POWERPC] Init restart/halt/power_off machine hooks for tqm5200.
> 14/15 [POWERPC] Init restart/halt/power_off machine hooks for cm5200.
> 15/15 [POWERPC] Init restart/halt/power_off machine hooks for
> motionpro.
Why don't you submit patch 12/15 first so you can just fold 13/14/15
into their respect board support patches. In general any generic
clean patches first is usually a good idea followed by the patches
that depend on them.
- k
^ permalink raw reply
* Re: [PATCH 12/15] [POWERPC] Add mpc52xx_restart(), mpc52xx_halt(), mpc52xx_power_off().
From: Kumar Gala @ 2007-10-08 13:56 UTC (permalink / raw)
To: Marian Balakowicz; +Cc: linuxppc-dev
In-Reply-To: <4708C3B2.1050103@semihalf.com>
On Oct 7, 2007, at 6:32 AM, Marian Balakowicz wrote:
>
> Add common MPC5200 helper routines: mpc52xx_restart(), mpc52xx_halt(),
> mpc52xx_power_off().
>
> This patch relies on Sascha Hauer's patch published in:
> http://patchwork.ozlabs.org/linuxppc/patch?id=8910.
>
> Signed-off-by: Marian Balakowicz <m8@semihalf.com>
> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
> ---
>
> arch/powerpc/platforms/52xx/mpc52xx_common.c | 45 +++++++++++++++
> ++++++++++++
> include/asm-powerpc/mpc52xx.h | 7 ++++
> 2 files changed, 52 insertions(+)
>
> diff --git a/arch/powerpc/platforms/52xx/mpc52xx_common.c b/arch/
> powerpc/platforms/52xx/mpc52xx_common.c
> index b1cd7b0..e7087d7 100644
> --- a/arch/powerpc/platforms/52xx/mpc52xx_common.c
> +++ b/arch/powerpc/platforms/52xx/mpc52xx_common.c
> @@ -88,6 +88,14 @@ mpc52xx_find_ipb_freq(struct device_node *node)
> }
> EXPORT_SYMBOL(mpc52xx_find_ipb_freq);
>
> +/*
> + * This variable is mapped in mpc52xx_setup_cpu() by a call to
> + * mpc52xx_find_and_map(), and used in mpc52xx_restart(). This is
> because
> + * mpc52xx_restart() can be called from interrupt context (e.g.,
> watchdog
> + * interrupt handler), and mpc52xx_find_and_map() (ioremap() to be
> exact)
> + * can't be called from interrupt context.
> + */
> +volatile struct mpc52xx_gpt *mpc52xx_gpt0 = NULL;
>
> void __init
> mpc52xx_setup_cpu(void)
> @@ -95,6 +103,9 @@ mpc52xx_setup_cpu(void)
> struct mpc52xx_cdm __iomem *cdm;
> struct mpc52xx_xlb __iomem *xlb;
>
> + /* mpc52xx_gpt0 is mapped here and used in mpc52xx_restart */
> + mpc52xx_gpt0 = mpc52xx_find_and_map("mpc5200-gpt");
> +
> /* Map zones */
> cdm = mpc52xx_find_and_map("mpc5200-cdm");
> xlb = mpc52xx_find_and_map("mpc5200-xlb");
> @@ -138,3 +149,37 @@ mpc52xx_declare_of_platform_devices(void)
> "Error while probing of_platform bus\n");
> }
>
> +void
> +mpc52xx_restart(char *cmd)
> +{
> + local_irq_disable();
> +
> + /* Turn on the watchdog and wait for it to expire. It effectively
> + does a reset */
> + if (mpc52xx_gpt0) {
> + out_be32(&mpc52xx_gpt0->mode, 0x00000000);
> + out_be32(&mpc52xx_gpt0->count, 0x000000ff);
> + out_be32(&mpc52xx_gpt0->mode, 0x00009004);
> + } else
> + printk("mpc52xx_restart: Can't access gpt. "
> + "Restart impossible, system halted\n");
> +
> + while (1);
> +}
> +
> +void
> +mpc52xx_halt(void)
> +{
> + local_irq_disable();
> +
> + while (1);
> +}
> +
> +void
> +mpc52xx_power_off(void)
> +{
> + /* By default we don't have any way of shut down.
> + If a specific board wants to, it can set the power down
> + code to any hardware implementation dependent code */
> + mpc52xx_halt();
> +}
If you are just going to spin don't bother implementing these. The
generic routines will do the same.
- k
^ permalink raw reply
* Re: [PATCH 01/15] [POWERPC] TQM5200 DTS
From: Kumar Gala @ 2007-10-08 13:52 UTC (permalink / raw)
To: Grant Likely; +Cc: linuxppc-dev, Marian Balakowicz
In-Reply-To: <fa686aa40710072327j304b7a62q602ed2553787abd4@mail.gmail.com>
On Oct 8, 2007, at 1:27 AM, Grant Likely wrote:
> On 10/7/07, Marian Balakowicz <m8@semihalf.com> wrote:
>> +
>> + pci@0d00 {
>> + #interrupt-cells = <1>;
>> + #size-cells = <2>;
>> + #address-cells = <3>;
>> + device_type = "pci";
>> + compatible = "mpc5200-pci";
>> + reg = <d00 100>;
>> + interrupt-map-mask = <f800 0 0 7>;
>> + interrupt-map = <c000 0 0 1 &mpc5200_pic 0
>> 0 3
>> + c000 0 0 2 &mpc5200_pic 0
>> 0 3
>> + c000 0 0 3 &mpc5200_pic 0
>> 0 3
>> + c000 0 0 4 &mpc5200_pic 0
>> 0 3>;
>> + clock-frequency = <0>; // From boot loader
>> + interrupts = <2 8 0 2 9 0 2 a 0>;
>> + interrupt-parent = <&mpc5200_pic>;
>> + bus-range = <0 0>;
>> + ranges = <42000000 0 80000000 80000000 0
>> 10000000
>> + 02000000 0 90000000 90000000 0
>> 10000000
>> + 01000000 0 00000000 a0000000 0
>> 01000000>;
>> + };
>
> Also, the PCI node should no longer be a child of the 'soc' node. See
> the latest lite5200.dts file in Paul Mackerras' powerpc tree for an
> example.
Also, note how the PCI node is a sibling of the soc node not a child
of it.
- k
^ permalink raw reply
* Re: [PATCH] PowerPC PCI: add 64-bit physical address support to setup_indirect_pci.
From: Kumar Gala @ 2007-10-08 13:49 UTC (permalink / raw)
To: Valentine Barshak; +Cc: PowerPC dev list, Benjamin Herrenschmidt
In-Reply-To: <20071008125124.GA6225@ru.mvista.com>
On Oct 8, 2007, at 7:51 AM, Valentine Barshak wrote:
> Add 64-bit physical address support to setup_indirect_pci().
>
> Signed-off-by: Valentine Barshak <vbarshak@ru.mvista.com>
Acked-by: Kumar Gala <galak@kernel.crashing.org>
- k
^ permalink raw reply
* Re: [patch 6/6] PS3: Add os-area database routines
From: Ranulf Doswell @ 2007-10-08 13:48 UTC (permalink / raw)
To: geoffrey.levand@am.sony.com; +Cc: linuxppc-dev
In-Reply-To: <20071006213542.954029915@am.sony.com>
[-- Attachment #1: Type: text/plain, Size: 1372 bytes --]
On 06/10/2007, geoffrey.levand@am.sony.com <geoffrey.levand@am.sony.com>
wrote:
> enum os_area_db_owner {
> OS_AREA_DB_OWNER_ANY = -1,
> OS_AREA_DB_OWNER_NONE = 0,
> OS_AREA_DB_OWNER_PROTOTYPE = 1,
> OS_AREA_DB_OWNER_LINUX = 2,
> OS_AREA_DB_OWNER_PETITBOOT = 3,
> OS_AREA_DB_OWNER_MAX = 32,
>};
>
>enum os_area_db_key {
> OS_AREA_DB_KEY_ANY = -1,
> OS_AREA_DB_KEY_NONE = 0,
> OS_AREA_DB_KEY_RTC_DIFF = 1,
> OS_AREA_DB_KEY_VIDEO_MODE = 2,
> OS_AREA_DB_KEY_MAX = 8,
>};
How do we go about claiming one of these OS_AREA_DB_OWNER_ keys? I'd very
much like to use this functionality in my python-ps3 games library.
My requirement is to be able to persist various options such as player names
and rankings. I had already been thinking about generating a unique token
and storing it somewhere at the end of the flash area so that when my game
connects to a game server, it can identify itself and be provided with all
the previous settings. Obviously, just claiming a random area of flash isn't
ideal, so your standardised solution would be perfect for this.
I would like, therefore, to reserve a single key to hold a 64-bit sized
token in order to identify the machine across reboots. I don't mind
particularly whether it's private to my application or a generally available
field, but certainly having an identifier I can rely on would be very
useful.
Cheers,
Ralf.
[-- Attachment #2: Type: text/html, Size: 1729 bytes --]
^ permalink raw reply
* Re: [PATCH respin 0/7] MPC8568E-MDS related patches
From: Kumar Gala @ 2007-10-08 13:46 UTC (permalink / raw)
To: avorontsov; +Cc: linuxppc-dev
In-Reply-To: <20071008121647.GB32540@localhost.localdomain>
On Oct 8, 2007, at 7:16 AM, Anton Vorontsov wrote:
> On Fri, Oct 05, 2007 at 05:09:28PM -0500, Kumar Gala wrote:
>>
>> On Oct 5, 2007, at 12:40 PM, Anton Vorontsov wrote:
>>
>>> Hello Kumar,
>>>
>>> This is respin of MPC8568E-MDS patches, on top of master branch
>>> as of today.
>>>
>>> If there are no objections against SPI patch, please Ack it, thus
>>> David could pick it up.
>>
>> I've applied patches 1-5 however I'm not able to get UCC enet
>> working on my
>> board.
>
> I wonder how you managed to boot it w/o sixth (PCI) patch in this
> patch set,
> for me board hanged w/o it.
>
>> Is there something special that has to be done? (I've got the card
>> standalone, no MDS backplane).
>
> Nothing special, from what I can remember. Though, double checking
> switches
> on the board might help.
>
> Also, .config and bootlog would help.
>
>> I'm using the 1.3.0-rc2 u-boot w/o any modifications.
>
> 1.2.0-g60174746 here.
>
>> Also, I tried a PCIe e1000 card w/the .dts that's in my tree and
>> that works
>> w/o any issue.
>
> Strange enough. I'd say it's impossible with your current tree.
> Maybe you've
> used some stale dtb? Because dts is seriously broken as now, and I
> can't
> believe that it worked for you. ;-)
Ignore me. Using the updated dtb makes things work. I need to double
check PCIe but UCC geth appears to function now.
- k
^ permalink raw reply
* Re: [PATCH 6/7] [POWERPC] mpc8568mds.dts: fix PCI/PCIe nodes
From: Kumar Gala @ 2007-10-08 13:32 UTC (permalink / raw)
To: avorontsov; +Cc: linuxppc-dev
In-Reply-To: <20071008120849.GA32540@localhost.localdomain>
On Oct 8, 2007, at 7:08 AM, Anton Vorontsov wrote:
> On Fri, Oct 05, 2007 at 03:58:00PM -0500, Kumar Gala wrote:
>>
>> On Oct 5, 2007, at 1:05 PM, Anton Vorontsov wrote:
>>
>>> On Fri, Oct 05, 2007 at 09:56:46PM +0400, Sergei Shtylyov wrote:
>>>> Hello.
>>>>
>>>> Anton Vorontsov wrote:
>>>>
>>>>> Commit 5bece127f0666996ca90772229e00332a34e516c tried to fix
>>>>> PCI/PCIe nodes, but actually it broke them even harder. ;-)
>>>>
>>>> Of course. But shouldn't those be the subnoses of the "soc"
>>>> type node?
>>>
>>> Nope. PCI's ranges = <>; isn't in the SOC address space.
>>>
>>> Valentine Barshak posted a patch titled "[RFC] [PATCH] PowerPC:
>>> Add 64-bit
>>> phys addr support to 32-bit pci" that started using
>>> of_translate_address()
>>> for ranges, and of_translate_address() will not work if PCI
>>> placed in the
>>> SOC node. Not sure if that patch applied or not, though.
>>
>> I'm confused, what's the actual issue with PCI that this patch
>> addresses?
>
> Which patch? Valentine's or mine under the subject? Don't know
> about the
> former, but mine patch is pretty obvious: your commit
> 5bece127f0666996ca90772229e00332a34e516c moved PCI nodes out of soc
> node,
> but you forgot to change regs = <>, thus instead of e000a000/e0008000,
> kernel used a000/8000 for accessing PCI ccsr registers.
Yeah, I see that bug now. It looks like I wasn't getting my new .dts
on the board. Will fixup that issue in my patch.
- k
^ permalink raw reply
* Re: TASK_SIZE default 0x80000000 ?
From: Kumar Gala @ 2007-10-08 13:31 UTC (permalink / raw)
To: benh; +Cc: PowerPC dev list, Paul Mackerras
In-Reply-To: <1191791123.6392.0.camel@pasglop>
On Oct 7, 2007, at 4:05 PM, Benjamin Herrenschmidt wrote:
>
>> Can you explain (a) further -- I'm assuming the BAT mapping is 1:1
>> for that region?
>>
>> For (b) it looks like:
>> * 40x, 44x, fsl-booke compare against TASK_SIZE in their software
>> handlers.
>> * 8xx still tests 0x80000000
>> * 6xx (603) compares against KERNELBASE
>>
>> It would seem like we should set the default on 8xx & PReP to
>> 0x80000000 and not allow it to be modified since that will break the
>> world and for everything else move it to match KERNELBASE. Any
>> issues with that?
>
> The proper value is neither :-)
>
> It should be compared against PAGE_OFFSET.
I'll work up a patch to switch us to testing PAGE_OFFSET instead.
- k
^ permalink raw reply
* Re: TASK_SIZE default 0x80000000 ?
From: Kumar Gala @ 2007-10-08 13:31 UTC (permalink / raw)
To: Dan Malek; +Cc: PowerPC dev list, Benjamin Herrenschmidt, Paul Mackerras
In-Reply-To: <B108919F-98D7-45B0-BEB0-48D345F0BE4B@embeddedalley.com>
On Oct 7, 2007, at 1:35 PM, Dan Malek wrote:
>
> On Oct 7, 2007, at 8:02 AM, Kumar Gala wrote:
>
>> It would seem like we should set the default on 8xx & PReP to
>> 0x80000000 and not allow it to be modified
>
> For as much as this has been discussed in the past,
> I don't know why the 8xx doesn't check KERNEL_BASE
> and work properly with the options. There is no reason
> this can't work. The history is I wrote the tlb handlers
> to test the MS bit due to a hardcoded address, not that
> the address is hardcoded because I wanted to just
> test a bit. Unlike PReP, there is no reason to
> disallow modification, if this test was changed.
Ok, I'll work up a patch for 8xx to test against PAGE_OFFSET (as benh
suggested).
- k
^ permalink raw reply
* [PATCH] PowerPC PCI: add 64-bit physical address support to setup_indirect_pci.
From: Valentine Barshak @ 2007-10-08 12:51 UTC (permalink / raw)
To: linuxppc-dev
Add 64-bit physical address support to setup_indirect_pci().
Signed-off-by: Valentine Barshak <vbarshak@ru.mvista.com>
---
arch/powerpc/sysdev/indirect_pci.c | 6 ++++--
include/asm-powerpc/pci-bridge.h | 3 ++-
2 files changed, 6 insertions(+), 3 deletions(-)
diff -pruN linux-2.6.orig/arch/powerpc/sysdev/indirect_pci.c linux-2.6/arch/powerpc/sysdev/indirect_pci.c
--- linux-2.6.orig/arch/powerpc/sysdev/indirect_pci.c 2007-10-08 16:29:54.000000000 +0400
+++ linux-2.6/arch/powerpc/sysdev/indirect_pci.c 2007-10-08 16:45:40.000000000 +0400
@@ -149,9 +149,11 @@ static struct pci_ops indirect_pci_ops =
};
void __init
-setup_indirect_pci(struct pci_controller* hose, u32 cfg_addr, u32 cfg_data, u32 flags)
+setup_indirect_pci(struct pci_controller* hose,
+ resource_size_t cfg_addr,
+ resource_size_t cfg_data, u32 flags)
{
- unsigned long base = cfg_addr & PAGE_MASK;
+ resource_size_t base = cfg_addr & PAGE_MASK;
void __iomem *mbase;
mbase = ioremap(base, PAGE_SIZE);
diff -pruN linux-2.6.orig/include/asm-powerpc/pci-bridge.h linux-2.6/include/asm-powerpc/pci-bridge.h
--- linux-2.6.orig/include/asm-powerpc/pci-bridge.h 2007-10-08 16:30:41.000000000 +0400
+++ linux-2.6/include/asm-powerpc/pci-bridge.h 2007-10-08 16:45:40.000000000 +0400
@@ -98,7 +98,8 @@ extern int early_find_capability(struct
int dev_fn, int cap);
extern void setup_indirect_pci(struct pci_controller* hose,
- u32 cfg_addr, u32 cfg_data, u32 flags);
+ resource_size_t cfg_addr,
+ resource_size_t cfg_data, u32 flags);
extern void setup_grackle(struct pci_controller *hose);
extern void __init update_bridge_resource(struct pci_dev *dev,
struct resource *res);
^ permalink raw reply
* Re: [patch 6/6] PS3: Add os-area database routines
From: Geert Uytterhoeven @ 2007-10-08 12:16 UTC (permalink / raw)
To: geoffrey.levand; +Cc: linuxppc-dev, paulus
In-Reply-To: <20071006213542.954029915@am.sony.com>
[-- Attachment #1: Type: TEXT/PLAIN, Size: 1092 bytes --]
On Sat, 6 Oct 2007 geoffrey.levand@am.sony.com wrote:
> --- a/arch/powerpc/platforms/ps3/os-area.c
> +++ b/arch/powerpc/platforms/ps3/os-area.c
> +static int db_get_video_mode(const struct os_area_db *db,
> + unsigned int *video_mode)
^^^^^^^^^^^^^^
> +{
> + return db_get_64(db, &os_area_db_id_video_mode, (uint64_t*)video_mode);
^^^^^^^^^^^
> +}
Woops, memory corruption, when writing a 64-bit value to a 32-bit variable.
With kind regards,
Geert Uytterhoeven
Software Architect
Sony Network and Software Technology Center Europe
The Corporate Village · Da Vincilaan 7-D1 · B-1935 Zaventem · Belgium
Phone: +32 (0)2 700 8453
Fax: +32 (0)2 700 8622
E-mail: Geert.Uytterhoeven@sonycom.com
Internet: http://www.sony-europe.com/
Sony Network and Software Technology Center Europe
A division of Sony Service Centre (Europe) N.V.
Registered office: Technologielaan 7 · B-1840 Londerzeel · Belgium
VAT BE 0413.825.160 · RPR Brussels
Fortis Bank Zaventem · Swift GEBABEBB08A · IBAN BE39001382358619
^ permalink raw reply
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox