LinuxPPC-Dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
* Re: [PATCH] hvc_console: fix dropping of characters when output byte channel is full
From: Scott Wood @ 2010-09-14 19:22 UTC (permalink / raw)
  To: Andrew Morton
  Cc: amit.shah, linuxppc-dev, kumar.gala, Timur Tabi, linux-kernel
In-Reply-To: <20100914121721.c8671ed8.akpm@linux-foundation.org>

On Tue, 14 Sep 2010 12:17:21 -0700
Andrew Morton <akpm@linux-foundation.org> wrote:

> On Fri, 20 Aug 2010 13:45:21 -0500
> Timur Tabi <timur@freescale.com> wrote:
> 
> > hvc_console_print() calls the HVC client driver's put_chars() callback
> > to write some characters to the console.  If the callback returns 0, that
> > indicates that no characters were written (perhaps the output buffer is
> > full), but hvc_console_print() treats that as an error and discards the
> > rest of the buffer.
> > 
> > So change hvc_console_print() to just loop and call put_chars() again if it
> > returns a 0 return code.
> 
> Seems rather dangerous.  The upper layer will sit there chewing 100%
> CPU for as long as the lower layer is congested.

This is just for printk(), not user output.  This is exactly what
printk() has always done for real serial ports.

> > This change makes hvc_console_print() behave more like hvc_push(), which
> > does check for a 0 return code and re-schedules itself.
> 
> Yes, hvc_push() reschedules.

hvc_push() is not relevant to kernel console output.

hvc_console_write() currently does not reschedule anything.  It just
drops characters when busy.

-Scott

^ permalink raw reply

* Re: [PATCH] hvc_console: fix dropping of characters when output byte channel is full
From: Timur Tabi @ 2010-09-14 19:25 UTC (permalink / raw)
  To: Alan Cox; +Cc: kumar.gala, linux-kernel, linuxppc-dev, amit.shah, Andrew Morton
In-Reply-To: <20100914204410.71942cdc@lxorguk.ukuu.org.uk>

Alan Cox wrote:
> Its a printk handler - better to lose the bytes than hang the box. I
> think the current code is probably right.

What do you think about this change:

http://lists.ozlabs.org/pipermail/linuxppc-dev/2009-October/thread.html#76830

This is the original version of my patch.  In it, I simply allow drivers to
return 0 to indicate that they're too busy to accept data.  It works great
on the hvc driver that we have in-house today, but it might break other
drivers that return 0 to indicate error.

-- 
Timur Tabi
Linux kernel developer at Freescale

^ permalink raw reply

* Re: [PATCH] hvc_console: fix dropping of characters when output byte channel is full
From: Alan Cox @ 2010-09-14 19:44 UTC (permalink / raw)
  To: Andrew Morton
  Cc: kumar.gala, linux-kernel, linuxppc-dev, amit.shah, Timur Tabi
In-Reply-To: <20100914121721.c8671ed8.akpm@linux-foundation.org>

> Yes, hvc_push() reschedules.  It doesn't sit in a tight loop burning
> electrons!
> 
> Can we do something safer&smarter here?


Its a printk handler - better to lose the bytes than hang the box. I
think the current code is probably right.

^ permalink raw reply

* Re: [PATCH] hvc_console: fix dropping of characters when output byte channel is full
From: Timur Tabi @ 2010-09-14 19:44 UTC (permalink / raw)
  To: Alan Cox; +Cc: kumar.gala, linux-kernel, linuxppc-dev, amit.shah, Andrew Morton
In-Reply-To: <20100914205246.0e35c9af@lxorguk.ukuu.org.uk>

Alan Cox wrote:
> If you want to make that change then I guess you need to audit every
> other hvc driver first.
> 
> But I never understood the point of the hvc layer anyway 8)

We've come to the same conclusion here.  I think we're just going to drop
the hvc layer and make the driver a standard console driver.

-- 
Timur Tabi
Linux kernel developer at Freescale

^ permalink raw reply

* [PATCH 3/7] mac: autoconvert trivial BKL users to private mutex
From: Arnd Bergmann @ 2010-09-14 19:53 UTC (permalink / raw)
  To: linux-kernel; +Cc: Arnd Bergmann, linuxppc-dev
In-Reply-To: <1284494022-7346-1-git-send-email-arnd@arndb.de>

All these files use the big kernel lock in a trivial
way to serialize their private file operations,
typically resulting from an earlier semi-automatic
pushdown from VFS.

None of these drivers appears to want to lock against
other code, and they all use the BKL as the top-level
lock in their file operations, meaning that there
is no lock-order inversion problem.

Consequently, we can remove the BKL completely,
replacing it with a per-file mutex in every case.
Using a scripted approach means we can avoid
typos.

file=$1
name=$2
if grep -q lock_kernel ${file} ; then
    if grep -q 'include.*linux.mutex.h' ${file} ; then
            sed -i '/include.*<linux\/smp_lock.h>/d' ${file}
    else
            sed -i 's/include.*<linux\/smp_lock.h>.*$/include <linux\/mutex.h>/g' ${file}
    fi
    sed -i ${file} \
        -e "/^#include.*linux.mutex.h/,$ {
                1,/^\(static\|int\|long\)/ {
                     /^\(static\|int\|long\)/istatic DEFINE_MUTEX(${name}_mutex);

} }"  \
    -e "s/\(un\)*lock_kernel\>[ ]*()/mutex_\1lock(\&${name}_mutex)/g" \
    -e '/[      ]*cycle_kernel_lock();/d'
else
    sed -i -e '/include.*\<smp_lock.h\>/d' ${file}  \
                -e '/cycle_kernel_lock()/d'
fi

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: linuxppc-dev@ozlabs.org
---
 drivers/macintosh/adb.c     |   10 +++++-----
 drivers/macintosh/smu.c     |    6 +++---
 drivers/macintosh/via-pmu.c |   11 ++++++-----
 3 files changed, 14 insertions(+), 13 deletions(-)

diff --git a/drivers/macintosh/adb.c b/drivers/macintosh/adb.c
index 1c4ee6e..e75e3be 100644
--- a/drivers/macintosh/adb.c
+++ b/drivers/macintosh/adb.c
@@ -24,7 +24,6 @@
 #include <linux/fs.h>
 #include <linux/mm.h>
 #include <linux/sched.h>
-#include <linux/smp_lock.h>
 #include <linux/adb.h>
 #include <linux/cuda.h>
 #include <linux/pmu.h>
@@ -55,6 +54,7 @@ extern struct adb_driver adb_iop_driver;
 extern struct adb_driver via_pmu_driver;
 extern struct adb_driver macio_adb_driver;
 
+static DEFINE_MUTEX(adb_mutex);
 static struct adb_driver *adb_driver_list[] = {
 #ifdef CONFIG_ADB_MACII
 	&via_macii_driver,
@@ -647,7 +647,7 @@ static int adb_open(struct inode *inode, struct file *file)
 	struct adbdev_state *state;
 	int ret = 0;
 
-	lock_kernel();
+	mutex_lock(&adb_mutex);
 	if (iminor(inode) > 0 || adb_controller == NULL) {
 		ret = -ENXIO;
 		goto out;
@@ -665,7 +665,7 @@ static int adb_open(struct inode *inode, struct file *file)
 	state->inuse = 1;
 
 out:
-	unlock_kernel();
+	mutex_unlock(&adb_mutex);
 	return ret;
 }
 
@@ -674,7 +674,7 @@ static int adb_release(struct inode *inode, struct file *file)
 	struct adbdev_state *state = file->private_data;
 	unsigned long flags;
 
-	lock_kernel();
+	mutex_lock(&adb_mutex);
 	if (state) {
 		file->private_data = NULL;
 		spin_lock_irqsave(&state->lock, flags);
@@ -687,7 +687,7 @@ static int adb_release(struct inode *inode, struct file *file)
 			spin_unlock_irqrestore(&state->lock, flags);
 		}
 	}
-	unlock_kernel();
+	mutex_unlock(&adb_mutex);
 	return 0;
 }
 
diff --git a/drivers/macintosh/smu.c b/drivers/macintosh/smu.c
index e58c3d3..290cb32 100644
--- a/drivers/macintosh/smu.c
+++ b/drivers/macintosh/smu.c
@@ -19,7 +19,6 @@
  *    the userland interface
  */
 
-#include <linux/smp_lock.h>
 #include <linux/types.h>
 #include <linux/kernel.h>
 #include <linux/device.h>
@@ -97,6 +96,7 @@ struct smu_device {
  * I don't think there will ever be more than one SMU, so
  * for now, just hard code that
  */
+static DEFINE_MUTEX(smu_mutex);
 static struct smu_device	*smu;
 static DEFINE_MUTEX(smu_part_access);
 static int smu_irq_inited;
@@ -1095,12 +1095,12 @@ static int smu_open(struct inode *inode, struct file *file)
 	pp->mode = smu_file_commands;
 	init_waitqueue_head(&pp->wait);
 
-	lock_kernel();
+	mutex_lock(&smu_mutex);
 	spin_lock_irqsave(&smu_clist_lock, flags);
 	list_add(&pp->list, &smu_clist);
 	spin_unlock_irqrestore(&smu_clist_lock, flags);
 	file->private_data = pp;
-	unlock_kernel();
+	mutex_unlock(&smu_mutex);
 
 	return 0;
 }
diff --git a/drivers/macintosh/via-pmu.c b/drivers/macintosh/via-pmu.c
index 2d17e76..7b8b1de 100644
--- a/drivers/macintosh/via-pmu.c
+++ b/drivers/macintosh/via-pmu.c
@@ -18,7 +18,7 @@
  *
  */
 #include <stdarg.h>
-#include <linux/smp_lock.h>
+#include <linux/mutex.h>
 #include <linux/types.h>
 #include <linux/errno.h>
 #include <linux/kernel.h>
@@ -73,6 +73,7 @@
 /* How many iterations between battery polls */
 #define BATTERY_POLLING_COUNT	2
 
+static DEFINE_MUTEX(pmu_info_proc_mutex);
 static volatile unsigned char __iomem *via;
 
 /* VIA registers - spaced 0x200 bytes apart */
@@ -2078,7 +2079,7 @@ pmu_open(struct inode *inode, struct file *file)
 	pp->rb_get = pp->rb_put = 0;
 	spin_lock_init(&pp->lock);
 	init_waitqueue_head(&pp->wait);
-	lock_kernel();
+	mutex_lock(&pmu_info_proc_mutex);
 	spin_lock_irqsave(&all_pvt_lock, flags);
 #if defined(CONFIG_INPUT_ADBHID) && defined(CONFIG_PMAC_BACKLIGHT)
 	pp->backlight_locker = 0;
@@ -2086,7 +2087,7 @@ pmu_open(struct inode *inode, struct file *file)
 	list_add(&pp->list, &all_pmu_pvt);
 	spin_unlock_irqrestore(&all_pvt_lock, flags);
 	file->private_data = pp;
-	unlock_kernel();
+	mutex_unlock(&pmu_info_proc_mutex);
 	return 0;
 }
 
@@ -2343,9 +2344,9 @@ static long pmu_unlocked_ioctl(struct file *filp,
 {
 	int ret;
 
-	lock_kernel();
+	mutex_lock(&pmu_info_proc_mutex);
 	ret = pmu_ioctl(filp, cmd, arg);
-	unlock_kernel();
+	mutex_unlock(&pmu_info_proc_mutex);
 
 	return ret;
 }
-- 
1.7.1

^ permalink raw reply related

* [PATCH 0/7] BKL mass-conversion to mutex
From: Arnd Bergmann @ 2010-09-14 19:53 UTC (permalink / raw)
  To: linux-kernel
  Cc: Corey Minyard, Stephen Rothwell, Arnd Bergmann, linux-scsi,
	Takashi Iwai, linuxppc-dev, James E.J. Bottomley, linux-mtd,
	Jens Axboe, Ingo Molnar, Linus Torvalds, openipmi-developer,
	David Woodhouse

This is one out of five topic branches in my BKL removal
series that I would like to get into linux-next as
a preparation for merging into 2.6.37.

Based on a discussion with Ingo Molnar, this series converts
many drivers that only have a single file using the BKL
to use a private mutex instead.  All these patches except for
the last two have been reviewed before.

This is safe because they all use the BKL only to protect
their basic file operations and they take it as the
outermost lock. Consequently, we do not run into lock-order
problem or recursion.

Using a script that works for all these drivers gives
me reasonable confidence in the approach, since it avoids
typos and other common mistakes from sloppiness.

Stephen, please add
git+ssh://master.kernel.org/pub/scm/linux/kernel/git/arnd/bkl.git trivial

Arnd Bergmann (7):
  scsi: autoconvert trivial BKL users to private mutex
  mtd: autoconvert trivial BKL users to private mutex
  mac: autoconvert trivial BKL users to private mutex
  ipmi: autoconvert trivial BKL users to private mutex
  drivers: autoconvert trivial BKL users to private mutex
  sound: autoconvert trivial BKL users to private mutex
  block: autoconvert trivial BKL users to private mutex

 block/bsg.c                                |    3 --
 drivers/block/DAC960.c                     |   11 ++++---
 drivers/block/amiflop.c                    |   19 ++++++------
 drivers/block/aoe/aoeblk.c                 |    9 +++--
 drivers/block/aoe/aoechr.c                 |    9 +++--
 drivers/block/ataflop.c                    |   15 +++++----
 drivers/block/brd.c                        |    7 ++--
 drivers/block/cciss.c                      |   14 ++++----
 drivers/block/cpqarray.c                   |   15 +++++----
 drivers/block/drbd/drbd_main.c             |   11 ++++---
 drivers/block/floppy.c                     |   16 +++++-----
 drivers/block/loop.c                       |   11 ++++---
 drivers/block/nbd.c                        |    7 ++--
 drivers/block/paride/pcd.c                 |   15 +++++----
 drivers/block/paride/pd.c                  |   15 +++++----
 drivers/block/paride/pf.c                  |   17 ++++++-----
 drivers/block/paride/pg.c                  |    7 ++--
 drivers/block/paride/pt.c                  |   19 ++++++------
 drivers/block/pktcdvd.c                    |   16 +++++-----
 drivers/block/swim.c                       |   15 +++++----
 drivers/block/swim3.c                      |   15 +++++----
 drivers/block/ub.c                         |   15 +++++----
 drivers/block/viodasd.c                    |   11 ++++---
 drivers/block/virtio_blk.c                 |    7 ++--
 drivers/block/xd.c                         |    7 ++--
 drivers/block/xen-blkfront.c               |   11 ++++---
 drivers/block/xsysace.c                    |   11 ++++---
 drivers/block/z2ram.c                      |   15 +++++----
 drivers/cdrom/gdrom.c                      |   15 +++++----
 drivers/cdrom/viocd.c                      |   15 +++++----
 drivers/char/apm-emulation.c               |   11 ++++---
 drivers/char/applicom.c                    |    9 +++--
 drivers/char/ds1302.c                      |   15 +++++----
 drivers/char/ds1620.c                      |    8 ++--
 drivers/char/dsp56k.c                      |   27 +++++++++--------
 drivers/char/dtlk.c                        |    8 ++--
 drivers/char/generic_nvram.c               |    7 ++--
 drivers/char/genrtc.c                      |   13 ++++----
 drivers/char/i8k.c                         |    7 ++--
 drivers/char/ip2/ip2main.c                 |    8 ++--
 drivers/char/ipmi/ipmi_devintf.c           |   14 ++++----
 drivers/char/ipmi/ipmi_watchdog.c          |    8 ++--
 drivers/char/lp.c                          |   15 +++++----
 drivers/char/mbcs.c                        |    8 ++--
 drivers/char/mmtimer.c                     |    7 ++--
 drivers/char/mwave/mwavedd.c               |   44 ++++++++++++++--------------
 drivers/char/nvram.c                       |   11 ++++---
 drivers/char/nwflash.c                     |   12 ++++----
 drivers/char/pcmcia/cm4000_cs.c            |   11 ++++---
 drivers/char/pcmcia/cm4040_cs.c            |    7 ++--
 drivers/char/ppdev.c                       |    8 ++--
 drivers/char/rio/rio_linux.c               |    7 ++--
 drivers/char/snsc.c                        |    9 +++--
 drivers/char/toshiba.c                     |    9 +++--
 drivers/char/viotape.c                     |   11 ++++---
 drivers/char/xilinx_hwicap/xilinx_hwicap.c |    6 ++--
 drivers/hwmon/fschmd.c                     |    6 ++--
 drivers/hwmon/w83793.c                     |    6 ++--
 drivers/ide/ide-cd.c                       |   14 ++++----
 drivers/ide/ide-disk_ioctl.c               |    7 ++--
 drivers/ide/ide-floppy_ioctl.c             |    7 ++--
 drivers/ide/ide-gd.c                       |   10 +++---
 drivers/ide/ide-tape.c                     |   19 ++++++------
 drivers/input/misc/hp_sdc_rtc.c            |    7 ++--
 drivers/macintosh/adb.c                    |   10 +++---
 drivers/macintosh/smu.c                    |    6 ++--
 drivers/macintosh/via-pmu.c                |   11 ++++---
 drivers/md/dm.c                            |   10 +++---
 drivers/md/md.c                            |   13 ++++----
 drivers/memstick/core/mspro_block.c        |   11 ++++---
 drivers/message/fusion/mptctl.c            |   15 +++++----
 drivers/message/i2o/i2o_block.c            |   15 +++++----
 drivers/message/i2o/i2o_config.c           |   23 +++++++-------
 drivers/misc/phantom.c                     |   11 ++++---
 drivers/mmc/card/block.c                   |   10 +++---
 drivers/mtd/mtd_blkdevs.c                  |   14 ++++----
 drivers/mtd/mtdchar.c                      |   15 +++++----
 drivers/pci/hotplug/cpqphp_sysfs.c         |   13 ++++----
 drivers/rtc/rtc-m41t80.c                   |   13 ++++----
 drivers/s390/char/tape_block.c             |   13 ++++----
 drivers/sbus/char/jsflash.c                |   24 ++++++++-------
 drivers/scsi/3w-9xxx.c                     |    7 ++--
 drivers/scsi/3w-sas.c                      |    7 ++--
 drivers/scsi/3w-xxxx.c                     |    9 ++---
 drivers/scsi/aacraid/linit.c               |   15 +++++----
 drivers/scsi/ch.c                          |    8 ++--
 drivers/scsi/dpt_i2o.c                     |   18 ++++++------
 drivers/scsi/gdth.c                        |   11 ++++---
 drivers/scsi/megaraid.c                    |    8 ++--
 drivers/scsi/megaraid/megaraid_mm.c        |    8 ++--
 drivers/scsi/megaraid/megaraid_sas.c       |    2 -
 drivers/scsi/mpt2sas/mpt2sas_ctl.c         |   11 ++++---
 drivers/scsi/osst.c                        |   15 +++++----
 drivers/scsi/scsi_tgt_if.c                 |    2 -
 drivers/scsi/sg.c                          |   11 ++++---
 drivers/scsi/sr.c                          |   14 ++++----
 drivers/scsi/st.c                          |   12 ++++----
 drivers/staging/hv/blkvsc_drv.c            |   11 ++++---
 drivers/staging/spectra/ffsport.c          |    7 ++--
 drivers/telephony/ixj.c                    |    7 ++--
 drivers/watchdog/cpwd.c                    |   15 +++++----
 fs/hfsplus/ioctl.c                         |   11 ++++---
 sound/oss/au1550_ac97.c                    |   30 +++++++++---------
 sound/oss/dmasound/dmasound_core.c         |   41 +++++++++++++------------
 sound/oss/msnd_pinnacle.c                  |   15 +++++----
 sound/oss/sh_dac_audio.c                   |   13 ++++----
 sound/oss/soundcard.c                      |   41 +++++++++++++------------
 sound/oss/swarm_cs4297a.c                  |   20 ++++++------
 sound/oss/vwsnd.c                          |   30 +++++++++---------
 109 files changed, 718 insertions(+), 657 deletions(-)

Cc: Stephen Rothwell <sfr@canb.auug.org.au>
Cc: linux-scsi@vger.kernel.org
Cc: "James E.J. Bottomley" <James.Bottomley@suse.de>
Cc: David Woodhouse <David.Woodhouse@intel.com>
Cc: linux-mtd@lists.infradead.org
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: linuxppc-dev@ozlabs.org
Cc: Corey Minyard <minyard@acm.org>
Cc: openipmi-developer@lists.sourceforge.net
Cc: Takashi Iwai <tiwai@suse.de>
Cc: Jens Axboe <axboe@kernel.dk>

^ permalink raw reply

* Re: [PATCH] hvc_console: fix dropping of characters when output byte channel is full
From: Scott Wood @ 2010-09-14 20:05 UTC (permalink / raw)
  To: Alan Cox
  Cc: kumar.gala, linux-kernel, linuxppc-dev, amit.shah, Andrew Morton,
	Timur Tabi
In-Reply-To: <20100914204410.71942cdc@lxorguk.ukuu.org.uk>

On Tue, 14 Sep 2010 20:44:10 +0100
Alan Cox <alan@lxorguk.ukuu.org.uk> wrote:

> > Yes, hvc_push() reschedules.  It doesn't sit in a tight loop burning
> > electrons!
> > 
> > Can we do something safer&smarter here?
> 
> 
> Its a printk handler - better to lose the bytes than hang the box. I
> think the current code is probably right.

Losing the bytes is unacceptable.  Even if an hvc backend erroneously
returns zero on a permanent error, the timeout should prevent hanging
the box for too long.

Though I suspect the right answer for us may be "don't use the hvc
layer".

-Scott

^ permalink raw reply

* [PATCH 05/15] spufs: use llseek in all file operations
From: Arnd Bergmann @ 2010-09-14 20:22 UTC (permalink / raw)
  To: linux-kernel; +Cc: linuxppc-dev, Jeremy Kerr, Arnd Bergmann
In-Reply-To: <1284495763-7506-1-git-send-email-arnd@arndb.de>

The default for llseek is changing, so we need
explicit operations everywhere.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Cc: Jeremy Kerr <jk@ozlabs.org>
Cc: linuxppc-dev@ozlabs.org
---
 arch/powerpc/platforms/cell/spufs/file.c |   18 ++++++++++++++++++
 1 files changed, 18 insertions(+), 0 deletions(-)

diff --git a/arch/powerpc/platforms/cell/spufs/file.c b/arch/powerpc/platforms/cell/spufs/file.c
index 1a40da9..02f7b11 100644
--- a/arch/powerpc/platforms/cell/spufs/file.c
+++ b/arch/powerpc/platforms/cell/spufs/file.c
@@ -154,6 +154,7 @@ static const struct file_operations __fops = {				\
 	.release = spufs_attr_release,					\
 	.read	 = spufs_attr_read,					\
 	.write	 = spufs_attr_write,					\
+	.llseek  = generic_file_llseek,					\
 };
 
 
@@ -521,6 +522,7 @@ static const struct file_operations spufs_cntl_fops = {
 	.release = spufs_cntl_release,
 	.read = simple_attr_read,
 	.write = simple_attr_write,
+	.llseek	= generic_file_llseek,
 	.mmap = spufs_cntl_mmap,
 };
 
@@ -714,6 +716,7 @@ static ssize_t spufs_mbox_read(struct file *file, char __user *buf,
 static const struct file_operations spufs_mbox_fops = {
 	.open	= spufs_pipe_open,
 	.read	= spufs_mbox_read,
+	.llseek	= no_llseek,
 };
 
 static ssize_t spufs_mbox_stat_read(struct file *file, char __user *buf,
@@ -743,6 +746,7 @@ static ssize_t spufs_mbox_stat_read(struct file *file, char __user *buf,
 static const struct file_operations spufs_mbox_stat_fops = {
 	.open	= spufs_pipe_open,
 	.read	= spufs_mbox_stat_read,
+	.llseek = no_llseek,
 };
 
 /* low-level ibox access function */
@@ -863,6 +867,7 @@ static const struct file_operations spufs_ibox_fops = {
 	.read	= spufs_ibox_read,
 	.poll	= spufs_ibox_poll,
 	.fasync	= spufs_ibox_fasync,
+	.llseek = no_llseek,
 };
 
 static ssize_t spufs_ibox_stat_read(struct file *file, char __user *buf,
@@ -890,6 +895,7 @@ static ssize_t spufs_ibox_stat_read(struct file *file, char __user *buf,
 static const struct file_operations spufs_ibox_stat_fops = {
 	.open	= spufs_pipe_open,
 	.read	= spufs_ibox_stat_read,
+	.llseek = no_llseek,
 };
 
 /* low-level mailbox write */
@@ -1011,6 +1017,7 @@ static const struct file_operations spufs_wbox_fops = {
 	.write	= spufs_wbox_write,
 	.poll	= spufs_wbox_poll,
 	.fasync	= spufs_wbox_fasync,
+	.llseek = no_llseek,
 };
 
 static ssize_t spufs_wbox_stat_read(struct file *file, char __user *buf,
@@ -1038,6 +1045,7 @@ static ssize_t spufs_wbox_stat_read(struct file *file, char __user *buf,
 static const struct file_operations spufs_wbox_stat_fops = {
 	.open	= spufs_pipe_open,
 	.read	= spufs_wbox_stat_read,
+	.llseek = no_llseek,
 };
 
 static int spufs_signal1_open(struct inode *inode, struct file *file)
@@ -1166,6 +1174,7 @@ static const struct file_operations spufs_signal1_fops = {
 	.read = spufs_signal1_read,
 	.write = spufs_signal1_write,
 	.mmap = spufs_signal1_mmap,
+	.llseek = no_llseek,
 };
 
 static const struct file_operations spufs_signal1_nosched_fops = {
@@ -1173,6 +1182,7 @@ static const struct file_operations spufs_signal1_nosched_fops = {
 	.release = spufs_signal1_release,
 	.write = spufs_signal1_write,
 	.mmap = spufs_signal1_mmap,
+	.llseek = no_llseek,
 };
 
 static int spufs_signal2_open(struct inode *inode, struct file *file)
@@ -1305,6 +1315,7 @@ static const struct file_operations spufs_signal2_fops = {
 	.read = spufs_signal2_read,
 	.write = spufs_signal2_write,
 	.mmap = spufs_signal2_mmap,
+	.llseek = no_llseek,
 };
 
 static const struct file_operations spufs_signal2_nosched_fops = {
@@ -1312,6 +1323,7 @@ static const struct file_operations spufs_signal2_nosched_fops = {
 	.release = spufs_signal2_release,
 	.write = spufs_signal2_write,
 	.mmap = spufs_signal2_mmap,
+	.llseek = no_llseek,
 };
 
 /*
@@ -1451,6 +1463,7 @@ static const struct file_operations spufs_mss_fops = {
 	.open	 = spufs_mss_open,
 	.release = spufs_mss_release,
 	.mmap	 = spufs_mss_mmap,
+	.llseek  = no_llseek,
 };
 
 static int
@@ -1508,6 +1521,7 @@ static const struct file_operations spufs_psmap_fops = {
 	.open	 = spufs_psmap_open,
 	.release = spufs_psmap_release,
 	.mmap	 = spufs_psmap_mmap,
+	.llseek  = no_llseek,
 };
 
 
@@ -1871,6 +1885,7 @@ static const struct file_operations spufs_mfc_fops = {
 	.fsync	 = spufs_mfc_fsync,
 	.fasync	 = spufs_mfc_fasync,
 	.mmap	 = spufs_mfc_mmap,
+	.llseek  = no_llseek,
 };
 
 static int spufs_npc_set(void *data, u64 val)
@@ -2246,6 +2261,7 @@ static ssize_t spufs_dma_info_read(struct file *file, char __user *buf,
 static const struct file_operations spufs_dma_info_fops = {
 	.open = spufs_info_open,
 	.read = spufs_dma_info_read,
+	.llseek = no_llseek,
 };
 
 static ssize_t __spufs_proxydma_info_read(struct spu_context *ctx,
@@ -2299,6 +2315,7 @@ static ssize_t spufs_proxydma_info_read(struct file *file, char __user *buf,
 static const struct file_operations spufs_proxydma_info_fops = {
 	.open = spufs_info_open,
 	.read = spufs_proxydma_info_read,
+	.llseek = no_llseek,
 };
 
 static int spufs_show_tid(struct seq_file *s, void *private)
@@ -2585,6 +2602,7 @@ static const struct file_operations spufs_switch_log_fops = {
 	.read		= spufs_switch_log_read,
 	.poll		= spufs_switch_log_poll,
 	.release	= spufs_switch_log_release,
+	.llseek		= no_llseek,
 };
 
 /**
-- 
1.7.1

^ permalink raw reply related

* [PATCH 00/15] change default_llseek action
From: Arnd Bergmann @ 2010-09-14 20:22 UTC (permalink / raw)
  To: linux-kernel
  Cc: Stephen Rothwell, Samuel Ortiz, Arnd Bergmann, David Airlie,
	netdev, linux-wireless, dri-devel, Christoph Hellwig,
	linuxppc-dev, Tony Lindgren, Julia Lawall, Al Viro, linux-fsdevel,
	linux-omap, Linus Torvalds, Jeremy Kerr

The llseek file operations traditionally behaves differently
from all other file operations, the default being a generic
implementation of the call instead of a stub returning an
error.

This changes *all* instances of struct file_operations in
the kernel to have a .llseek operation and then changes
the default to no_llseek, which returns -ESPIPE, which
is what we had decided some time ago in a discussion
with Christoph Hellwig.

Where possible, the change is done automatically using
a semantic patch with coccinelle, the few cases where
an automatic conversion is not possible have separate
patches.

Finally, the default_llseek operation gets changed to
no longer require the big kernel lock. Since only
a few users are left using it, it can easily be shown
that none of them actually expects the big kernel lock
here.

I would like to get this into -next now, but will regenerate
the automatic mass-conversion part when this gets ready
for inclusion in 2.6.37, to accomodate any drivers
that got added without a .llseek method.

Stephen, please add
git+ssh://master.kernel.org/pub/scm/linux/kernel/git/arnd/bkl.git llseek

Arnd Bergmann (15):
  drm: use noop_llseek
  net/wireless: use generic_file_llseek in debugfs
  lkdtm: use generic_file_llseek in debugfs
  arm/omap: use generic_file_llseek in iommu_debug
  spufs: use llseek in all file operations
  ibmasmfs: use generic_file_llseek
  raw: use explicit llseek file operations
  irda/irnet: use noop_llseek
  viotape: use noop_llseek
  lirc: make chardev nonseekable
  mac80211: disallow seeks in minstrel debug code
  libfs: use generic_file_llseek for simple_attr
  llseek: automatically add .llseek fop
  vfs: don't use BKL in default_llseek
  vfs: make no_llseek the default

 Documentation/DocBook/drm.tmpl                   |    1 +
 arch/arm/kernel/etm.c                            |    1 +
 arch/arm/mach-msm/last_radio_log.c               |    3 +-
 arch/arm/mach-msm/smd_debug.c                    |    1 +
 arch/arm/plat-mxc/audmux-v2.c                    |    1 +
 arch/arm/plat-omap/iommu-debug.c                 |    2 +
 arch/avr32/boards/mimc200/fram.c                 |    1 +
 arch/blackfin/kernel/kgdb_test.c                 |    1 +
 arch/blackfin/mach-bf561/coreb.c                 |    1 +
 arch/cris/arch-v10/drivers/ds1302.c              |    1 +
 arch/cris/arch-v10/drivers/gpio.c                |    1 +
 arch/cris/arch-v10/drivers/i2c.c                 |    1 +
 arch/cris/arch-v10/drivers/pcf8563.c             |    1 +
 arch/cris/arch-v10/drivers/sync_serial.c         |    3 +-
 arch/cris/arch-v32/drivers/cryptocop.c           |    3 +-
 arch/cris/arch-v32/drivers/i2c.c                 |    1 +
 arch/cris/arch-v32/drivers/mach-a3/gpio.c        |    1 +
 arch/cris/arch-v32/drivers/mach-fs/gpio.c        |    1 +
 arch/cris/arch-v32/drivers/pcf8563.c             |    1 +
 arch/cris/arch-v32/drivers/sync_serial.c         |    3 +-
 arch/cris/kernel/profile.c                       |    1 +
 arch/ia64/kernel/salinfo.c                       |    2 +
 arch/ia64/sn/kernel/sn2/sn_hwperf.c              |    1 +
 arch/m68k/bvme6000/rtc.c                         |    1 +
 arch/m68k/mvme16x/rtc.c                          |    1 +
 arch/mips/kernel/rtlx.c                          |    3 +-
 arch/mips/kernel/vpe.c                           |    3 +-
 arch/mips/sibyte/common/sb_tbprof.c              |    1 +
 arch/powerpc/kernel/lparcfg.c                    |    1 +
 arch/powerpc/kernel/rtas_flash.c                 |    3 ++
 arch/powerpc/kernel/rtasd.c                      |    1 +
 arch/powerpc/platforms/cell/spufs/file.c         |   18 ++++++++++++
 arch/powerpc/platforms/iseries/mf.c              |    1 +
 arch/powerpc/platforms/pseries/reconfig.c        |    3 +-
 arch/powerpc/platforms/pseries/scanlog.c         |    1 +
 arch/s390/crypto/prng.c                          |    1 +
 arch/s390/hypfs/hypfs_diag.c                     |    1 +
 arch/s390/hypfs/hypfs_vm.c                       |    1 +
 arch/s390/hypfs/inode.c                          |    1 +
 arch/s390/kernel/debug.c                         |    1 +
 arch/sh/boards/mach-landisk/gio.c                |    1 +
 arch/sparc/kernel/apc.c                          |    1 +
 arch/sparc/kernel/mdesc.c                        |    1 +
 arch/tile/kernel/hardwall.c                      |    1 +
 arch/um/drivers/harddog_kern.c                   |    1 +
 arch/um/drivers/mconsole_kern.c                  |    1 +
 arch/um/drivers/mmapper_kern.c                   |    1 +
 arch/um/drivers/random.c                         |    1 +
 arch/x86/kernel/apm_32.c                         |    1 +
 arch/x86/kernel/cpu/mcheck/mce-severity.c        |    1 +
 arch/x86/kernel/cpu/mcheck/mce.c                 |    1 +
 arch/x86/kernel/kdebugfs.c                       |    1 +
 arch/x86/kernel/microcode_core.c                 |    1 +
 arch/x86/kernel/tlb_uv.c                         |    1 +
 arch/x86/xen/debugfs.c                           |    1 +
 block/bsg.c                                      |    1 +
 drivers/acpi/ec_sys.c                            |    1 +
 drivers/acpi/event.c                             |    1 +
 drivers/block/DAC960.c                           |    3 +-
 drivers/block/aoe/aoechr.c                       |    1 +
 drivers/block/paride/pg.c                        |    1 +
 drivers/block/paride/pt.c                        |    1 +
 drivers/block/pktcdvd.c                          |    1 +
 drivers/bluetooth/btmrvl_debugfs.c               |   10 ++++++
 drivers/bluetooth/hci_vhci.c                     |    1 +
 drivers/char/apm-emulation.c                     |    1 +
 drivers/char/bfin-otp.c                          |    1 +
 drivers/char/briq_panel.c                        |    1 +
 drivers/char/bsr.c                               |    1 +
 drivers/char/cs5535_gpio.c                       |    3 +-
 drivers/char/ds1302.c                            |    1 +
 drivers/char/ds1620.c                            |    1 +
 drivers/char/dsp56k.c                            |    1 +
 drivers/char/dtlk.c                              |    1 +
 drivers/char/genrtc.c                            |    1 +
 drivers/char/hw_random/core.c                    |    1 +
 drivers/char/ip2/ip2main.c                       |    1 +
 drivers/char/ipmi/ipmi_devintf.c                 |    1 +
 drivers/char/ipmi/ipmi_watchdog.c                |    1 +
 drivers/char/istallion.c                         |    1 +
 drivers/char/lp.c                                |    1 +
 drivers/char/mem.c                               |    3 ++
 drivers/char/misc.c                              |    1 +
 drivers/char/mmtimer.c                           |    1 +
 drivers/char/mspec.c                             |    9 ++++--
 drivers/char/mwave/mwavedd.c                     |    3 +-
 drivers/char/nwbutton.c                          |    1 +
 drivers/char/pc8736x_gpio.c                      |    1 +
 drivers/char/pcmcia/cm4000_cs.c                  |    1 +
 drivers/char/pcmcia/cm4040_cs.c                  |    1 +
 drivers/char/random.c                            |    2 +
 drivers/char/raw.c                               |    2 +
 drivers/char/rio/rio_linux.c                     |    1 +
 drivers/char/scx200_gpio.c                       |    1 +
 drivers/char/snsc.c                              |    1 +
 drivers/char/stallion.c                          |    1 +
 drivers/char/sx.c                                |    1 +
 drivers/char/sysrq.c                             |    1 +
 drivers/char/tb0219.c                            |    1 +
 drivers/char/tlclk.c                             |    1 +
 drivers/char/toshiba.c                           |    1 +
 drivers/char/uv_mmtimer.c                        |    1 +
 drivers/char/viotape.c                           |    1 +
 drivers/char/virtio_console.c                    |    3 ++
 drivers/char/xilinx_hwicap/xilinx_hwicap.c       |    1 +
 drivers/dma/coh901318.c                          |    1 +
 drivers/firewire/nosy.c                          |    1 +
 drivers/gpu/drm/drm_drv.c                        |    3 +-
 drivers/gpu/drm/i810/i810_dma.c                  |    1 +
 drivers/gpu/drm/i810/i810_drv.c                  |    1 +
 drivers/gpu/drm/i830/i830_dma.c                  |    1 +
 drivers/gpu/drm/i830/i830_drv.c                  |    1 +
 drivers/gpu/drm/i915/i915_debugfs.c              |    1 +
 drivers/gpu/drm/i915/i915_drv.c                  |    1 +
 drivers/gpu/drm/mga/mga_drv.c                    |    1 +
 drivers/gpu/drm/nouveau/nouveau_drv.c            |    1 +
 drivers/gpu/drm/r128/r128_drv.c                  |    1 +
 drivers/gpu/drm/radeon/radeon_drv.c              |    1 +
 drivers/gpu/drm/savage/savage_drv.c              |    1 +
 drivers/gpu/drm/sis/sis_drv.c                    |    1 +
 drivers/gpu/drm/tdfx/tdfx_drv.c                  |    1 +
 drivers/gpu/drm/via/via_drv.c                    |    1 +
 drivers/gpu/drm/vmwgfx/vmwgfx_drv.c              |    1 +
 drivers/gpu/vga/vgaarb.c                         |    1 +
 drivers/hid/hid-debug.c                          |    1 +
 drivers/hid/hid-roccat.c                         |    1 +
 drivers/hid/hidraw.c                             |    1 +
 drivers/hid/usbhid/hiddev.c                      |    1 +
 drivers/hwmon/asus_atk0110.c                     |    1 +
 drivers/ide/ide-tape.c                           |    1 +
 drivers/idle/i7300_idle.c                        |    1 +
 drivers/infiniband/hw/cxgb4/device.c             |    1 +
 drivers/infiniband/hw/ipath/ipath_diag.c         |    4 ++-
 drivers/infiniband/hw/ipath/ipath_file_ops.c     |    3 +-
 drivers/infiniband/hw/ipath/ipath_fs.c           |    3 ++
 drivers/infiniband/hw/qib/qib_diag.c             |    4 ++-
 drivers/infiniband/hw/qib/qib_file_ops.c         |    3 +-
 drivers/infiniband/hw/qib/qib_fs.c               |    1 +
 drivers/input/evdev.c                            |    3 +-
 drivers/input/input.c                            |    1 +
 drivers/input/joydev.c                           |    1 +
 drivers/input/misc/uinput.c                      |    1 +
 drivers/input/mousedev.c                         |    1 +
 drivers/input/serio/serio_raw.c                  |    1 +
 drivers/isdn/mISDN/timerdev.c                    |    1 +
 drivers/lguest/lguest_user.c                     |    1 +
 drivers/macintosh/ans-lcd.c                      |    1 +
 drivers/macintosh/via-pmu.c                      |    1 +
 drivers/md/dm-ioctl.c                            |    1 +
 drivers/media/IR/imon.c                          |    6 ++-
 drivers/media/IR/ir-lirc-codec.c                 |    1 +
 drivers/media/IR/lirc_dev.c                      |    3 ++
 drivers/media/dvb/bt8xx/dst_ca.c                 |    3 +-
 drivers/media/dvb/dvb-core/dmxdev.c              |    2 +
 drivers/media/dvb/dvb-core/dvb_ca_en50221.c      |    1 +
 drivers/media/dvb/dvb-core/dvb_frontend.c        |    3 +-
 drivers/media/dvb/dvb-core/dvb_net.c             |    1 +
 drivers/media/dvb/dvb-core/dvbdev.c              |    1 +
 drivers/media/dvb/firewire/firedtv-ci.c          |    1 +
 drivers/media/dvb/ttpci/av7110.c                 |    1 +
 drivers/media/dvb/ttpci/av7110_av.c              |    2 +
 drivers/media/dvb/ttpci/av7110_ca.c              |    1 +
 drivers/media/dvb/ttpci/av7110_ir.c              |    1 +
 drivers/mfd/ab3100-core.c                        |    1 +
 drivers/misc/hpilo.c                             |    1 +
 drivers/misc/ibmasm/ibmasmfs.c                   |    4 ++
 drivers/misc/iwmc3200top/debugfs.c               |    3 ++
 drivers/misc/lkdtm.c                             |    9 ++++++
 drivers/misc/phantom.c                           |    1 +
 drivers/misc/sgi-gru/grufile.c                   |    1 +
 drivers/mmc/core/debugfs.c                       |    1 +
 drivers/mtd/ubi/cdev.c                           |    1 +
 drivers/net/caif/caif_spi.c                      |    6 ++-
 drivers/net/cxgb4/cxgb4_main.c                   |    1 +
 drivers/net/ppp_generic.c                        |    3 +-
 drivers/net/wimax/i2400m/debugfs.c               |    2 +
 drivers/net/wireless/airo.c                      |   24 ++++++++++-----
 drivers/net/wireless/ath/ath5k/debug.c           |    7 ++++
 drivers/net/wireless/ath/ath9k/debug.c           |   33 ++++++++++++++-------
 drivers/net/wireless/ath/ath9k/htc_drv_main.c    |    9 ++++--
 drivers/net/wireless/b43/debugfs.c               |    1 +
 drivers/net/wireless/b43legacy/debugfs.c         |    1 +
 drivers/net/wireless/iwlwifi/iwl-3945-rs.c       |    1 +
 drivers/net/wireless/iwlwifi/iwl-agn-rs.c        |    3 ++
 drivers/net/wireless/iwlwifi/iwl-debugfs.c       |    3 ++
 drivers/net/wireless/iwmc3200wifi/debugfs.c      |    4 ++
 drivers/net/wireless/iwmc3200wifi/sdio.c         |    1 +
 drivers/net/wireless/libertas/debugfs.c          |    2 +
 drivers/net/wireless/ray_cs.c                    |    2 +
 drivers/net/wireless/rt2x00/rt2x00debug.c        |    5 +++
 drivers/net/wireless/wl12xx/wl1251_debugfs.c     |    4 ++
 drivers/net/wireless/wl12xx/wl1271_debugfs.c     |    6 +++-
 drivers/oprofile/oprofile_files.c                |    8 ++++-
 drivers/oprofile/oprofilefs.c                    |    3 ++
 drivers/pci/pcie/aer/aer_inject.c                |    1 +
 drivers/platform/x86/sony-laptop.c               |    1 +
 drivers/rtc/rtc-m41t80.c                         |    1 +
 drivers/s390/block/dasd_eer.c                    |    1 +
 drivers/s390/char/fs3270.c                       |    1 +
 drivers/s390/char/monreader.c                    |    1 +
 drivers/s390/char/monwriter.c                    |    1 +
 drivers/s390/char/tape_char.c                    |    1 +
 drivers/s390/char/vmcp.c                         |    1 +
 drivers/s390/char/vmlogrdr.c                     |    1 +
 drivers/s390/char/vmwatchdog.c                   |    1 +
 drivers/s390/char/zcore.c                        |    2 +
 drivers/s390/cio/chsc_sch.c                      |    1 +
 drivers/s390/cio/css.c                           |    1 +
 drivers/s390/crypto/zcrypt_api.c                 |    3 +-
 drivers/s390/scsi/zfcp_cfdc.c                    |    3 +-
 drivers/sbus/char/display7seg.c                  |    1 +
 drivers/sbus/char/envctrl.c                      |    1 +
 drivers/scsi/3w-9xxx.c                           |    3 +-
 drivers/scsi/3w-sas.c                            |    3 +-
 drivers/scsi/3w-xxxx.c                           |    3 +-
 drivers/scsi/aacraid/linit.c                     |    1 +
 drivers/scsi/ch.c                                |    1 +
 drivers/scsi/dpt_i2o.c                           |    1 +
 drivers/scsi/gdth.c                              |    1 +
 drivers/scsi/megaraid.c                          |    1 +
 drivers/scsi/megaraid/megaraid_mm.c              |    1 +
 drivers/scsi/megaraid/megaraid_sas.c             |    1 +
 drivers/scsi/mpt2sas/mpt2sas_ctl.c               |    1 +
 drivers/scsi/osd/osd_uld.c                       |    1 +
 drivers/scsi/pmcraid.c                           |    1 +
 drivers/scsi/qla2xxx/qla_os.c                    |    1 +
 drivers/scsi/scsi_tgt_if.c                       |    1 +
 drivers/scsi/sg.c                                |    1 +
 drivers/serial/mfd.c                             |    2 +
 drivers/spi/dw_spi.c                             |    1 +
 drivers/spi/spidev.c                             |    1 +
 drivers/staging/batman-adv/bat_debugfs.c         |    1 +
 drivers/staging/batman-adv/icmp_socket.c         |    1 +
 drivers/staging/comedi/comedi_fops.c             |    1 +
 drivers/staging/crystalhd/crystalhd_lnx.c        |    1 +
 drivers/staging/dream/camera/msm_camera.c        |    3 ++
 drivers/staging/dream/pmem.c                     |    2 +
 drivers/staging/dream/qdsp5/adsp_driver.c        |    1 +
 drivers/staging/dream/qdsp5/audio_aac.c          |    1 +
 drivers/staging/dream/qdsp5/audio_amrnb.c        |    1 +
 drivers/staging/dream/qdsp5/audio_evrc.c         |    1 +
 drivers/staging/dream/qdsp5/audio_in.c           |    2 +
 drivers/staging/dream/qdsp5/audio_mp3.c          |    1 +
 drivers/staging/dream/qdsp5/audio_out.c          |    2 +
 drivers/staging/dream/qdsp5/audio_qcelp.c        |    1 +
 drivers/staging/dream/qdsp5/evlog.h              |    1 +
 drivers/staging/dream/qdsp5/snd.c                |    1 +
 drivers/staging/frontier/alphatrack.c            |    1 +
 drivers/staging/frontier/tranzport.c             |    1 +
 drivers/staging/iio/industrialio-core.c          |    1 +
 drivers/staging/iio/industrialio-ring.c          |    1 +
 drivers/staging/lirc/lirc_imon.c                 |    3 +-
 drivers/staging/lirc/lirc_it87.c                 |    1 +
 drivers/staging/lirc/lirc_sasem.c                |    1 +
 drivers/staging/lirc/lirc_serial.c               |    1 +
 drivers/staging/lirc/lirc_sir.c                  |    1 +
 drivers/staging/memrar/memrar_handler.c          |    1 +
 drivers/staging/panel/panel.c                    |    1 +
 drivers/staging/tidspbridge/rmgr/drv_interface.c |    1 +
 drivers/telephony/ixj.c                          |    3 +-
 drivers/telephony/phonedev.c                     |    1 +
 drivers/uio/uio.c                                |    1 +
 drivers/usb/class/cdc-wdm.c                      |    3 +-
 drivers/usb/class/usblp.c                        |    1 +
 drivers/usb/class/usbtmc.c                       |    1 +
 drivers/usb/core/file.c                          |    1 +
 drivers/usb/gadget/f_hid.c                       |    1 +
 drivers/usb/gadget/printer.c                     |    3 +-
 drivers/usb/host/ehci-dbg.c                      |    4 ++
 drivers/usb/host/ohci-dbg.c                      |    3 ++
 drivers/usb/image/mdc800.c                       |    1 +
 drivers/usb/misc/adutux.c                        |    1 +
 drivers/usb/misc/idmouse.c                       |    1 +
 drivers/usb/misc/iowarrior.c                     |    1 +
 drivers/usb/misc/ldusb.c                         |    1 +
 drivers/usb/misc/rio500.c                        |    1 +
 drivers/usb/misc/usblcd.c                        |    1 +
 drivers/usb/usb-skeleton.c                       |    1 +
 drivers/vhost/net.c                              |    1 +
 drivers/video/fbmem.c                            |    1 +
 drivers/video/mbx/mbxdebugfs.c                   |    6 ++++
 drivers/watchdog/ar7_wdt.c                       |    1 +
 drivers/watchdog/cpwd.c                          |    1 +
 drivers/watchdog/ep93xx_wdt.c                    |    1 +
 drivers/watchdog/omap_wdt.c                      |    1 +
 drivers/xen/evtchn.c                             |    1 +
 drivers/xen/xenfs/super.c                        |    1 +
 drivers/xen/xenfs/xenbus.c                       |    1 +
 fs/afs/mntpt.c                                   |    1 +
 fs/autofs4/dev-ioctl.c                           |    1 +
 fs/binfmt_misc.c                                 |    3 ++
 fs/btrfs/super.c                                 |    1 +
 fs/cachefiles/daemon.c                           |    1 +
 fs/char_dev.c                                    |    1 +
 fs/coda/pioctl.c                                 |    1 +
 fs/coda/psdev.c                                  |    1 +
 fs/debugfs/file.c                                |    3 ++
 fs/dlm/debug_fs.c                                |    3 +-
 fs/dlm/plock.c                                   |    3 +-
 fs/dlm/user.c                                    |    3 ++
 fs/ecryptfs/file.c                               |    1 +
 fs/ecryptfs/miscdev.c                            |    1 +
 fs/eventfd.c                                     |    1 +
 fs/eventpoll.c                                   |    3 +-
 fs/fifo.c                                        |    1 +
 fs/fuse/control.c                                |    4 ++
 fs/fuse/cuse.c                                   |    1 +
 fs/gfs2/file.c                                   |    2 +
 fs/hppfs/hppfs.c                                 |    1 +
 fs/hugetlbfs/inode.c                             |    1 +
 fs/logfs/dir.c                                   |    1 +
 fs/nfsd/nfsctl.c                                 |    1 +
 fs/no-block.c                                    |    1 +
 fs/notify/fanotify/fanotify_user.c               |    1 +
 fs/notify/inotify/inotify_user.c                 |    1 +
 fs/ntfs/file.c                                   |    3 +-
 fs/ocfs2/dlmfs/dlmfs.c                           |    1 +
 fs/ocfs2/stack_user.c                            |    1 +
 fs/proc/base.c                                   |    8 +++++
 fs/proc/proc_sysctl.c                            |    1 +
 fs/proc/root.c                                   |    1 +
 fs/proc/task_mmu.c                               |    1 +
 fs/read_write.c                                  |    5 +--
 fs/romfs/super.c                                 |    1 +
 fs/signalfd.c                                    |    1 +
 fs/squashfs/dir.c                                |    3 +-
 fs/timerfd.c                                     |    1 +
 fs/ubifs/debug.c                                 |    1 +
 include/linux/fs.h                               |    1 +
 ipc/mqueue.c                                     |    1 +
 ipc/shm.c                                        |    2 +
 kernel/configs.c                                 |    1 +
 kernel/gcov/fs.c                                 |    1 +
 kernel/kprobes.c                                 |    1 +
 kernel/pm_qos_params.c                           |    1 +
 kernel/profile.c                                 |    1 +
 kernel/trace/blktrace.c                          |    2 +
 kernel/trace/ftrace.c                            |    2 +
 kernel/trace/ring_buffer.c                       |    1 +
 kernel/trace/trace_events.c                      |    6 ++++
 kernel/trace/trace_stack.c                       |    1 +
 lib/dma-debug.c                                  |    1 +
 net/atm/proc.c                                   |    1 +
 net/dccp/probe.c                                 |    1 +
 net/ipv4/tcp_probe.c                             |    1 +
 net/irda/irnet/irnet_ppp.h                       |    3 +-
 net/mac80211/debugfs.c                           |   21 ++++++++++----
 net/mac80211/debugfs_key.c                       |    2 +
 net/mac80211/debugfs_netdev.c                    |    1 +
 net/mac80211/debugfs_sta.c                       |    2 +
 net/mac80211/rate.c                              |    1 +
 net/mac80211/rc80211_minstrel_debugfs.c          |    1 +
 net/mac80211/rc80211_minstrel_ht_debugfs.c       |    3 +-
 net/mac80211/rc80211_pid_debugfs.c               |    1 +
 net/netfilter/xt_recent.c                        |    1 +
 net/nonet.c                                      |    1 +
 net/rfkill/core.c                                |    1 +
 net/sctp/probe.c                                 |    1 +
 net/socket.c                                     |    1 +
 net/sunrpc/cache.c                               |    2 +
 net/wireless/debugfs.c                           |    2 +
 samples/kfifo/bytestream-example.c               |    1 +
 samples/kfifo/inttype-example.c                  |    1 +
 samples/kfifo/record-example.c                   |    1 +
 samples/tracepoints/tracepoint-sample.c          |    1 +
 security/apparmor/apparmorfs.c                   |    9 ++++--
 security/inode.c                                 |    1 +
 security/smack/smackfs.c                         |    5 +++
 sound/core/seq/oss/seq_oss.c                     |    1 +
 sound/core/sound.c                               |    3 +-
 sound/oss/msnd_pinnacle.c                        |    1 +
 sound/oss/sh_dac_audio.c                         |    1 +
 sound/soc/soc-core.c                             |    1 +
 sound/soc/soc-dapm.c                             |    1 +
 sound/sound_core.c                               |    1 +
 virt/kvm/kvm_main.c                              |    3 ++
 376 files changed, 628 insertions(+), 79 deletions(-)

Cc: Al Viro <viro@zeniv.linux.org.uk>
Cc: Christoph Hellwig <hch@infradead.org>
Cc: David Airlie <airlied@linux.ie>
Cc: dri-devel@lists.freedesktop.org
Cc: Jeremy Kerr <jk@ozlabs.org>
Cc: "John W. Linville" <linville@tuxdriver.com>
Cc: Julia Lawall <julia@diku.dk>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: linux-fsdevel@vger.kernel.org
Cc: linux-omap@vger.kernel.org
Cc: linuxppc-dev@ozlabs.org
Cc: linux-wireless@vger.kernel.org
Cc: netdev@vger.kernel.org
Cc: Samuel Ortiz <samuel@sortiz.org>
Cc: Stephen Rothwell <sfr@canb.auug.org.au>
Cc: Tony Lindgren <tony@atomide.com>

^ permalink raw reply

* Re: [PATCH v2 01/10] RapidIO: Fix RapidIO sysfs hierarchy
From: Andrew Morton @ 2010-09-14 22:04 UTC (permalink / raw)
  To: Alexandre Bounine; +Cc: linux-kernel, Thomas Moll, linuxppc-dev
In-Reply-To: <1284476363-1677-2-git-send-email-alexandre.bounine@idt.com>

On Tue, 14 Sep 2010 10:59:14 -0400
Alexandre Bounine <alexandre.bounine@idt.com> wrote:

> Make RapidIO devices appear in /sys/devices/rapidio directory instead of top
> of /sys/devices directory.

Non-backward compatible change?  What is the risk of breaking existing
setups with this change?

^ permalink raw reply

* Re: [PATCH v2 06/10] RapidIO: Modify sysfs initialization for switches
From: Andrew Morton @ 2010-09-14 22:10 UTC (permalink / raw)
  To: Alexandre Bounine; +Cc: linux-kernel, Thomas Moll, linuxppc-dev
In-Reply-To: <1284476363-1677-7-git-send-email-alexandre.bounine@idt.com>

On Tue, 14 Sep 2010 10:59:19 -0400
Alexandre Bounine <alexandre.bounine@idt.com> wrote:

> 1. Change to create attribute "routes" only for switches.

This is also a non-back compatible userspace-visible change?

^ permalink raw reply

* Re: [PATCH v2 03/10] RapidIO: Use stored ingress port number instead of register read
From: Andrew Morton @ 2010-09-14 22:12 UTC (permalink / raw)
  To: Alexandre Bounine; +Cc: linux-kernel, Thomas Moll, linuxppc-dev
In-Reply-To: <1284476363-1677-4-git-send-email-alexandre.bounine@idt.com>

On Tue, 14 Sep 2010 10:59:16 -0400
Alexandre Bounine <alexandre.bounine@idt.com> wrote:

> @@ -219,6 +219,7 @@ struct rio_net {
>  /**
>   * struct rio_switch - RIO switch info
>   * @node: Node in global list of switches
> + * @rdev: Associated RIO device structure
>   * @switchid: Switch ID that is unique across a network
>   * @hopcount: Hopcount to this switch
>   * @destid: Associated destid in the path
> @@ -234,6 +235,7 @@ struct rio_net {
>   */
>  struct rio_switch {
>  	struct list_head node;
> +	struct rio_dev *rdev;
>  	u16 switchid;
>  	u16 hopcount;
>  	u16 destid;

What is the locking for rdev?  In other patches I see pointer chases
with no obvious locking against concurrent changes?

^ permalink raw reply

* Re: [PATCH v2 09/10] RapidIO: Add support for IDT CPS Gen2 switches
From: Andrew Morton @ 2010-09-14 22:20 UTC (permalink / raw)
  To: Alexandre Bounine; +Cc: linux-kernel, Thomas Moll, linuxppc-dev
In-Reply-To: <1284476363-1677-10-git-send-email-alexandre.bounine@idt.com>

On Tue, 14 Sep 2010 10:59:22 -0400
Alexandre Bounine <alexandre.bounine@idt.com> wrote:

> +static int
> +idtg2_route_add_entry(struct rio_mport *mport, u16 destid, u8 hopcount,
> +		       u16 table, u16 route_destid, u8 route_port)
> +{
> +	/*
> +	 * Select routing table to update
> +	 */
> +	if (table == RIO_GLOBAL_TABLE)
> +		table = 0;
> +	else
> +		table++;
> +
> +	rio_mport_write_config_32(mport, destid, hopcount,
> +				  LOCAL_RTE_CONF_DESTID_SEL, table);
> +
> +	/*
> +	 * Program destination port for the specified destID
> +	 */
> +	rio_mport_write_config_32(mport, destid, hopcount,
> +				  RIO_STD_RTE_CONF_DESTID_SEL_CSR,
> +				  (u32)route_destid);
> +
> +	rio_mport_write_config_32(mport, destid, hopcount,
> +				  RIO_STD_RTE_CONF_PORT_SEL_CSR,
> +				  (u32)route_port);
> +	udelay(10);
> +
> +	return 0;
> +}

The handling of `table' is strange.  One would expect the caller of
this function to provide the correct table index, and for the caller to
increment that index at an appropriate time.

So I take a look around but cannot find any means by which
->add_entry() is called with anything other than RIO_GLOBAL_TABLE. 
Maybe I missed something.  Is this all dead code?

^ permalink raw reply

* Re: linux-next: build warnings after merge of the final tree (tip treee related)
From: Yinghai Lu @ 2010-09-14 23:00 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: Peter Zijlstra, linux-kernel, linux-next, H. Peter Anvin,
	Ingo Molnar, ppc-dev, Thomas Gleixner
In-Reply-To: <20100914145025.977ec2a6.sfr@canb.auug.org.au>

On 09/13/2010 09:50 PM, Stephen Rothwell wrote:
> Hi Yinghai,
> 
> On Mon, 13 Sep 2010 01:24:20 -0700 Yinghai Lu <yinghai@kernel.org> wrote:
>>
>> On 09/12/2010 09:39 PM, Stephen Rothwell wrote:
>>>
>>> Your patch fixes some of the warnings, but still leaves these for a
>>> powerpc allnoconfig build:
>>>
>>> WARNING: mm/built-in.o(.text+0x25d80): Section mismatch in reference from the function memblock_double_array() to the function .init.text:memblock_free()
>>> The function memblock_double_array() references
>>> the function __init memblock_free().
>>> This is often because memblock_double_array lacks a __init 
>>> annotation or the annotation of memblock_free is wrong.
>>>
>>> WARNING: mm/built-in.o(.text+0x26318): Section mismatch in reference from the function memblock_reserve_reserved_regions() to the function .init.text:memblock_reserve()
>>> The function memblock_reserve_reserved_regions() references
>>> the function __init memblock_reserve().
>>> This is often because memblock_reserve_reserved_regions lacks a __init 
>>> annotation or the annotation of memblock_reserve is wrong.
>>>
>>> WARNING: mm/built-in.o(.text+0x26490): Section mismatch in reference from the function memblock_free_reserved_regions() to the function .init.text:memblock_free()
>>> The function memblock_free_reserved_regions() references
>>> the function __init memblock_free().
>>> This is often because memblock_free_reserved_regions lacks a __init 
>>> annotation or the annotation of memblock_free is wrong.
>>
>> v1 already changed them all to __init_memblock, so we should not have those warnings.
> 
> They are still marked as __init in include/linux/memblock.h.  I don't
> think that they need to be marked at all there.

good,

Also, we may need to remove all extern and __init and __initdata etc in .h files.

please check

[PATCH -v3] memblock: Fix section mismatch warning

Use __init_memblock to replace __init, and remove __init in memblock.h

-v2: more with memblock_is_meory()
-v3: remove __init for function declaring in memblock.h. Pointed out by Stephen.

Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Yinghai Lu <Yinghai@kernel.org>

---
 include/linux/memblock.h |   44 ++++++++++++++++++++++----------------------
 mm/memblock.c            |   14 +++++++-------
 2 files changed, 29 insertions(+), 29 deletions(-)

Index: linux-2.6/mm/memblock.c
===================================================================
--- linux-2.6.orig/mm/memblock.c
+++ linux-2.6/mm/memblock.c
@@ -125,8 +125,8 @@ static phys_addr_t __init memblock_find_
 	return MEMBLOCK_ERROR;
 }
 
-static phys_addr_t __init memblock_find_base(phys_addr_t size, phys_addr_t align,
-					phys_addr_t start, phys_addr_t end)
+static phys_addr_t __init_memblock memblock_find_base(phys_addr_t size,
+			phys_addr_t align, phys_addr_t start, phys_addr_t end)
 {
 	long i;
 
@@ -439,12 +439,12 @@ long __init_memblock memblock_remove(phy
 	return __memblock_remove(&memblock.memory, base, size);
 }
 
-long __init memblock_free(phys_addr_t base, phys_addr_t size)
+long __init_memblock memblock_free(phys_addr_t base, phys_addr_t size)
 {
 	return __memblock_remove(&memblock.reserved, base, size);
 }
 
-long __init memblock_reserve(phys_addr_t base, phys_addr_t size)
+long __init_memblock memblock_reserve(phys_addr_t base, phys_addr_t size)
 {
 	struct memblock_type *_rgn = &memblock.reserved;
 
@@ -671,12 +671,12 @@ int __init memblock_is_reserved(phys_add
 	return memblock_search(&memblock.reserved, addr) != -1;
 }
 
-int memblock_is_memory(phys_addr_t addr)
+int __init_memblock memblock_is_memory(phys_addr_t addr)
 {
 	return memblock_search(&memblock.memory, addr) != -1;
 }
 
-int memblock_is_region_memory(phys_addr_t base, phys_addr_t size)
+int __init_memblock memblock_is_region_memory(phys_addr_t base, phys_addr_t size)
 {
 	int idx = memblock_search(&memblock.reserved, base);
 
@@ -693,7 +693,7 @@ int __init_memblock memblock_is_region_r
 }
 
 
-void __init memblock_set_current_limit(phys_addr_t limit)
+void __init_memblock memblock_set_current_limit(phys_addr_t limit)
 {
 	memblock.current_limit = limit;
 }
Index: linux-2.6/include/linux/memblock.h
===================================================================
--- linux-2.6.orig/include/linux/memblock.h
+++ linux-2.6/include/linux/memblock.h
@@ -51,46 +51,46 @@ u64 memblock_find_in_range(u64 start, u6
 int memblock_free_reserved_regions(void);
 int memblock_reserve_reserved_regions(void);
 
-extern void __init memblock_init(void);
-extern void __init memblock_analyze(void);
-extern long memblock_add(phys_addr_t base, phys_addr_t size);
-extern long memblock_remove(phys_addr_t base, phys_addr_t size);
-extern long __init memblock_free(phys_addr_t base, phys_addr_t size);
-extern long __init memblock_reserve(phys_addr_t base, phys_addr_t size);
+void memblock_init(void);
+void memblock_analyze(void);
+long memblock_add(phys_addr_t base, phys_addr_t size);
+long memblock_remove(phys_addr_t base, phys_addr_t size);
+long memblock_free(phys_addr_t base, phys_addr_t size);
+long memblock_reserve(phys_addr_t base, phys_addr_t size);
 
 /* The numa aware allocator is only available if
  * CONFIG_ARCH_POPULATES_NODE_MAP is set
  */
-extern phys_addr_t __init memblock_alloc_nid(phys_addr_t size, phys_addr_t align,
+phys_addr_t memblock_alloc_nid(phys_addr_t size, phys_addr_t align,
 					int nid);
-extern phys_addr_t __init memblock_alloc_try_nid(phys_addr_t size, phys_addr_t align,
+phys_addr_t memblock_alloc_try_nid(phys_addr_t size, phys_addr_t align,
 					    int nid);
 
-extern phys_addr_t __init memblock_alloc(phys_addr_t size, phys_addr_t align);
+phys_addr_t memblock_alloc(phys_addr_t size, phys_addr_t align);
 
 /* Flags for memblock_alloc_base() amd __memblock_alloc_base() */
 #define MEMBLOCK_ALLOC_ANYWHERE	(~(phys_addr_t)0)
 #define MEMBLOCK_ALLOC_ACCESSIBLE	0
 
-extern phys_addr_t __init memblock_alloc_base(phys_addr_t size,
+phys_addr_t memblock_alloc_base(phys_addr_t size,
 					 phys_addr_t align,
 					 phys_addr_t max_addr);
-extern phys_addr_t __init __memblock_alloc_base(phys_addr_t size,
+phys_addr_t __memblock_alloc_base(phys_addr_t size,
 					   phys_addr_t align,
 					   phys_addr_t max_addr);
-extern phys_addr_t __init memblock_phys_mem_size(void);
-extern phys_addr_t memblock_end_of_DRAM(void);
-extern void __init memblock_enforce_memory_limit(phys_addr_t memory_limit);
-extern int memblock_is_memory(phys_addr_t addr);
-extern int memblock_is_region_memory(phys_addr_t base, phys_addr_t size);
-extern int __init memblock_is_reserved(phys_addr_t addr);
-extern int memblock_is_region_reserved(phys_addr_t base, phys_addr_t size);
+phys_addr_t memblock_phys_mem_size(void);
+phys_addr_t memblock_end_of_DRAM(void);
+void memblock_enforce_memory_limit(phys_addr_t memory_limit);
+int memblock_is_memory(phys_addr_t addr);
+int memblock_is_region_memory(phys_addr_t base, phys_addr_t size);
+int memblock_is_reserved(phys_addr_t addr);
+int memblock_is_region_reserved(phys_addr_t base, phys_addr_t size);
 
-extern void memblock_dump_all(void);
+void memblock_dump_all(void);
 
 /* Provided by the architecture */
-extern phys_addr_t memblock_nid_range(phys_addr_t start, phys_addr_t end, int *nid);
-extern int memblock_memory_can_coalesce(phys_addr_t addr1, phys_addr_t size1,
+phys_addr_t memblock_nid_range(phys_addr_t start, phys_addr_t end, int *nid);
+int memblock_memory_can_coalesce(phys_addr_t addr1, phys_addr_t size1,
 				   phys_addr_t addr2, phys_addr_t size2);
 
 /**
@@ -99,7 +99,7 @@ extern int memblock_memory_can_coalesce(
  *                         accessible during boot
  * @limit: New limit value (physical address)
  */
-extern void memblock_set_current_limit(phys_addr_t limit);
+void memblock_set_current_limit(phys_addr_t limit);
 
 
 /*

^ permalink raw reply

* Re: linux-next: build warnings after merge of the final tree (tip treee related)
From: Stephen Rothwell @ 2010-09-15  0:29 UTC (permalink / raw)
  To: Yinghai Lu
  Cc: Peter Zijlstra, linux-kernel, linux-next, H. Peter Anvin,
	Ingo Molnar, ppc-dev, Thomas Gleixner
In-Reply-To: <4C8FFE76.8070801@kernel.org>

[-- Attachment #1: Type: text/plain, Size: 327 bytes --]

Hi Yinghai,

On Tue, 14 Sep 2010 16:00:06 -0700 Yinghai Lu <yinghai@kernel.org> wrote:
>
> Also, we may need to remove all extern and __init and __initdata etc in .h files.

Do not remove the "extern" key word.

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/

[-- Attachment #2: Type: application/pgp-signature, Size: 490 bytes --]

^ permalink raw reply

* Re: linux-next: build warnings after merge of the final tree (tip treee related)
From: Yinghai Lu @ 2010-09-15  1:33 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: Peter Zijlstra, linux-kernel, linux-next, H. Peter Anvin,
	Ingo Molnar, ppc-dev, Thomas Gleixner
In-Reply-To: <20100915102930.5e4d59cb.sfr@canb.auug.org.au>

On 09/14/2010 05:29 PM, Stephen Rothwell wrote:
> Hi Yinghai,
> 
> On Tue, 14 Sep 2010 16:00:06 -0700 Yinghai Lu <yinghai@kernel.org> wrote:
>>
>> Also, we may need to remove all extern and __init and __initdata etc in .h files.
> 
> Do not remove the "extern" key word.
> 

why? you got another warning?

Yinghai

^ permalink raw reply

* Re: linux-next: build warnings after merge of the final tree (tip treee related)
From: Stephen Rothwell @ 2010-09-15  4:39 UTC (permalink / raw)
  To: Yinghai Lu
  Cc: Peter Zijlstra, linux-kernel, linux-next, H. Peter Anvin,
	Ingo Molnar, ppc-dev, Thomas Gleixner
In-Reply-To: <4C90226E.4050306@kernel.org>

[-- Attachment #1: Type: text/plain, Size: 606 bytes --]

Hi Yinghai,

On Tue, 14 Sep 2010 18:33:34 -0700 Yinghai Lu <yinghai@kernel.org> wrote:
>
> On 09/14/2010 05:29 PM, Stephen Rothwell wrote:
> > 
> > Do not remove the "extern" key word.
> 
> why? you got another warning?

It is normal C coding practice to mark declarations in header files with
extern.  It probably doesn't strictly matter for functions, but I have
seen a case where not doing so to a variable lead to multiple definitions
of the variable.  Consistency is also good.

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/

[-- Attachment #2: Type: application/pgp-signature, Size: 490 bytes --]

^ permalink raw reply

* Re: linux-next: build warnings after merge of the final tree (tip treee related)
From: Stephen Rothwell @ 2010-09-15  5:00 UTC (permalink / raw)
  To: Yinghai Lu
  Cc: Peter Zijlstra, linux-kernel, linux-next, H. Peter Anvin,
	Ingo Molnar, ppc-dev, Thomas Gleixner
In-Reply-To: <4C8FFE76.8070801@kernel.org>

[-- Attachment #1: Type: text/plain, Size: 829 bytes --]

Hi Yinghai,

On Tue, 14 Sep 2010 16:00:06 -0700 Yinghai Lu <yinghai@kernel.org> wrote:
>
> Also, we may need to remove all extern and __init and __initdata etc in .h files.
> 
> please check
> 
> [PATCH -v3] memblock: Fix section mismatch warning
> 
> Use __init_memblock to replace __init, and remove __init in memblock.h
> 
> -v2: more with memblock_is_meory()
> -v3: remove __init for function declaring in memblock.h. Pointed out by Stephen.
> 
> Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
> Signed-off-by: Yinghai Lu <Yinghai@kernel.org>

This version fixes all the warnings for me.  So if you put the "extern"s
back, you can add:

Tested-by: Stephen Rothwell <sfr@canb.auug.org.au>

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/

[-- Attachment #2: Type: application/pgp-signature, Size: 490 bytes --]

^ permalink raw reply

* Re: Generating elf kernel ?
From: Guillaume Dargaud @ 2010-09-15  8:07 UTC (permalink / raw)
  To: linuxppc-dev
In-Reply-To: <20100914125713.GB5768@radix50.net>

> > How do I generate an elf file ?
> vmlinux?

Thanks.

The entry point address has change and I can't upload it:
New (bad) one:
$ readelf -h vmlinux
...
  Entry point address:               0xc0000000

Old (good) one:
$ readelf -h zImage.elf 
...
  Entry point address:               0x400000

How can I change the entry point address ?
-- 
Guillaume Dargaud
http://www.gdargaud.net/

^ permalink raw reply

* Re: Generating elf kernel ?
From: tiejun.chen @ 2010-09-15  8:27 UTC (permalink / raw)
  To: Guillaume Dargaud; +Cc: linuxppc-dev
In-Reply-To: <201009151007.50706.dargaud@lpsc.in2p3.fr>

Guillaume Dargaud wrote:
>>> How do I generate an elf file ?
>> vmlinux?
> 
> Thanks.
> 
> The entry point address has change and I can't upload it:
> New (bad) one:
> $ readelf -h vmlinux
> ...
>   Entry point address:               0xc0000000
> 
> Old (good) one:
> $ readelf -h zImage.elf 
> ...
>   Entry point address:               0x400000
> 
> How can I change the entry point address ?

It's impossible to boot PPC vmlinux format directly if you only change the
original entry point address, 0xc0000000.

For kernel the following is as default:
v:0xc0000000 --> p:0x0

Please use simpleImage.<your target dts name>.elf.

Cheers
Tiejun

^ permalink raw reply

* Re: linux-next: build warnings after merge of the final tree (tip treee related)
From: Ingo Molnar @ 2010-09-15  9:25 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: Peter Zijlstra, ppc-dev, linux-kernel, linux-next, H. Peter Anvin,
	Thomas Gleixner, Yinghai Lu
In-Reply-To: <20100915150047.42551e34.sfr@canb.auug.org.au>


* Stephen Rothwell <sfr@canb.auug.org.au> wrote:

> Hi Yinghai,
> 
> On Tue, 14 Sep 2010 16:00:06 -0700 Yinghai Lu <yinghai@kernel.org> wrote:
> >
> > Also, we may need to remove all extern and __init and __initdata etc in .h files.
> > 
> > please check
> > 
> > [PATCH -v3] memblock: Fix section mismatch warning
> > 
> > Use __init_memblock to replace __init, and remove __init in memblock.h
> > 
> > -v2: more with memblock_is_meory()
> > -v3: remove __init for function declaring in memblock.h. Pointed out by Stephen.
> > 
> > Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
> > Signed-off-by: Yinghai Lu <Yinghai@kernel.org>
> 
> This version fixes all the warnings for me.  So if you put the "extern"s
> back, you can add:
> 
> Tested-by: Stephen Rothwell <sfr@canb.auug.org.au>

Yinghai, mind posting the final version of the patch as a standalone 
posting, with a proper changelog, and with the extern issue fixed as 
well, plus all Reported-by and Tested-by tags added?

Thanks,

	Ingo

^ permalink raw reply

* Re: [PATCH 0/7] BKL mass-conversion to mutex
From: Stephen Rothwell @ 2010-09-15  9:38 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Corey Minyard, Jens Axboe, David Woodhouse, linux-scsi,
	Takashi Iwai, linux-kernel, linuxppc-dev, James E.J. Bottomley,
	linux-mtd, Ingo Molnar, Linus Torvalds, openipmi-developer
In-Reply-To: <1284494022-7346-1-git-send-email-arnd@arndb.de>

[-- Attachment #1: Type: text/plain, Size: 1752 bytes --]

Hi Arnd,

On Tue, 14 Sep 2010 21:53:35 +0200 Arnd Bergmann <arnd@arndb.de> wrote:
>
> Stephen, please add
> git+ssh://master.kernel.org/pub/scm/linux/kernel/git/arnd/bkl.git trivial

Added from today.

Thanks for adding your subsystem tree as a participant of linux-next.  As
you may know, this is not a judgment of your code.  The purpose of
linux-next is for integration testing and to lower the impact of
conflicts between subsystems in the next merge window. 

You will need to ensure that the patches/commits in your tree/series have
been:
     * submitted under GPL v2 (or later) and include the Contributor's
	Signed-off-by,
     * posted to the relevant mailing list,
     * reviewed by you (or another maintainer of your subsystem tree),
     * successfully unit tested, and 
     * destined for the current or next Linux merge window.

Basically, this should be just what you would send to Linus (or ask him
to fetch).  It is allowed to be rebased if you deem it necessary.

-- 
Cheers,
Stephen Rothwell 
sfr@canb.auug.org.au

Legal Stuff:
By participating in linux-next, your subsystem tree contributions are
public and will be included in the linux-next trees.  You may be sent
e-mail messages indicating errors or other issues when the
patches/commits from your subsystem tree are merged and tested in
linux-next.  These messages may also be cross-posted to the linux-next
mailing list, the linux-kernel mailing list, etc.  The linux-next tree
project and IBM (my employer) make no warranties regarding the linux-next
project, the testing procedures, the results, the e-mails, etc.  If you
don't agree to these ground rules, let me know and I'll remove your tree
from participation in linux-next.

[-- Attachment #2: Type: application/pgp-signature, Size: 490 bytes --]

^ permalink raw reply

* Re: [PATCH 00/15] change default_llseek action
From: Stephen Rothwell @ 2010-09-15  9:39 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Samuel Ortiz, David Airlie, netdev, linux-wireless, linux-kernel,
	dri-devel, Christoph Hellwig, linuxppc-dev, Tony Lindgren,
	Julia Lawall, Jeremy Kerr, linux-fsdevel, linux-omap,
	Linus Torvalds, Al Viro
In-Reply-To: <1284495763-7506-1-git-send-email-arnd@arndb.de>

[-- Attachment #1: Type: text/plain, Size: 1751 bytes --]

Hi Arnd,

On Tue, 14 Sep 2010 22:22:28 +0200 Arnd Bergmann <arnd@arndb.de> wrote:
>
> Stephen, please add
> git+ssh://master.kernel.org/pub/scm/linux/kernel/git/arnd/bkl.git llseek

Added from today.

Thanks for adding your subsystem tree as a participant of linux-next.  As
you may know, this is not a judgment of your code.  The purpose of
linux-next is for integration testing and to lower the impact of
conflicts between subsystems in the next merge window. 

You will need to ensure that the patches/commits in your tree/series have
been:
     * submitted under GPL v2 (or later) and include the Contributor's
	Signed-off-by,
     * posted to the relevant mailing list,
     * reviewed by you (or another maintainer of your subsystem tree),
     * successfully unit tested, and 
     * destined for the current or next Linux merge window.

Basically, this should be just what you would send to Linus (or ask him
to fetch).  It is allowed to be rebased if you deem it necessary.

-- 
Cheers,
Stephen Rothwell 
sfr@canb.auug.org.au

Legal Stuff:
By participating in linux-next, your subsystem tree contributions are
public and will be included in the linux-next trees.  You may be sent
e-mail messages indicating errors or other issues when the
patches/commits from your subsystem tree are merged and tested in
linux-next.  These messages may also be cross-posted to the linux-next
mailing list, the linux-kernel mailing list, etc.  The linux-next tree
project and IBM (my employer) make no warranties regarding the linux-next
project, the testing procedures, the results, the e-mails, etc.  If you
don't agree to these ground rules, let me know and I'll remove your tree
from participation in linux-next.

[-- Attachment #2: Type: application/pgp-signature, Size: 490 bytes --]

^ permalink raw reply

* Re: Question on of_address_to_resource() with offset != 0
From: Stefan Roese @ 2010-09-15 12:59 UTC (permalink / raw)
  To: devicetree-discuss; +Cc: linuxppc-dev, Detlev Zundel
In-Reply-To: <201009141629.06825.stefan.roese@gmail.com>

On Tuesday 14 September 2010 16:29:06 Stefan Roese wrote:
> I'm stumbling upon a problem noticed on the Ebony (440GP) eval board.
> Here the first chip-select is connected to 512KiB of SRAM and 512KiB
> NOR flash.

"Brown paper bag" time for me. Problem was located in U-Boot. Sorry for the 
noise.

Cheers,
Stefan

--
DENX Software Engineering GmbH,      MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich,  Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-0 Fax: (+49)-8142-66989-80 Email: office@denx.de

^ permalink raw reply

* [PATCH] fixes probe issue and hangup in spi_mpc8xxx.c for data bigger than PAGE_SIZE
From: LEROY Christophe @ 2010-09-15 13:29 UTC (permalink / raw)
  To: David Brownell, Grant Likely
  Cc: spi-devel-general, LinuxPPC-dev, linux-kernel

  This patch applies to 2.6.34.7. It also applies to 2.6.35.4 althought 
part of it is already included in 2.6.35.4
It fixed a problem with spi_mpc8xxx.c when transmitting or receiving 
data bigger than PAGE_SIZE when doing a read only or write only operation
It also fixed an issue with the init probe when fetching the information 
on parameter RAM from the DTB.

Signed-off-by: christophe leroy <christophe.leroy@c-s.fr>

Index: trunk/drivers/spi/spi_mpc8xxx.c
===================================================================
--- trunk/drivers/spi/spi_mpc8xxx.c    (révision 963)
+++ trunk/drivers/spi/spi_mpc8xxx.c    (copie de travail)
@@ -393,11 +393,17 @@

      xfer_ofs = mspi->xfer_in_progress->len - mspi->count;

-    out_be32(&rx_bd->cbd_bufaddr, mspi->rx_dma + xfer_ofs);
+    if (mspi->rx_dma == mspi->dma_dummy_rx)
+        out_be32(&rx_bd->cbd_bufaddr, mspi->rx_dma);
+    else
+        out_be32(&rx_bd->cbd_bufaddr, mspi->rx_dma + xfer_ofs);
      out_be16(&rx_bd->cbd_datlen, 0);
      out_be16(&rx_bd->cbd_sc, BD_SC_EMPTY | BD_SC_INTRPT | BD_SC_WRAP);

-    out_be32(&tx_bd->cbd_bufaddr, mspi->tx_dma + xfer_ofs);
+    if (mspi->tx_dma == mspi->dma_dummy_tx)
+        out_be32(&tx_bd->cbd_bufaddr, mspi->tx_dma);
+    else
+        out_be32(&tx_bd->cbd_bufaddr, mspi->tx_dma + xfer_ofs);
      out_be16(&tx_bd->cbd_datlen, xfer_len);
      out_be16(&tx_bd->cbd_sc, BD_SC_READY | BD_SC_INTRPT | BD_SC_WRAP |
                   BD_SC_LAST);
@@ -438,7 +444,7 @@
              dev_err(dev, "unable to map tx dma\n");
              return -ENOMEM;
          }
-    } else {
+    } else if (t->tx_buf) {
          mspi->tx_dma = t->tx_dma;
      }

@@ -449,7 +455,7 @@
              dev_err(dev, "unable to map rx dma\n");
              goto err_rx_dma;
          }
-    } else {
+    } else if (t->rx_buf) {
          mspi->rx_dma = t->rx_dma;
      }

@@ -822,7 +828,7 @@
      if (!iprop || size != sizeof(*iprop) * 4)
          return -ENOMEM;

-    spi_base_ofs = cpm_muram_alloc_fixed(iprop[2], 2);
+    spi_base_ofs = iprop[2];
      if (IS_ERR_VALUE(spi_base_ofs))
          return -ENOMEM;

@@ -844,7 +850,6 @@
              return spi_base_ofs;
      }

-    cpm_muram_free(spi_base_ofs);
      return pram_ofs;
  }

^ permalink raw reply


This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox