* [PATCH 0/4] signalfd: a kernel interface for dumping/restoring pending signals
From: Andrey Vagin @ 2012-12-24 8:13 UTC (permalink / raw)
To: linux-kernel
Cc: criu, linux-fsdevel, Andrey Vagin, Serge Hallyn, Oleg Nesterov,
Andrew Morton, Eric W. Biederman, Al Viro, Pavel Emelyanov,
Cyrill Gorcunov
The idea is simple. We need to get the siginfo for each signal on dump,
and then return it back on restore.
The first problem is that the kernel doesn’t report complete siginfo-s
in user-space. In a signal handler the kernel strips SI_CODE from
siginfo. When a siginfo is received from signalfd, it has a different
format with fixed sizes of fields. The interface of signalfd was
extended. If a signalfd is created with the flag SFD_RAW, it returns
siginfo in a raw format. We need to choose a queue, so two flags
SFD_GROUP and SFD_PRIVATE were added.
rt_sigqueueinfo looks suitable for restoring signals, but it can’t send
siginfo with a positive si_code, because these codes are reserved for
the kernel. In the real world each person has right to do anything with
himself, so I think a process should able to send any siginfo to itself.
Cc: Serge Hallyn <serge.hallyn@canonical.com>
Cc: Oleg Nesterov <oleg@redhat.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: "Eric W. Biederman" <ebiederm@xmission.com>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Cc: Pavel Emelyanov <xemul@parallels.com>
CC: Cyrill Gorcunov <gorcunov@openvz.org>
--
1.7.11.7
--
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply
* [PATCH 0/4] signalfd: a kernel interface for dumping/restoring pending signals
From: Andrey Vagin @ 2012-12-24 8:13 UTC (permalink / raw)
To: linux-kernel
Cc: criu, linux-fsdevel, Andrey Vagin, Serge Hallyn, Oleg Nesterov,
Andrew Morton, Eric W. Biederman, Al Viro, Pavel Emelyanov,
Cyrill Gorcunov
The idea is simple. We need to get the siginfo for each signal on dump,
and then return it back on restore.
The first problem is that the kernel doesn’t report complete siginfo-s
in user-space. In a signal handler the kernel strips SI_CODE from
siginfo. When a siginfo is received from signalfd, it has a different
format with fixed sizes of fields. The interface of signalfd was
extended. If a signalfd is created with the flag SFD_RAW, it returns
siginfo in a raw format. We need to choose a queue, so two flags
SFD_GROUP and SFD_PRIVATE were added.
rt_sigqueueinfo looks suitable for restoring signals, but it can’t send
siginfo with a positive si_code, because these codes are reserved for
the kernel. In the real world each person has right to do anything with
himself, so I think a process should able to send any siginfo to itself.
Cc: Serge Hallyn <serge.hallyn@canonical.com>
Cc: Oleg Nesterov <oleg@redhat.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: "Eric W. Biederman" <ebiederm@xmission.com>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Cc: Pavel Emelyanov <xemul@parallels.com>
CC: Cyrill Gorcunov <gorcunov@openvz.org>
--
1.7.11.7
^ permalink raw reply
* Re: [PATCH 3/3] Initial commit for wayland/weston 1.0.3
From: Damian, Alexandru @ 2012-12-24 8:00 UTC (permalink / raw)
To: Burton, Ross; +Cc: Patches and discussions about the oe-core layer
In-Reply-To: <CAJTo0LbBM0AWg1Trx_ctKqYyC2RLYgkwBcDX=6F=3agOK8SFiA@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1373 bytes --]
One should follow the wayland website for HOWTO-s and testing
instructions.
Opening a terminal emulator and starting "weston" is the easiest way
to get started, regardless if one is under X or in console.
I don't think the patch comment is the proper place to document this,
should I add a wiki page ?
Alex
On Fri, Dec 21, 2012 at 5:46 PM, Burton, Ross <ross.burton@intel.com> wrote:
> On 21 December 2012 12:51, Alex DAMIAN <alexandru.damian@intel.com> wrote:
> > From: Alexandru DAMIAN <alexandru.damian@intel.com>
> >
> > This patch adds the Weston reference compositing
> > manager from Wayland.
>
> How does one test this? Instructions on how to get a nested weston
> under X would be great, and something that can be used to verify that
> weston is drawing correctly - be it a set of toy apps, the terminal,
> or something else.
>
> Ross
> ---------------------------------------------------------------------
> Intel Corporation (UK) Limited
> Registered No. 1134945 (England)
> Registered Office: Pipers Way, Swindon SN3 1RJ
> VAT No: 860 2173 47
>
> This e-mail and any attachments may contain confidential material for
> the sole use of the intended recipient(s). Any review or distribution
> by others is strictly prohibited. If you are not the intended
> recipient, please contact the sender and delete all copies.
>
[-- Attachment #2: Type: text/html, Size: 2013 bytes --]
^ permalink raw reply
* [PATCH 2/4] signal: add a helper for dequeuing signals from a specified queue
From: Andrey Vagin @ 2012-12-24 8:13 UTC (permalink / raw)
To: linux-kernel
Cc: criu, linux-fsdevel, Andrey Vagin, Ingo Molnar, Peter Zijlstra,
Serge Hallyn, Oleg Nesterov, Andrew Morton, Eric W. Biederman,
Al Viro, Pavel Emelyanov, Cyrill Gorcunov
In-Reply-To: <1356336807-5517-1-git-send-email-avagin@openvz.org>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Serge Hallyn <serge.hallyn@canonical.com>
Cc: Oleg Nesterov <oleg@redhat.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: "Eric W. Biederman" <ebiederm@xmission.com>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Cc: Pavel Emelyanov <xemul@parallels.com>
CC: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: Andrey Vagin <avagin@openvz.org>
---
include/linux/sched.h | 9 ++++++++-
kernel/signal.c | 13 +++++++++----
2 files changed, 17 insertions(+), 5 deletions(-)
diff --git a/include/linux/sched.h b/include/linux/sched.h
index 0dd42a0..de9a4bf 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -2159,7 +2159,14 @@ extern void flush_signals(struct task_struct *);
extern void __flush_signals(struct task_struct *);
extern void ignore_signals(struct task_struct *);
extern void flush_signal_handlers(struct task_struct *, int force_default);
-extern int dequeue_signal(struct task_struct *tsk, sigset_t *mask, siginfo_t *info);
+extern int do_dequeue_signal(struct task_struct *tsk,
+ sigset_t *mask, siginfo_t *info, int queue);
+
+static inline int dequeue_signal(struct task_struct *tsk,
+ sigset_t *mask, siginfo_t *info)
+{
+ return do_dequeue_signal(tsk, mask, info, 0);
+}
static inline int dequeue_signal_lock(struct task_struct *tsk, sigset_t *mask, siginfo_t *info)
{
diff --git a/kernel/signal.c b/kernel/signal.c
index 0af8868..91bb76f2 100644
--- a/kernel/signal.c
+++ b/kernel/signal.c
@@ -597,17 +597,22 @@ static int __dequeue_signal(struct sigpending *pending, sigset_t *mask,
* Dequeue a signal and return the element to the caller, which is
* expected to free it.
*
+ * @queue: dequeue from a private queue, if a value is not positive
+ * dequeue from a shared queue, if a value if not negative
+ *
* All callers have to hold the siglock.
*/
-int dequeue_signal(struct task_struct *tsk, sigset_t *mask, siginfo_t *info)
+int do_dequeue_signal(struct task_struct *tsk, sigset_t *mask,
+ siginfo_t *info, int queue)
{
- int signr;
+ int signr = 0;
/* We only dequeue private signals from ourselves, we don't let
* signalfd steal them
*/
- signr = __dequeue_signal(&tsk->pending, mask, info);
- if (!signr) {
+ if (queue <= 0)
+ signr = __dequeue_signal(&tsk->pending, mask, info);
+ if (!signr && queue >= 0) {
signr = __dequeue_signal(&tsk->signal->shared_pending,
mask, info);
/*
--
1.7.11.7
^ permalink raw reply related
* Re: recomended bcache setup
From: Thomas Fjellstrom @ 2012-12-24 8:20 UTC (permalink / raw)
To: linux-bcache-u79uwXL29TY76Z2rM5mHXA
In-Reply-To: <201212212006.41906.thomas-T/OQ2aoscs6U4IzBdx3r/Q@public.gmane.org>
On Fri Dec 21, 2012, Thomas Fjellstrom wrote:
> I'm setting up a little home NAS here, and I've been thinking about using
> bcache to speed up the random access bits on the "big" raid6 array (7x2TB).
>
> How does one get started using bcache (custom patched kernel?), and what is
> the recommended setup for use with mdraid? I remember reading ages ago that
> it was recommended that each component device was attached directly to the
> cache, and then mdraid put on top, but a quick google suggests putting the
> cache on top of the raid instead.
>
> Also, is it possible to add a cache to an existing volume yet? I have a
> smaller array (7x1TB) that I wouldn't mind adding the cache layer to.
I just tried a basic setup with the cache ontop of the raid6. I ran a quick
iozone test with the default debian sid (3.2.35) kernel, the bcache (3.2.28)
kernel without bcache enabled, and with bcache enabled (See below).
Here's a little information:
system info:
Intel S1200KP Motherboard
Intel Core i3 2120 CPU
16GB DDR3 1333 ECC
IBM M1015 in IT mode
7 x 2TB Seagate Barracuda HDDs
1 x 240 GB Samsung 470 SSD
kernel: fresh git checkout of the bcache repo, 3.2.28
Raid Info:
/dev/md0:
Version : 1.2
Creation Time : Sat Dec 22 03:38:05 2012
Raid Level : raid6
Array Size : 9766914560 (9314.46 GiB 10001.32 GB)
Used Dev Size : 1953382912 (1862.89 GiB 2000.26 GB)
Raid Devices : 7
Total Devices : 7
Persistence : Superblock is persistent
Update Time : Mon Dec 24 00:22:28 2012
State : clean
Active Devices : 7
Working Devices : 7
Failed Devices : 0
Spare Devices : 0
Layout : left-symmetric
Chunk Size : 512K
Name : mrbig:0 (local to host mrbig)
UUID : 547c30d1:3af4b2ec:14712d0b:88e4337a
Events : 10591
Number Major Minor RaidDevice State
0 8 0 0 active sync /dev/sda
1 8 16 1 active sync /dev/sdb
2 8 32 2 active sync /dev/sdc
3 8 48 3 active sync /dev/sdd
4 8 80 4 active sync /dev/sdf
5 8 96 5 active sync /dev/sdg
6 8 112 6 active sync /dev/sdh
Fs info:
root@mrbig:~/build/bcache-tools# xfs_info /dev/bcache0
meta-data=/dev/bcache0 isize=256 agcount=10, agsize=268435328 blks
= sectsz=512 attr=2
data = bsize=4096 blocks=2441728638, imaxpct=5
= sunit=128 swidth=640 blks
naming =version 2 bsize=4096 ascii-ci=0
log =internal bsize=4096 blocks=521728, version=2
= sectsz=512 sunit=8 blks, lazy-count=1
realtime =none extsz=4096 blocks=0, rtextents=0
iozone -a -s 32G -r 8M
random random bkwd record stride
KB reclen write rewrite read reread read write read rewrite read fwrite frewrite fread freread
w/o cache (debian kernel 3.2.35-1)
33554432 8192 212507 210382 630327 630852 372807 161710 388319 4922757 617347 210642 217122 717279 716150
w/ cache (bcache git kernel 3.2.28):
33554432 8192 248376 231717 268560 269966 123718 132210 148030 4888983 152240 230099 238223 276254 282441
w/o cache (bcache git kernel 3.2.28):
33554432 8192 277607 259159 709837 702192 399889 151629 399779 4846688 655210 251297 245953 783930 778595
Note: I disabled the cache before the last test, unregistered the device and
"stop"ed the cache. I also changed the config slightly for the bcache kernel,
I started out with the debian config, and then switched the preemption option
to server, which may be the reason for the performance difference between the
two non cached tests.
I probably messed up the setup somehow. If anyone has some tips or suggestions
I'd appreciate some input.
--
Thomas Fjellstrom
thomas-T/OQ2aoscs6U4IzBdx3r/Q@public.gmane.org
^ permalink raw reply
* Re: [PATCH v2 2/3] mm: Update file times when inodes are written after mmaped writes
From: Zheng Liu @ 2012-12-24 8:36 UTC (permalink / raw)
To: Andy Lutomirski
Cc: linux-kernel, linux-mm, Linux FS Devel, Dave Chinner, Jan Kara,
Al Viro
In-Reply-To: <6b22b806806b21af02b70a2fa860a9d10304fc16.1356124965.git.luto@amacapital.net>
On Fri, Dec 21, 2012 at 01:28:27PM -0800, Andy Lutomirski wrote:
> The onus is currently on filesystems to call file_update_time
> somewhere in the page_mkwrite path. This is unfortunate for three
> reasons:
>
> 1. page_mkwrite on a locked page should be fast. ext4, for example,
> often sleeps while dirtying inodes. (This could be considered a
> fixable problem with ext4, but this approach makes it
> irrelevant.)
Hi Andy,
Out of curiosity, could you please share more detailed information about
how to reproduce and measure this problem in ext4?
Thanks
- Zheng
^ permalink raw reply
* [GIT PULL FOR v3.9] separate Montage ts2020 from ds3000 and rs2000, support for new TeVii cards
From: Igor M. Liplianin @ 2012-12-24 8:23 UTC (permalink / raw)
To: Mauro Carvalho Chehab, Konstantin Dimitrov, Malcolm Priestley,
linux-media
The following changes since commit 8b2aea7878f64814544d0527c659011949d52358:
[media] em28xx: prefer bulk mode on webcams (2012-12-23 17:24:30 -0200)
are available in the git repository at:
git://git.linuxtv.org/liplianin/media_tree.git ts2020_v3.9
for you to fetch changes up to 2ff52e6f487c2ee841f3df9709d1b4e4416a1b15:
ts2020: separate from m88rs2000 (2012-12-24 01:26:12 +0300)
----------------------------------------------------------------
Igor M. Liplianin (4):
Tevii S421 and S632 support
m88rs2000: SNR BER implemented
ds3000: lock led procedure added
ts2020: separate from m88rs2000
Konstantin Dimitrov (3):
ds3000: remove ts2020 tuner related code
ts2020: add ts2020 tuner driver
make the other drivers take use of the new ts2020 driver
drivers/media/dvb-frontends/Kconfig | 7 +++
drivers/media/dvb-frontends/Makefile | 1 +
drivers/media/dvb-frontends/ds3000.c | 255 +++++++++++++-------------------------------------------------------------------------
drivers/media/dvb-frontends/ds3000.h | 10 ++--
drivers/media/dvb-frontends/m88rs2000.c | 420 +++++++++++++++++++++++++++++++++++++++++----------------------------------------------------------------------------------------------------
drivers/media/dvb-frontends/m88rs2000.h | 6 ---
drivers/media/dvb-frontends/ts2020.c | 372 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
drivers/media/dvb-frontends/ts2020.h | 50 +++++++++++++++++
drivers/media/pci/cx23885/Kconfig | 1 +
drivers/media/pci/cx23885/cx23885-dvb.c | 11 +++-
drivers/media/pci/cx88/Kconfig | 2 +
drivers/media/pci/cx88/cx88-dvb.c | 11 +++-
drivers/media/pci/dm1105/Kconfig | 1 +
drivers/media/pci/dm1105/dm1105.c | 11 +++-
drivers/media/usb/dvb-usb-v2/Kconfig | 1 +
drivers/media/usb/dvb-usb-v2/lmedm04.c | 9 +++-
drivers/media/usb/dvb-usb/Kconfig | 2 +
drivers/media/usb/dvb-usb/dw2102.c | 143 ++++++++++++++++++++++++++++++++++++++++++++----
18 files changed, 772 insertions(+), 541 deletions(-)
create mode 100644 drivers/media/dvb-frontends/ts2020.c
create mode 100644 drivers/media/dvb-frontends/ts2020.h
^ permalink raw reply
* Re: [PATCH 1/2] initscripts: support read-only rootfs
From: Martin Jansa @ 2012-12-24 8:14 UTC (permalink / raw)
To: Qi.Chen; +Cc: Zhenfeng.Zhao, openembedded-core
In-Reply-To: <e574b7752e7c45d4722931309c909d524fff8461.1356335387.git.Qi.Chen@windriver.com>
[-- Attachment #1: Type: text/plain, Size: 22103 bytes --]
On Mon, Dec 24, 2012 at 03:54:53PM +0800, Qi.Chen@windriver.com wrote:
> From: Chen Qi <Qi.Chen@windriver.com>
>
> Add read-only rootfs support to sysvinit startup system.
>
> The main ideas here are:
> 1) Let populate-volatile.sh run at rootfs time to set up basic
> directories and files needed by read-only rootfs.
> 2) Use symbolic links to create the illusion that some directories/files
> are writable.
>
> Two extra config files for read-only rootfs support are created, one for
> minimal image -- volatiles-readonly-minimal, and the other for sato
> image -- volatiles-readonly-sato.
What if you build base-files/initscripts for image with read-only-rootfs
and then you build another image without read-only-rootfs?
The way you're using it, it's more like DISTRO_FEATURE then
IMAGE_FEATURE.
For this to work as IMAGE_FEATURE you would need to adjust it in
ROOTFS_POSTPROCESS_COMMAND, which is usually bad when
base-files/initscripts are later updated by package-manager (loose
read-only-rootfs changes) but that probably isn't issue here as it's
read-only.
Cheers,
>
> [YOCTO #3404]
> [YOCTO #3406]
>
> Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
> ---
> meta/recipes-core/base-files/base-files_3.0.14.bb | 8 +-
> .../initscripts/initscripts-1.0/bootmisc.sh | 9 +-
> .../initscripts-1.0/populate-volatile.sh | 285 ++++++++++----------
> .../initscripts/initscripts-1.0/volatiles | 1 +
> .../initscripts-1.0/volatiles-readonly-minimal | 23 ++
> .../initscripts-1.0/volatiles-readonly-sato | 30 +++
> meta/recipes-core/initscripts/initscripts_1.0.bb | 15 +-
> 7 files changed, 217 insertions(+), 154 deletions(-)
> create mode 100644 meta/recipes-core/initscripts/initscripts-1.0/volatiles-readonly-minimal
> create mode 100644 meta/recipes-core/initscripts/initscripts-1.0/volatiles-readonly-sato
>
> diff --git a/meta/recipes-core/base-files/base-files_3.0.14.bb b/meta/recipes-core/base-files/base-files_3.0.14.bb
> index ba355ee..c48cb8c 100644
> --- a/meta/recipes-core/base-files/base-files_3.0.14.bb
> +++ b/meta/recipes-core/base-files/base-files_3.0.14.bb
> @@ -1,7 +1,7 @@
> SUMMARY = "Miscellaneous files for the base system."
> DESCRIPTION = "The base-files package creates the basic system directory structure and provides a small set of key configuration files for the system."
> SECTION = "base"
> -PR = "r72"
> +PR = "r73"
> LICENSE = "GPLv2"
> LIC_FILES_CHKSUM = "file://licenses/GPL-2;md5=94d55d512a9ba36caa9b7df079bae19f"
> # Removed all license related tasks in this recipe as license.bbclass
> @@ -67,6 +67,12 @@ hostname = "openembedded"
>
> BASEFILESISSUEINSTALL ?= "do_install_basefilesissue"
>
> +do_install_prepend() {
> + if ${@base_contains("IMAGE_FEATURES", "read-only-rootfs", "true", "false", d)}; then
> + sed -i '/rootfs/ s/defaults/ro/' ${WORKDIR}/fstab
> + fi
> +}
> +
> do_install () {
> for d in ${dirs755}; do
> install -m 0755 -d ${D}$d
> diff --git a/meta/recipes-core/initscripts/initscripts-1.0/bootmisc.sh b/meta/recipes-core/initscripts/initscripts-1.0/bootmisc.sh
> index 4f76cb4..3b5a47f 100755
> --- a/meta/recipes-core/initscripts/initscripts-1.0/bootmisc.sh
> +++ b/meta/recipes-core/initscripts/initscripts-1.0/bootmisc.sh
> @@ -54,14 +54,7 @@ fi
>
> #
> # This is as good a place as any for a sanity check
> -# /tmp should be a symlink to /var/tmp to cut down on the number
> -# of mounted ramdisks.
> -if test ! -L /tmp && test -d /var/tmp
> -then
> - rm -rf /tmp
> - ln -sf /var/tmp /tmp
> -fi
> -
> +#
> # Set the system clock from hardware clock
> # If the timestamp is more recent than the current time,
> # use the timestamp instead.
> diff --git a/meta/recipes-core/initscripts/initscripts-1.0/populate-volatile.sh b/meta/recipes-core/initscripts/initscripts-1.0/populate-volatile.sh
> index d2175d7..9c1ce23 100755
> --- a/meta/recipes-core/initscripts/initscripts-1.0/populate-volatile.sh
> +++ b/meta/recipes-core/initscripts/initscripts-1.0/populate-volatile.sh
> @@ -8,192 +8,191 @@
> # Short-Description: Populate the volatile filesystem
> ### END INIT INFO
>
> -. /etc/default/rcS
> -
> -CFGDIR="/etc/default/volatiles"
> -TMPROOT="/var/tmp"
> +# Get ROOT_DIR
> +DIRNAME=`dirname $0`
> +ROOT_DIR=`echo $DIRNAME | sed -ne 's:etc/.*::p'`
> +
> +. ${ROOT_DIR}/etc/default/rcS
> +# Test whether rootfs is read-only or not
> +if > ${ROOT_DIR}/etc/test-read-write; then
> + ROOTFS_READ_ONLY=no
> + rm ${ROOT_DIR}/etc/test-read-write
> +else
> + ROOTFS_READ_ONLY=yes
> +fi 2>/dev/null
> +
> +# When running populat-volatile.sh at rootfs time, disable cache.
> +[ "$ROOT_DIR" != "/" ] && VOLATILE_ENABLE_CACHE=no
> +# If rootfs is read-only, disable cache.
> +[ "$ROOTFS_READ_ONLY" = "yes" ] && VOLATILE_ENABLE_CACHE=no
> +# All above statements will be moved to a central place, say var.sh which
> +# encapsulates '. /etc/default/rcS'.
> +
> +CFGDIR="${ROOT_DIR}/etc/default/volatiles"
> +TMPROOT="${ROOT_DIR}/var/volatile/tmp"
> COREDEF="00_core"
> +COREDEF_READONLY="00_core_readonly"
>
> -[ "${VERBOSE}" != "no" ] && echo "Populating volatile Filesystems."
> +[ "${VERBOSE}" != "no" ] && echo "Setting up basic files related to volatile storage under ${ROOT_DIR}."
>
> create_file() {
> - EXEC="
> - touch \"$1\";
> - chown ${TUSER}.${TGROUP} $1 || echo \"Failed to set owner -${TUSER}- for -$1-.\" >/dev/tty0 2>&1;
> - chmod ${TMODE} $1 || echo \"Failed to set mode -${TMODE}- for -$1-.\" >/dev/tty0 2>&1 "
> + EXEC="
> + touch \"$1\";
> + chown ${TUSER}.${TGROUP} $1 || echo \"Failed to set owner -${TUSER}- for -$1-.\" > /dev/null 2>&1;
> + chmod ${TMODE} $1 || echo \"Failed to set mode -${TMODE}- for -$1-.\" > /dev/null 2>&1 "
>
> test "$VOLATILE_ENABLE_CACHE" = yes && echo "$EXEC" >> /etc/volatile.cache.build
>
> [ -e "$1" ] && {
> - [ "${VERBOSE}" != "no" ] && echo "Target already exists. Skipping."
> + [ "${VERBOSE}" != "no" ] && echo "Target $1 already exists. Skipping."
> } || {
> - eval $EXEC &
> + if [ "$ROOT_DIR" = "/" ]; then
> + eval $EXEC
> + else
> + # Some operations at rootfs time may fail and should fail,
> + # but these failures should not be logged.
> + eval $EXEC > /dev/null 2>&1
> + fi
> }
> }
>
> mk_dir() {
> EXEC="
> mkdir -p \"$1\";
> - chown ${TUSER}.${TGROUP} $1 || echo \"Failed to set owner -${TUSER}- for -$1-.\" >/dev/tty0 2>&1;
> - chmod ${TMODE} $1 || echo \"Failed to set mode -${TMODE}- for -$1-.\" >/dev/tty0 2>&1 "
> + chown ${TUSER}.${TGROUP} $1 || echo \"Failed to set owner -${TUSER}- for -$1-.\" 2>&1;
> + chmod ${TMODE} $1 || echo \"Failed to set mode -${TMODE}- for -$1-.\" 2>&1 "
>
> test "$VOLATILE_ENABLE_CACHE" = yes && echo "$EXEC" >> /etc/volatile.cache.build
>
> [ -e "$1" ] && {
> - [ "${VERBOSE}" != "no" ] && echo "Target already exists. Skipping."
> + [ "${VERBOSE}" != "no" ] && echo "Target ${1} already exists. Skipping."
> } || {
> - eval $EXEC
> + if [ "$ROOT_DIR" = "/" ]; then
> + eval $EXEC
> + else
> + # Some operations at rootfs time may fail and should fail,
> + # but these failures should not be logged.
> + eval $EXEC > /dev/null 2>&1
> + fi
> }
> }
>
> link_file() {
> - EXEC="test -e \"$2\" -o -L $2 || ln -s \"$1\" \"$2\" >/dev/tty0 2>&1"
> -
> - test "$VOLATILE_ENABLE_CACHE" = yes && echo " $EXEC" >> /etc/volatile.cache.build
> -
> - [ -e "$2" ] && {
> - echo "Cannot create link over existing -${TNAME}-." >&2
> - } || {
> - eval $EXEC &
> - }
> + EXEC="
> + if [ -L \"$2\" ]; then
> + [ \"$(readlink -f \"$2\")\" != \"$(readlink -f \"$1\")\" ] && { rm -f \"$2\"; ln -sf \"$1\" \"$2\"; };
> + elif [ -d \"$2\" ]; then
> + rm -rf \"$2\";
> + ln -sf \"$1\" \"$2\";
> + else
> + ln -sf \"$1\" \"$2\";
> + fi
> + "
> + test "$VOLATILE_ENABLE_CACHE" = yes && echo " $EXEC" >> /etc/volatile.cache.build
> + if [ "$ROOT_DIR" = "/" ]; then
> + eval $EXEC
> + else
> + # Some operations at rootfs time may fail and should fail,
> + # but these failures should not be logged
> + eval $EXEC > /dev/null 2>&1
> + fi
> }
>
> check_requirements() {
> + cleanup() {
> + rm "${TMP_INTERMED}"
> + rm "${TMP_DEFINED}"
> + rm "${TMP_COMBINED}"
> + }
> +
> + CFGFILE="$1"
> + [ `basename "${CFGFILE}"` = "${COREDEF}" ] && return 0
> + [ `basename "${CFGFILE}"` = "${COREDEF_READONLY}" ] && return 0
> + TMP_INTERMED="${TMPROOT}/tmp.$$"
> + TMP_DEFINED="${TMPROOT}/tmpdefined.$$"
> + TMP_COMBINED="${TMPROOT}/tmpcombined.$$"
> +
> + cat ${ROOT_DIR}/etc/passwd | sed 's@\(^:\)*:.*@\1@' | sort | uniq > "${TMP_DEFINED}"
> + cat ${CFGFILE} | grep -v "^#" | cut -d " " -f 2 > "${TMP_INTERMED}"
> + cat "${TMP_DEFINED}" "${TMP_INTERMED}" | sort | uniq > "${TMP_COMBINED}"
> + NR_DEFINED_USERS="`cat "${TMP_DEFINED}" | wc -l`"
> + NR_COMBINED_USERS="`cat "${TMP_COMBINED}" | wc -l`"
> +
> + [ "${NR_DEFINED_USERS}" -ne "${NR_COMBINED_USERS}" ] && {
> + echo "Undefined users:"
> + diff "${TMP_DEFINED}" "${TMP_COMBINED}" | grep "^>"
> + cleanup
> + return 1
> + }
>
> - cleanup() {
> - rm "${TMP_INTERMED}"
> - rm "${TMP_DEFINED}"
> - rm "${TMP_COMBINED}"
> - }
> -
> - CFGFILE="$1"
> -
> - [ `basename "${CFGFILE}"` = "${COREDEF}" ] && return 0
> -
> - TMP_INTERMED="${TMPROOT}/tmp.$$"
> - TMP_DEFINED="${TMPROOT}/tmpdefined.$$"
> - TMP_COMBINED="${TMPROOT}/tmpcombined.$$"
> -
> -
> - cat /etc/passwd | sed 's@\(^:\)*:.*@\1@' | sort | uniq > "${TMP_DEFINED}"
> - cat ${CFGFILE} | grep -v "^#" | cut -d " " -f 2 > "${TMP_INTERMED}"
> - cat "${TMP_DEFINED}" "${TMP_INTERMED}" | sort | uniq > "${TMP_COMBINED}"
> -
> - NR_DEFINED_USERS="`cat "${TMP_DEFINED}" | wc -l`"
> - NR_COMBINED_USERS="`cat "${TMP_COMBINED}" | wc -l`"
> -
> - [ "${NR_DEFINED_USERS}" -ne "${NR_COMBINED_USERS}" ] && {
> - echo "Undefined users:"
> - diff "${TMP_DEFINED}" "${TMP_COMBINED}" | grep "^>"
> - cleanup
> - return 1
> - }
> -
> -
> - cat /etc/group | sed 's@\(^:\)*:.*@\1@' | sort | uniq > "${TMP_DEFINED}"
> - cat ${CFGFILE} | grep -v "^#" | cut -d " " -f 3 > "${TMP_INTERMED}"
> - cat "${TMP_DEFINED}" "${TMP_INTERMED}" | sort | uniq > "${TMP_COMBINED}"
>
> - NR_DEFINED_GROUPS="`cat "${TMP_DEFINED}" | wc -l`"
> - NR_COMBINED_GROUPS="`cat "${TMP_COMBINED}" | wc -l`"
> + cat ${ROOT_DIR}/etc/group | sed 's@\(^:\)*:.*@\1@' | sort | uniq > "${TMP_DEFINED}"
> + cat ${CFGFILE} | grep -v "^#" | cut -d " " -f 3 > "${TMP_INTERMED}"
> + cat "${TMP_DEFINED}" "${TMP_INTERMED}" | sort | uniq > "${TMP_COMBINED}"
>
> - [ "${NR_DEFINED_GROUPS}" -ne "${NR_COMBINED_GROUPS}" ] && {
> - echo "Undefined groups:"
> - diff "${TMP_DEFINED}" "${TMP_COMBINED}" | grep "^>"
> - cleanup
> - return 1
> - }
> + NR_DEFINED_GROUPS="`cat "${TMP_DEFINED}" | wc -l`"
> + NR_COMBINED_GROUPS="`cat "${TMP_COMBINED}" | wc -l`"
>
> - # Add checks for required directories here
> + [ "${NR_DEFINED_GROUPS}" -ne "${NR_COMBINED_GROUPS}" ] && {
> + echo "Undefined groups:"
> + diff "${TMP_DEFINED}" "${TMP_COMBINED}" | grep "^>"
> + cleanup
> + return 1
> + }
>
> - cleanup
> - return 0
> - }
> + cleanup
> + return 0
> +}
>
> apply_cfgfile() {
> + CFGFILE="$1"
> + [ ${VERBOSE} != "no" ] && echo "Applying config file: $CFGFILE"
> +
> + check_requirements "${CFGFILE}" || {
> + echo "Skipping ${CFGFILE}"
> + return 1
> + }
> +
> + cat ${CFGFILE} | grep -v "^#" | sed -e '/^$/ d' | \
> + while read LINE; do
> + eval `echo "$LINE" | sed -n "s/\(.*\)\ \(.*\) \(.*\)\ \(.*\)\ \(.*\)\ \(.*\)/TTYPE=\1 ; TUSER=\2; TGROUP=\3; TMODE=\4; TNAME=\5 TLTARGET=\6/p"`
> + TNAME=${ROOT_DIR}/${TNAME}
> + [ "${VERBOSE}" != "no" ] && echo "Checking for -${TNAME}-."
> +
> + [ "${TTYPE}" = "l" ] && {
> + TSOURCE="$TLTARGET"
> + [ "${VERBOSE}" != "no" ] && echo "Creating link -${TNAME}- pointing to -${TSOURCE}-."
> + link_file "${TSOURCE}" "${TNAME}"
> + continue
> + }
> + case "${TTYPE}" in
> + "f") [ "${VERBOSE}" != "no" ] && echo "Creating file -${TNAME}-."
> + create_file "${TNAME}"
> + ;;
> + "d") [ "${VERBOSE}" != "no" ] && echo "Creating directory -${TNAME}-."
> + mk_dir "${TNAME}"
> + ;;
> + *) [ "${VERBOSE}" != "no" ] && echo "Invalid type -${TTYPE}-."
> + continue
> + ;;
> + esac
> + done
> + return 0
> +}
>
> - CFGFILE="$1"
> -
> - check_requirements "${CFGFILE}" || {
> - echo "Skipping ${CFGFILE}"
> - return 1
> - }
> -
> - cat ${CFGFILE} | grep -v "^#" | \
> - while read LINE; do
> -
> - eval `echo "$LINE" | sed -n "s/\(.*\)\ \(.*\) \(.*\)\ \(.*\)\ \(.*\)\ \(.*\)/TTYPE=\1 ; TUSER=\2; TGROUP=\3; TMODE=\4; TNAME=\5 TLTARGET=\6/p"`
> -
> - [ "${VERBOSE}" != "no" ] && echo "Checking for -${TNAME}-."
> -
> -
> - [ "${TTYPE}" = "l" ] && {
> - TSOURCE="$TLTARGET"
> - [ -L "${TNAME}" ] || {
> - [ "${VERBOSE}" != "no" ] && echo "Creating link -${TNAME}- pointing to -${TSOURCE}-."
> - link_file "${TSOURCE}" "${TNAME}" &
> - }
> - continue
> - }
> -
> - [ -L "${TNAME}" ] && {
> - [ "${VERBOSE}" != "no" ] && echo "Found link."
> - NEWNAME=`ls -l "${TNAME}" | sed -e 's/^.*-> \(.*\)$/\1/'`
> - echo ${NEWNAME} | grep -v "^/" >/dev/null && {
> - TNAME="`echo ${TNAME} | sed -e 's@\(.*\)/.*@\1@'`/${NEWNAME}"
> - [ "${VERBOSE}" != "no" ] && echo "Converted relative linktarget to absolute path -${TNAME}-."
> - } || {
> - TNAME="${NEWNAME}"
> - [ "${VERBOSE}" != "no" ] && echo "Using absolute link target -${TNAME}-."
> - }
> - }
> -
> - case "${TTYPE}" in
> - "f") [ "${VERBOSE}" != "no" ] && echo "Creating file -${TNAME}-."
> - create_file "${TNAME}" &
> - ;;
> - "d") [ "${VERBOSE}" != "no" ] && echo "Creating directory -${TNAME}-."
> - mk_dir "${TNAME}"
> - # Add check to see if there's an entry in fstab to mount.
> - ;;
> - *) [ "${VERBOSE}" != "no" ] && echo "Invalid type -${TTYPE}-."
> - continue
> - ;;
> - esac
> -
> -
> - done
> -
> - return 0
> -
> - }
> -
> -clearcache=0
> -exec 9</proc/cmdline
> -while read line <&9
> -do
> - case "$line" in
> - *clearcache*) clearcache=1
> - ;;
> - *) continue
> - ;;
> - esac
> -done
> -exec 9>&-
> -
> -if test -e /etc/volatile.cache -a "$VOLATILE_ENABLE_CACHE" = "yes" -a "x$1" != "xupdate" -a "x$clearcache" = "x0"
> +if test -e ${ROOT_DIR}/etc/volatile.cache -a $VOLATILE_ENABLE_CACHE = yes -a x$1 != xupdate
> then
> - sh /etc/volatile.cache
> + sh ${ROOT_DIR}/etc/volatile.cache
> else
> - rm -f /etc/volatile.cache /etc/volatile.cache.build
> + rm -f ${ROOT_DRI}/etc/volatile.cache ${ROOT_DIR}/etc/volatile.cache.build
> for file in `ls -1 "${CFGDIR}" | sort`; do
> apply_cfgfile "${CFGDIR}/${file}"
> done
>
> - [ -e /etc/volatile.cache.build ] && sync && mv /etc/volatile.cache.build /etc/volatile.cache
> + [ -e ${ROOT_DIR}/etc/volatile.cache.build ] && sync && mv ${ROOT_DIR}/etc/volatile.cache.build ${ROOT_DIR}/etc/volatile.cache
> fi
>
> -if test -f /etc/ld.so.cache -a ! -f /var/run/ld.so.cache
> +if [ "${ROOT_DIR}" = "/" ] && [ -f /etc/ld.so.cache ] && [ ! -f /var/run/ld.so.cache ]
> then
> ln -s /etc/ld.so.cache /var/run/ld.so.cache
> fi
> diff --git a/meta/recipes-core/initscripts/initscripts-1.0/volatiles b/meta/recipes-core/initscripts/initscripts-1.0/volatiles
> index e0741aa..f7e2ef7 100644
> --- a/meta/recipes-core/initscripts/initscripts-1.0/volatiles
> +++ b/meta/recipes-core/initscripts/initscripts-1.0/volatiles
> @@ -31,6 +31,7 @@ l root root 1777 /var/lock /var/volatile/lock
> l root root 0755 /var/log /var/volatile/log
> l root root 0755 /var/run /var/volatile/run
> l root root 1777 /var/tmp /var/volatile/tmp
> +l root root 1777 /tmp /var/tmp
> d root root 0755 /var/lock/subsys none
> f root root 0664 /var/log/wtmp none
> f root root 0664 /var/run/utmp none
> diff --git a/meta/recipes-core/initscripts/initscripts-1.0/volatiles-readonly-minimal b/meta/recipes-core/initscripts/initscripts-1.0/volatiles-readonly-minimal
> new file mode 100644
> index 0000000..6169ecc
> --- /dev/null
> +++ b/meta/recipes-core/initscripts/initscripts-1.0/volatiles-readonly-minimal
> @@ -0,0 +1,23 @@
> +# This configuration file lists filesystem objects specific to readonly rootfs
> +# that should get verified during startup and be created if missing.
> +#
> +# Every line must either be a comment starting with #
> +# or a definition of format:
> +# <type> <owner> <group> <mode> <path> <linksource>
> +# where the items are separated by whitespace !
> +#
> +# <type> : d|f|l : (d)irectory|(f)ile|(l)ink
> +#
> +# A linking example:
> +# l root root 0777 /var/test /tmp/testfile
> +# f root root 0644 /var/test none
> +#
> +# Understanding links:
> +# When populate-volatile is to verify/create a directory or file, it will first
> +# check its existence. If a link is found to exist in the place of the target,
> +# the path of the target is replaced with the target the link points to.
> +# Thus, if a link is in the place to be verified, the object will be created
> +# in the place the link points to instead.
> +# This explains the order of "link before object" as in the example above, where
> +# a link will be created at /var/test pointing to /tmp/testfile and due to this
> +# link the file defined as /var/test will actually be created as /tmp/testfile.
> diff --git a/meta/recipes-core/initscripts/initscripts-1.0/volatiles-readonly-sato b/meta/recipes-core/initscripts/initscripts-1.0/volatiles-readonly-sato
> new file mode 100644
> index 0000000..e128869
> --- /dev/null
> +++ b/meta/recipes-core/initscripts/initscripts-1.0/volatiles-readonly-sato
> @@ -0,0 +1,30 @@
> +# This configuration file lists filesystem objects specific to readonly rootfs
> +# that should get verified during startup and be created if missing.
> +#
> +# Every line must either be a comment starting with #
> +# or a definition of format:
> +# <type> <owner> <group> <mode> <path> <linksource>
> +# where the items are separated by whitespace !
> +#
> +# <type> : d|f|l : (d)irectory|(f)ile|(l)ink
> +#
> +# A linking example:
> +# l root root 0777 /var/test /tmp/testfile
> +# f root root 0644 /var/test none
> +#
> +# Understanding links:
> +# When populate-volatile is to verify/create a directory or file, it will first
> +# check it's existence. If a link is found to exist in the place of the target,
> +# the path of the target is replaced with the target the link points to.
> +# Thus, if a link is in the place to be verified, the object will be created
> +# in the place the link points to instead.
> +# This explains the order of "link before object" as in the example above, where
> +# a link will be created at /var/test pointing to /tmp/testfile and due to this
> +# link the file defined as /var/test will actually be created as /tmp/testfile.
> +d root root 0755 /var/volatile/lib/ none
> +d root root 0755 /var/volatile/lib/dropbear/ none
> +d root root 0755 /var/volatile/lib/nfs/ none
> +d root root 1777 /var/volatile/lib/dbus/ none
> +l root root 0755 /var/lib/dropbear /var/volatile/lib/dropbear
> +l root root 0755 /var/lib/nfs /var/volatile/lib/nfs
> +l root root 0755 /var/lib/dbus /var/volatile/lib/dbus
> diff --git a/meta/recipes-core/initscripts/initscripts_1.0.bb b/meta/recipes-core/initscripts/initscripts_1.0.bb
> index 39be9a8..d0869ea 100644
> --- a/meta/recipes-core/initscripts/initscripts_1.0.bb
> +++ b/meta/recipes-core/initscripts/initscripts_1.0.bb
> @@ -3,7 +3,7 @@ DESCRIPTION = "Initscripts provide the basic system startup initialization scrip
> SECTION = "base"
> LICENSE = "GPLv2"
> LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe"
> -PR = "r138"
> +PR = "r139"
>
> INHIBIT_DEFAULT_DEPS = "1"
>
> @@ -30,8 +30,10 @@ SRC_URI = "file://functions \
> file://device_table.txt \
> file://populate-volatile.sh \
> file://volatiles \
> + file://volatiles-readonly-minimal \
> + file://volatiles-readonly-sato \
> file://save-rtc.sh \
> - file://GPLv2.patch"
> + file://GPLv2.patch"
>
> SRC_URI_append_arm = " file://alignment.sh"
>
> @@ -86,6 +88,15 @@ do_install () {
> install -m 0755 ${WORKDIR}/populate-volatile.sh ${D}${sysconfdir}/init.d
> install -m 0755 ${WORKDIR}/save-rtc.sh ${D}${sysconfdir}/init.d
> install -m 0644 ${WORKDIR}/volatiles ${D}${sysconfdir}/default/volatiles/00_core
> + # Install read-only rootfs specific config files in case of an read-only-rootfs image
> + if ${@base_contains("IMAGE_FEATURES", "read-only-rootfs", "true", "false" ,d)}; then
> + if ${@base_contains("IMAGE_FEATURES", "x11-sato", "true", "false" ,d)}; then
> + install -m 0644 ${WORKDIR}/volatiles-readonly-sato ${D}${sysconfdir}/default/volatiles/00_core_readonly
> + else
> + install -m 0644 ${WORKDIR}/volatiles-readonly-minimal ${D}${sysconfdir}/default/volatiles/00_core_readonly
> + fi
> + fi
> +
> if [ "${TARGET_ARCH}" = "arm" ]; then
> install -m 0755 ${WORKDIR}/alignment.sh ${D}${sysconfdir}/init.d
> fi
> --
> 1.7.9.5
>
>
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
--
Martin 'JaMa' Jansa jabber: Martin.Jansa@gmail.com
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 205 bytes --]
^ permalink raw reply
* [PATCH v3 2/7] usb: chipidea: add otg file
From: Peter Chen @ 2012-12-24 8:33 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <87mwy0ms6h.fsf@ashishki-desk.ger.corp.intel.com>
On Thu, Nov 29, 2012 at 03:53:26PM +0200, Alexander Shishkin wrote:
> Peter Chen <peter.chen@freescale.com> writes:
>
> > diff --git a/drivers/usb/chipidea/ci.h b/drivers/usb/chipidea/ci.h
> > index d738603..8702871 100644
> > --- a/drivers/usb/chipidea/ci.h
> > +++ b/drivers/usb/chipidea/ci.h
> > @@ -129,6 +129,7 @@ struct hw_bank {
> > * @vbus_active: is VBUS active
> > * @transceiver: pointer to USB PHY, if any
> > * @hcd: pointer to usb_hcd for ehci host driver
> > + * @otg: for otg support
> > */
> > struct ci13xxx {
> > struct device *dev;
> > @@ -164,6 +165,7 @@ struct ci13xxx {
> > bool global_phy;
> > struct usb_phy *transceiver;
> > struct usb_hcd *hcd;
> > + struct usb_otg otg;
>
> Can you indent the "otg" so that it's aligned with the rest?
will change
>
> > };
> >
> > static inline struct ci_role_driver *ci_role(struct ci13xxx *ci)
> > diff --git a/drivers/usb/chipidea/otg.c b/drivers/usb/chipidea/otg.c
> > new file mode 100644
> > index 0000000..7dea3b3
> > --- /dev/null
> > +++ b/drivers/usb/chipidea/otg.c
> > @@ -0,0 +1,60 @@
> > +/*
> > + * otg.c - ChipIdea USB IP core OTG driver
> > + *
> > + * Copyright (C) 2012 Freescale Semiconductor, Inc.
> > + *
> > + * Author: Peter Chen
> > + *
> > + * This program is free software; you can redistribute it and/or modify
> > + * it under the terms of the GNU General Public License version 2 as
> > + * published by the Free Software Foundation.
> > + */
> > +
> > +#include <linux/platform_device.h>
> > +#include <linux/module.h>
> > +#include <linux/io.h>
> > +#include <linux/irq.h>
> > +#include <linux/kernel.h>
> > +#include <linux/slab.h>
>
> Most of these look unnecessary.
>
> > +#include <linux/usb/gadget.h>
> > +#include <linux/usb/otg.h>
> > +#include <linux/usb/chipidea.h>
> > +
> > +#include "ci.h"
> > +#include "udc.h"
> > +#include "bits.h"
> > +#include "host.h"
> > +#include "debug.h"
>
> And these.
will change
>
> > +
> > +static int ci_otg_set_peripheral(struct usb_otg *otg,
> > + struct usb_gadget *periph)
> > +{
> > + otg->gadget = periph;
> > +
> > + return 0;
> > +}
> > +
> > +static int ci_otg_set_host(struct usb_otg *otg, struct usb_bus *host)
> > +{
> > + otg->host = host;
> > +
> > + return 0;
> > +}
> > +
> > +/**
> > + * ci_hdrc_otg_init - initialize device related bits
> > + * ci: the controller
> > + *
> > + * This function create otg struct, if the device can switch between
> > + * device and host.
> > + */
> > +int ci_hdrc_otg_init(struct ci13xxx *ci)
> > +{
> > + /* Useless at current */
> > + ci->otg.set_peripheral = ci_otg_set_peripheral;
> > + ci->otg.set_host = ci_otg_set_host;
> > + if (!IS_ERR_OR_NULL(ci->transceiver))
> > + ci->transceiver->otg = &ci->otg;
> > +
> > + return 0;
> > +}
> > diff --git a/drivers/usb/chipidea/otg.h b/drivers/usb/chipidea/otg.h
> > new file mode 100644
> > index 0000000..b4c6b3e
> > --- /dev/null
> > +++ b/drivers/usb/chipidea/otg.h
> > @@ -0,0 +1,6 @@
> > +#ifndef __DRIVERS_USB_CHIPIDEA_OTG_H
> > +#define __DRIVERS_USB_CHIPIDEA_OTG_H
> > +
> > +int ci_hdrc_otg_init(struct ci13xxx *ci);
>
> Can you put it to ci.h instead?
I think we may have more complicated operation for otg, so keep one
otg header is accepted, like host.h, udc.h.
>
> Thanks,
> --
> Alex
>
--
Best Regards,
Peter Chen
^ permalink raw reply
* [Bug 50121] [Regression] NV34 Fx5200 & NVC3/Quadro 2000M both fail to resume with commit 'convert to exec engine, and improve channel sync'
From: bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ @ 2012-12-24 8:36 UTC (permalink / raw)
To: nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW
In-Reply-To: <bug-50121-8800-V0hAGp6uBxMKqLRl/0Ahz6D7qz1kEfGD2LY78lusg7I@public.gmane.org/>
[-- Attachment #1.1: Type: text/plain, Size: 1187 bytes --]
https://bugs.freedesktop.org/show_bug.cgi?id=50121
--- Comment #27 from Ronald <ronald645-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> ---
Just tested v3.8-rc1 + nouveau @ 'drm/nouveau/fan: handle the cases where we
are outside of the linear zone' on this FX5200.
Especially 'drm/nouveau/bios: cache ramcfg strap on later chipsets' looked
promising (even though I don't have a recent chipset... there was hope...).
Things did not regress further. First suspend works most of the time, second
suspend crashes. Symptoms did change a bit. When resume eventually completes, I
do not see a frozen/unresponsive desktop but the screen goes black with
red/green (I don't think i saw any blue) pixels scattered all over it. Density
was really low, so maybe 200 pixels on the entire screen? These pixels did not
move or alterate or anything, it was pretty static and boring actually.
But I recommend Michael and francoism to test latest HEAD as the mentioned
commit might fix your issue's???
I will add a dmesg from v3.8rc1 kernel for your viewing convenience. This is a
dmesg from syslog, not from the 'dmesg' command!
--
You are receiving this mail because:
You are the assignee for the bug.
[-- Attachment #1.2: Type: text/html, Size: 2093 bytes --]
[-- Attachment #2: Type: text/plain, Size: 181 bytes --]
_______________________________________________
Nouveau mailing list
Nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org
http://lists.freedesktop.org/mailman/listinfo/nouveau
^ permalink raw reply
* Re: [PATCH v2 2/3] mm: Update file times when inodes are written after mmaped writes
From: Zheng Liu @ 2012-12-24 8:36 UTC (permalink / raw)
To: Andy Lutomirski
Cc: linux-kernel, linux-mm, Linux FS Devel, Dave Chinner, Jan Kara,
Al Viro
In-Reply-To: <6b22b806806b21af02b70a2fa860a9d10304fc16.1356124965.git.luto@amacapital.net>
On Fri, Dec 21, 2012 at 01:28:27PM -0800, Andy Lutomirski wrote:
> The onus is currently on filesystems to call file_update_time
> somewhere in the page_mkwrite path. This is unfortunate for three
> reasons:
>
> 1. page_mkwrite on a locked page should be fast. ext4, for example,
> often sleeps while dirtying inodes. (This could be considered a
> fixable problem with ext4, but this approach makes it
> irrelevant.)
Hi Andy,
Out of curiosity, could you please share more detailed information about
how to reproduce and measure this problem in ext4?
Thanks
- Zheng
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
^ permalink raw reply
* [Bug 50121] [Regression] NV34 Fx5200 & NVC3/Quadro 2000M both fail to resume with commit 'convert to exec engine, and improve channel sync'
From: bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ @ 2012-12-24 8:37 UTC (permalink / raw)
To: nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW
In-Reply-To: <bug-50121-8800-V0hAGp6uBxMKqLRl/0Ahz6D7qz1kEfGD2LY78lusg7I@public.gmane.org/>
[-- Attachment #1.1: Type: text/plain, Size: 1047 bytes --]
https://bugs.freedesktop.org/show_bug.cgi?id=50121
Ronald <ronald645-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #69606|0 |1
is obsolete| |
Attachment #69607|0 |1
is obsolete| |
Attachment #69608|0 |1
is obsolete| |
Attachment #69609|0 |1
is obsolete| |
Attachment #69612|0 |1
is obsolete| |
--- Comment #28 from Ronald <ronald645-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> ---
Created attachment 72060
--> https://bugs.freedesktop.org/attachment.cgi?id=72060&action=edit
Dmesg of v3.8rc1 + nouveau HEAD
--
You are receiving this mail because:
You are the assignee for the bug.
[-- Attachment #1.2: Type: text/html, Size: 3032 bytes --]
[-- Attachment #2: Type: text/plain, Size: 181 bytes --]
_______________________________________________
Nouveau mailing list
Nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org
http://lists.freedesktop.org/mailman/listinfo/nouveau
^ permalink raw reply
* [PATCH 08/20] gthumb: finalize removal
From: Constantin Musca @ 2012-12-24 8:38 UTC (permalink / raw)
To: poky; +Cc: Constantin Musca
Part of the sato trimming process
Signed-off-by: Constantin Musca <constantinx.musca@intel.com>
---
meta-yocto/conf/distro/include/maintainers.inc | 1 -
meta-yocto/conf/distro/include/recipe_color.inc | 1 -
meta-yocto/conf/distro/include/upstream_tracking.inc | 3 ---
3 files changed, 5 deletions(-)
diff --git a/meta-yocto/conf/distro/include/maintainers.inc b/meta-yocto/conf/distro/include/maintainers.inc
index b0246b7..efb5a39 100644
--- a/meta-yocto/conf/distro/include/maintainers.inc
+++ b/meta-yocto/conf/distro/include/maintainers.inc
@@ -251,7 +251,6 @@ RECIPE_MAINTAINER_pn-gst-plugins-base = "Cristian Iorga <cristian.iorga@intel.co
RECIPE_MAINTAINER_pn-gst-plugins-good = "Cristian Iorga <cristian.iorga@intel.com>"
RECIPE_MAINTAINER_pn-gst-plugins-ugly = "Cristian Iorga <cristian.iorga@intel.com>"
RECIPE_MAINTAINER_pn-gstreamer = "Cristian Iorga <cristian.iorga@intel.com>"
-RECIPE_MAINTAINER_pn-gthumb = "Constantin Musca <constantinx.musca@intel.com>"
RECIPE_MAINTAINER_pn-gtk-doc-stub-native = "Saul Wold <sgw@linux.intel.com>"
RECIPE_MAINTAINER_pn-gtk-doc-stub = "Saul Wold <sgw@linux.intel.com>"
RECIPE_MAINTAINER_pn-gtk-doc = "Constantin Musca <constantinx.musca@intel.com>"
diff --git a/meta-yocto/conf/distro/include/recipe_color.inc b/meta-yocto/conf/distro/include/recipe_color.inc
index 894c76a..a8aba62 100644
--- a/meta-yocto/conf/distro/include/recipe_color.inc
+++ b/meta-yocto/conf/distro/include/recipe_color.inc
@@ -115,7 +115,6 @@ RECIPE_COLOR_pn-gperf = "yellow"
RECIPE_COLOR_pn-gpgme = "yellow"
RECIPE_COLOR_pn-grep = "yellow"
RECIPE_COLOR_pn-groff = "red"
-RECIPE_COLOR_pn-gthumb = "red"
RECIPE_COLOR_pn-gtk+ = "yellow"
RECIPE_COLOR_pn-gtk-doc = "red"
RECIPE_COLOR_pn-gtkhtml2 = "red"
diff --git a/meta-yocto/conf/distro/include/upstream_tracking.inc b/meta-yocto/conf/distro/include/upstream_tracking.inc
index 1b3ddad..7cff274 100644
--- a/meta-yocto/conf/distro/include/upstream_tracking.inc
+++ b/meta-yocto/conf/distro/include/upstream_tracking.inc
@@ -389,9 +389,6 @@ RECIPE_UPSTREAM_VERSION_pn-gst-plugins-ugly = "0.11.90"
RECIPE_UPSTREAM_VERSION_pn-gstreamer="0.11.90"
RECIPE_UPSTREAM_DATE_pn-gstreamer="Jan 31, 2011"
RECIPE_NO_UPDATE_REASON_pn-gstreamer=" not compatible with gst-fluendo 0.10.x "
-RECIPE_UPSTREAM_VERSION_pn-gthumb = "3.0.2"
-RECIPE_UPSTREAM_DATE_pn-gthumb = "Aug 20, 2012"
-CHECK_DATE_pn-gthumb = "Aug 29, 2012"
RECIPE_UPSTREAM_DATE_pn-gtk-sato-engine = "Feb 01, 2008"
RECIPE_UPSTREAM_VERSION_pn-gtk+ = "2.24.8"
RECIPE_NO_UPDATE_REASON_pn-gtk+ = "Do not upgrade to version: 2.99.2 because prefer stable tree"
--
1.7.11.7
^ permalink raw reply related
* [lm-sensors] RFC: Intel QST driver
From: Simon J. Rowe @ 2012-12-24 8:37 UTC (permalink / raw)
To: lm-sensors
I've written a driver for the Intel Quiet System Technology (QST)
function of the Management Engine Interface found on recent Intel
chipsets.
The git repo can be found here:
http://mose.dyndns.org/mei.git
A few questions / observations,
1) The code was developed and tested on 2.6.39. I would hope it
compiles and runs on 3.x but I haven't tried it.
2) The main hwmon code is in qst-hwmon.c. This implements QST v1, I
don't have access to hardware that supports v2. I would imagine that
implementing v2 would result in a new module (qst2-hwmon) which would
be almost identical.
3) I've gone a bit overboard with preprocessor macros but it does mean
that the amount of duplicated code is kept to a minimum.
3) I've not implemented any PWM methods yet.
4) I don't believe the MEI (HECI) implementation that Intel have
already submitted to the mainline kernel is usable by other kernel
modules. I have re-implemented it in a way that is accessible to
either the kernel or userspace.
5) I had to patch libsensors to work with a new bus type
diff -ur lm_sensors-3.3.1.org//lib/sysfs.c lm_sensors-3.3.1/lib/sysfs.c
--- lm_sensors-3.3.1.org//lib/sysfs.c 2011-03-04 20:37:43.000000000 +0000
+++ lm_sensors-3.3.1/lib/sysfs.c 2012-11-14 21:48:52.144860375 +0000
@@ -701,6 +701,12 @@
/* As of kernel 2.6.32, the hid device names don't look
good */
entry.chip.bus.nr = bus;
entry.chip.addr = id;
+ } else
+ if (subsys && !strcmp(subsys, "intel-mei") &&
+ sscanf(dev_name, "mei%d:%d", &bus, &fn) = 2) {
+ entry.chip.bus.type = SENSORS_BUS_TYPE_PCI;
+ entry.chip.bus.nr = bus;
+ entry.chip.addr = fn;
} else {
/* Ignore unknown device */
err = 0;
surely this sort of knowledge belongs in the driver not userspace?
Could drivers not provide another set of sysfs attributes which expose
bus type, number, addr etc?
Please let me know if there's any changes or improvements I can make
to it.
Simon
_______________________________________________
lm-sensors mailing list
lm-sensors@lm-sensors.org
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
^ permalink raw reply
* Re: [PATCH 1/2] initscripts: support read-only rootfs
From: ChenQi @ 2012-12-24 8:24 UTC (permalink / raw)
To: Martin Jansa; +Cc: Zhenfeng.Zhao, openembedded-core
In-Reply-To: <20121224081416.GR8988@jama.palm1.palmone.com>
On 12/24/2012 04:14 PM, Martin Jansa wrote:
> On Mon, Dec 24, 2012 at 03:54:53PM +0800, Qi.Chen@windriver.com wrote:
>> From: Chen Qi<Qi.Chen@windriver.com>
>>
>> Add read-only rootfs support to sysvinit startup system.
>>
>> The main ideas here are:
>> 1) Let populate-volatile.sh run at rootfs time to set up basic
>> directories and files needed by read-only rootfs.
>> 2) Use symbolic links to create the illusion that some directories/files
>> are writable.
>>
>> Two extra config files for read-only rootfs support are created, one for
>> minimal image -- volatiles-readonly-minimal, and the other for sato
>> image -- volatiles-readonly-sato.
> What if you build base-files/initscripts for image with read-only-rootfs
> and then you build another image without read-only-rootfs?
>
> The way you're using it, it's more like DISTRO_FEATURE then
> IMAGE_FEATURE.
>
> For this to work as IMAGE_FEATURE you would need to adjust it in
> ROOTFS_POSTPROCESS_COMMAND, which is usually bad when
> base-files/initscripts are later updated by package-manager (loose
> read-only-rootfs changes) but that probably isn't issue here as it's
> read-only.
>
> Cheers,
>
Thanks a lot for your prompt reply :)
I'll rework on this patch and send out a V2.
Thanks,
Chen Qi
>> [YOCTO #3404]
>> [YOCTO #3406]
>>
>> Signed-off-by: Chen Qi<Qi.Chen@windriver.com>
>> ---
>> meta/recipes-core/base-files/base-files_3.0.14.bb | 8 +-
>> .../initscripts/initscripts-1.0/bootmisc.sh | 9 +-
>> .../initscripts-1.0/populate-volatile.sh | 285 ++++++++++----------
>> .../initscripts/initscripts-1.0/volatiles | 1 +
>> .../initscripts-1.0/volatiles-readonly-minimal | 23 ++
>> .../initscripts-1.0/volatiles-readonly-sato | 30 +++
>> meta/recipes-core/initscripts/initscripts_1.0.bb | 15 +-
>> 7 files changed, 217 insertions(+), 154 deletions(-)
>> create mode 100644 meta/recipes-core/initscripts/initscripts-1.0/volatiles-readonly-minimal
>> create mode 100644 meta/recipes-core/initscripts/initscripts-1.0/volatiles-readonly-sato
>>
>> diff --git a/meta/recipes-core/base-files/base-files_3.0.14.bb b/meta/recipes-core/base-files/base-files_3.0.14.bb
>> index ba355ee..c48cb8c 100644
>> --- a/meta/recipes-core/base-files/base-files_3.0.14.bb
>> +++ b/meta/recipes-core/base-files/base-files_3.0.14.bb
>> @@ -1,7 +1,7 @@
>> SUMMARY = "Miscellaneous files for the base system."
>> DESCRIPTION = "The base-files package creates the basic system directory structure and provides a small set of key configuration files for the system."
>> SECTION = "base"
>> -PR = "r72"
>> +PR = "r73"
>> LICENSE = "GPLv2"
>> LIC_FILES_CHKSUM = "file://licenses/GPL-2;md5=94d55d512a9ba36caa9b7df079bae19f"
>> # Removed all license related tasks in this recipe as license.bbclass
>> @@ -67,6 +67,12 @@ hostname = "openembedded"
>>
>> BASEFILESISSUEINSTALL ?= "do_install_basefilesissue"
>>
>> +do_install_prepend() {
>> + if ${@base_contains("IMAGE_FEATURES", "read-only-rootfs", "true", "false", d)}; then
>> + sed -i '/rootfs/ s/defaults/ro/' ${WORKDIR}/fstab
>> + fi
>> +}
>> +
>> do_install () {
>> for d in ${dirs755}; do
>> install -m 0755 -d ${D}$d
>> diff --git a/meta/recipes-core/initscripts/initscripts-1.0/bootmisc.sh b/meta/recipes-core/initscripts/initscripts-1.0/bootmisc.sh
>> index 4f76cb4..3b5a47f 100755
>> --- a/meta/recipes-core/initscripts/initscripts-1.0/bootmisc.sh
>> +++ b/meta/recipes-core/initscripts/initscripts-1.0/bootmisc.sh
>> @@ -54,14 +54,7 @@ fi
>>
>> #
>> # This is as good a place as any for a sanity check
>> -# /tmp should be a symlink to /var/tmp to cut down on the number
>> -# of mounted ramdisks.
>> -if test ! -L /tmp&& test -d /var/tmp
>> -then
>> - rm -rf /tmp
>> - ln -sf /var/tmp /tmp
>> -fi
>> -
>> +#
>> # Set the system clock from hardware clock
>> # If the timestamp is more recent than the current time,
>> # use the timestamp instead.
>> diff --git a/meta/recipes-core/initscripts/initscripts-1.0/populate-volatile.sh b/meta/recipes-core/initscripts/initscripts-1.0/populate-volatile.sh
>> index d2175d7..9c1ce23 100755
>> --- a/meta/recipes-core/initscripts/initscripts-1.0/populate-volatile.sh
>> +++ b/meta/recipes-core/initscripts/initscripts-1.0/populate-volatile.sh
>> @@ -8,192 +8,191 @@
>> # Short-Description: Populate the volatile filesystem
>> ### END INIT INFO
>>
>> -. /etc/default/rcS
>> -
>> -CFGDIR="/etc/default/volatiles"
>> -TMPROOT="/var/tmp"
>> +# Get ROOT_DIR
>> +DIRNAME=`dirname $0`
>> +ROOT_DIR=`echo $DIRNAME | sed -ne 's:etc/.*::p'`
>> +
>> +. ${ROOT_DIR}/etc/default/rcS
>> +# Test whether rootfs is read-only or not
>> +if> ${ROOT_DIR}/etc/test-read-write; then
>> + ROOTFS_READ_ONLY=no
>> + rm ${ROOT_DIR}/etc/test-read-write
>> +else
>> + ROOTFS_READ_ONLY=yes
>> +fi 2>/dev/null
>> +
>> +# When running populat-volatile.sh at rootfs time, disable cache.
>> +[ "$ROOT_DIR" != "/" ]&& VOLATILE_ENABLE_CACHE=no
>> +# If rootfs is read-only, disable cache.
>> +[ "$ROOTFS_READ_ONLY" = "yes" ]&& VOLATILE_ENABLE_CACHE=no
>> +# All above statements will be moved to a central place, say var.sh which
>> +# encapsulates '. /etc/default/rcS'.
>> +
>> +CFGDIR="${ROOT_DIR}/etc/default/volatiles"
>> +TMPROOT="${ROOT_DIR}/var/volatile/tmp"
>> COREDEF="00_core"
>> +COREDEF_READONLY="00_core_readonly"
>>
>> -[ "${VERBOSE}" != "no" ]&& echo "Populating volatile Filesystems."
>> +[ "${VERBOSE}" != "no" ]&& echo "Setting up basic files related to volatile storage under ${ROOT_DIR}."
>>
>> create_file() {
>> - EXEC="
>> - touch \"$1\";
>> - chown ${TUSER}.${TGROUP} $1 || echo \"Failed to set owner -${TUSER}- for -$1-.\">/dev/tty0 2>&1;
>> - chmod ${TMODE} $1 || echo \"Failed to set mode -${TMODE}- for -$1-.\">/dev/tty0 2>&1 "
>> + EXEC="
>> + touch \"$1\";
>> + chown ${TUSER}.${TGROUP} $1 || echo \"Failed to set owner -${TUSER}- for -$1-.\"> /dev/null 2>&1;
>> + chmod ${TMODE} $1 || echo \"Failed to set mode -${TMODE}- for -$1-.\"> /dev/null 2>&1 "
>>
>> test "$VOLATILE_ENABLE_CACHE" = yes&& echo "$EXEC">> /etc/volatile.cache.build
>>
>> [ -e "$1" ]&& {
>> - [ "${VERBOSE}" != "no" ]&& echo "Target already exists. Skipping."
>> + [ "${VERBOSE}" != "no" ]&& echo "Target $1 already exists. Skipping."
>> } || {
>> - eval $EXEC&
>> + if [ "$ROOT_DIR" = "/" ]; then
>> + eval $EXEC
>> + else
>> + # Some operations at rootfs time may fail and should fail,
>> + # but these failures should not be logged.
>> + eval $EXEC> /dev/null 2>&1
>> + fi
>> }
>> }
>>
>> mk_dir() {
>> EXEC="
>> mkdir -p \"$1\";
>> - chown ${TUSER}.${TGROUP} $1 || echo \"Failed to set owner -${TUSER}- for -$1-.\">/dev/tty0 2>&1;
>> - chmod ${TMODE} $1 || echo \"Failed to set mode -${TMODE}- for -$1-.\">/dev/tty0 2>&1 "
>> + chown ${TUSER}.${TGROUP} $1 || echo \"Failed to set owner -${TUSER}- for -$1-.\" 2>&1;
>> + chmod ${TMODE} $1 || echo \"Failed to set mode -${TMODE}- for -$1-.\" 2>&1 "
>>
>> test "$VOLATILE_ENABLE_CACHE" = yes&& echo "$EXEC">> /etc/volatile.cache.build
>>
>> [ -e "$1" ]&& {
>> - [ "${VERBOSE}" != "no" ]&& echo "Target already exists. Skipping."
>> + [ "${VERBOSE}" != "no" ]&& echo "Target ${1} already exists. Skipping."
>> } || {
>> - eval $EXEC
>> + if [ "$ROOT_DIR" = "/" ]; then
>> + eval $EXEC
>> + else
>> + # Some operations at rootfs time may fail and should fail,
>> + # but these failures should not be logged.
>> + eval $EXEC> /dev/null 2>&1
>> + fi
>> }
>> }
>>
>> link_file() {
>> - EXEC="test -e \"$2\" -o -L $2 || ln -s \"$1\" \"$2\">/dev/tty0 2>&1"
>> -
>> - test "$VOLATILE_ENABLE_CACHE" = yes&& echo " $EXEC">> /etc/volatile.cache.build
>> -
>> - [ -e "$2" ]&& {
>> - echo "Cannot create link over existing -${TNAME}-.">&2
>> - } || {
>> - eval $EXEC&
>> - }
>> + EXEC="
>> + if [ -L \"$2\" ]; then
>> + [ \"$(readlink -f \"$2\")\" != \"$(readlink -f \"$1\")\" ]&& { rm -f \"$2\"; ln -sf \"$1\" \"$2\"; };
>> + elif [ -d \"$2\" ]; then
>> + rm -rf \"$2\";
>> + ln -sf \"$1\" \"$2\";
>> + else
>> + ln -sf \"$1\" \"$2\";
>> + fi
>> + "
>> + test "$VOLATILE_ENABLE_CACHE" = yes&& echo " $EXEC">> /etc/volatile.cache.build
>> + if [ "$ROOT_DIR" = "/" ]; then
>> + eval $EXEC
>> + else
>> + # Some operations at rootfs time may fail and should fail,
>> + # but these failures should not be logged
>> + eval $EXEC> /dev/null 2>&1
>> + fi
>> }
>>
>> check_requirements() {
>> + cleanup() {
>> + rm "${TMP_INTERMED}"
>> + rm "${TMP_DEFINED}"
>> + rm "${TMP_COMBINED}"
>> + }
>> +
>> + CFGFILE="$1"
>> + [ `basename "${CFGFILE}"` = "${COREDEF}" ]&& return 0
>> + [ `basename "${CFGFILE}"` = "${COREDEF_READONLY}" ]&& return 0
>> + TMP_INTERMED="${TMPROOT}/tmp.$$"
>> + TMP_DEFINED="${TMPROOT}/tmpdefined.$$"
>> + TMP_COMBINED="${TMPROOT}/tmpcombined.$$"
>> +
>> + cat ${ROOT_DIR}/etc/passwd | sed 's@\(^:\)*:.*@\1@' | sort | uniq> "${TMP_DEFINED}"
>> + cat ${CFGFILE} | grep -v "^#" | cut -d " " -f 2> "${TMP_INTERMED}"
>> + cat "${TMP_DEFINED}" "${TMP_INTERMED}" | sort | uniq> "${TMP_COMBINED}"
>> + NR_DEFINED_USERS="`cat "${TMP_DEFINED}" | wc -l`"
>> + NR_COMBINED_USERS="`cat "${TMP_COMBINED}" | wc -l`"
>> +
>> + [ "${NR_DEFINED_USERS}" -ne "${NR_COMBINED_USERS}" ]&& {
>> + echo "Undefined users:"
>> + diff "${TMP_DEFINED}" "${TMP_COMBINED}" | grep "^>"
>> + cleanup
>> + return 1
>> + }
>>
>> - cleanup() {
>> - rm "${TMP_INTERMED}"
>> - rm "${TMP_DEFINED}"
>> - rm "${TMP_COMBINED}"
>> - }
>> -
>> - CFGFILE="$1"
>> -
>> - [ `basename "${CFGFILE}"` = "${COREDEF}" ]&& return 0
>> -
>> - TMP_INTERMED="${TMPROOT}/tmp.$$"
>> - TMP_DEFINED="${TMPROOT}/tmpdefined.$$"
>> - TMP_COMBINED="${TMPROOT}/tmpcombined.$$"
>> -
>> -
>> - cat /etc/passwd | sed 's@\(^:\)*:.*@\1@' | sort | uniq> "${TMP_DEFINED}"
>> - cat ${CFGFILE} | grep -v "^#" | cut -d " " -f 2> "${TMP_INTERMED}"
>> - cat "${TMP_DEFINED}" "${TMP_INTERMED}" | sort | uniq> "${TMP_COMBINED}"
>> -
>> - NR_DEFINED_USERS="`cat "${TMP_DEFINED}" | wc -l`"
>> - NR_COMBINED_USERS="`cat "${TMP_COMBINED}" | wc -l`"
>> -
>> - [ "${NR_DEFINED_USERS}" -ne "${NR_COMBINED_USERS}" ]&& {
>> - echo "Undefined users:"
>> - diff "${TMP_DEFINED}" "${TMP_COMBINED}" | grep "^>"
>> - cleanup
>> - return 1
>> - }
>> -
>> -
>> - cat /etc/group | sed 's@\(^:\)*:.*@\1@' | sort | uniq> "${TMP_DEFINED}"
>> - cat ${CFGFILE} | grep -v "^#" | cut -d " " -f 3> "${TMP_INTERMED}"
>> - cat "${TMP_DEFINED}" "${TMP_INTERMED}" | sort | uniq> "${TMP_COMBINED}"
>>
>> - NR_DEFINED_GROUPS="`cat "${TMP_DEFINED}" | wc -l`"
>> - NR_COMBINED_GROUPS="`cat "${TMP_COMBINED}" | wc -l`"
>> + cat ${ROOT_DIR}/etc/group | sed 's@\(^:\)*:.*@\1@' | sort | uniq> "${TMP_DEFINED}"
>> + cat ${CFGFILE} | grep -v "^#" | cut -d " " -f 3> "${TMP_INTERMED}"
>> + cat "${TMP_DEFINED}" "${TMP_INTERMED}" | sort | uniq> "${TMP_COMBINED}"
>>
>> - [ "${NR_DEFINED_GROUPS}" -ne "${NR_COMBINED_GROUPS}" ]&& {
>> - echo "Undefined groups:"
>> - diff "${TMP_DEFINED}" "${TMP_COMBINED}" | grep "^>"
>> - cleanup
>> - return 1
>> - }
>> + NR_DEFINED_GROUPS="`cat "${TMP_DEFINED}" | wc -l`"
>> + NR_COMBINED_GROUPS="`cat "${TMP_COMBINED}" | wc -l`"
>>
>> - # Add checks for required directories here
>> + [ "${NR_DEFINED_GROUPS}" -ne "${NR_COMBINED_GROUPS}" ]&& {
>> + echo "Undefined groups:"
>> + diff "${TMP_DEFINED}" "${TMP_COMBINED}" | grep "^>"
>> + cleanup
>> + return 1
>> + }
>>
>> - cleanup
>> - return 0
>> - }
>> + cleanup
>> + return 0
>> +}
>>
>> apply_cfgfile() {
>> + CFGFILE="$1"
>> + [ ${VERBOSE} != "no" ]&& echo "Applying config file: $CFGFILE"
>> +
>> + check_requirements "${CFGFILE}" || {
>> + echo "Skipping ${CFGFILE}"
>> + return 1
>> + }
>> +
>> + cat ${CFGFILE} | grep -v "^#" | sed -e '/^$/ d' | \
>> + while read LINE; do
>> + eval `echo "$LINE" | sed -n "s/\(.*\)\ \(.*\) \(.*\)\ \(.*\)\ \(.*\)\ \(.*\)/TTYPE=\1 ; TUSER=\2; TGROUP=\3; TMODE=\4; TNAME=\5 TLTARGET=\6/p"`
>> + TNAME=${ROOT_DIR}/${TNAME}
>> + [ "${VERBOSE}" != "no" ]&& echo "Checking for -${TNAME}-."
>> +
>> + [ "${TTYPE}" = "l" ]&& {
>> + TSOURCE="$TLTARGET"
>> + [ "${VERBOSE}" != "no" ]&& echo "Creating link -${TNAME}- pointing to -${TSOURCE}-."
>> + link_file "${TSOURCE}" "${TNAME}"
>> + continue
>> + }
>> + case "${TTYPE}" in
>> + "f") [ "${VERBOSE}" != "no" ]&& echo "Creating file -${TNAME}-."
>> + create_file "${TNAME}"
>> + ;;
>> + "d") [ "${VERBOSE}" != "no" ]&& echo "Creating directory -${TNAME}-."
>> + mk_dir "${TNAME}"
>> + ;;
>> + *) [ "${VERBOSE}" != "no" ]&& echo "Invalid type -${TTYPE}-."
>> + continue
>> + ;;
>> + esac
>> + done
>> + return 0
>> +}
>>
>> - CFGFILE="$1"
>> -
>> - check_requirements "${CFGFILE}" || {
>> - echo "Skipping ${CFGFILE}"
>> - return 1
>> - }
>> -
>> - cat ${CFGFILE} | grep -v "^#" | \
>> - while read LINE; do
>> -
>> - eval `echo "$LINE" | sed -n "s/\(.*\)\ \(.*\) \(.*\)\ \(.*\)\ \(.*\)\ \(.*\)/TTYPE=\1 ; TUSER=\2; TGROUP=\3; TMODE=\4; TNAME=\5 TLTARGET=\6/p"`
>> -
>> - [ "${VERBOSE}" != "no" ]&& echo "Checking for -${TNAME}-."
>> -
>> -
>> - [ "${TTYPE}" = "l" ]&& {
>> - TSOURCE="$TLTARGET"
>> - [ -L "${TNAME}" ] || {
>> - [ "${VERBOSE}" != "no" ]&& echo "Creating link -${TNAME}- pointing to -${TSOURCE}-."
>> - link_file "${TSOURCE}" "${TNAME}"&
>> - }
>> - continue
>> - }
>> -
>> - [ -L "${TNAME}" ]&& {
>> - [ "${VERBOSE}" != "no" ]&& echo "Found link."
>> - NEWNAME=`ls -l "${TNAME}" | sed -e 's/^.*-> \(.*\)$/\1/'`
>> - echo ${NEWNAME} | grep -v "^/">/dev/null&& {
>> - TNAME="`echo ${TNAME} | sed -e 's@\(.*\)/.*@\1@'`/${NEWNAME}"
>> - [ "${VERBOSE}" != "no" ]&& echo "Converted relative linktarget to absolute path -${TNAME}-."
>> - } || {
>> - TNAME="${NEWNAME}"
>> - [ "${VERBOSE}" != "no" ]&& echo "Using absolute link target -${TNAME}-."
>> - }
>> - }
>> -
>> - case "${TTYPE}" in
>> - "f") [ "${VERBOSE}" != "no" ]&& echo "Creating file -${TNAME}-."
>> - create_file "${TNAME}"&
>> - ;;
>> - "d") [ "${VERBOSE}" != "no" ]&& echo "Creating directory -${TNAME}-."
>> - mk_dir "${TNAME}"
>> - # Add check to see if there's an entry in fstab to mount.
>> - ;;
>> - *) [ "${VERBOSE}" != "no" ]&& echo "Invalid type -${TTYPE}-."
>> - continue
>> - ;;
>> - esac
>> -
>> -
>> - done
>> -
>> - return 0
>> -
>> - }
>> -
>> -clearcache=0
>> -exec 9</proc/cmdline
>> -while read line<&9
>> -do
>> - case "$line" in
>> - *clearcache*) clearcache=1
>> - ;;
>> - *) continue
>> - ;;
>> - esac
>> -done
>> -exec 9>&-
>> -
>> -if test -e /etc/volatile.cache -a "$VOLATILE_ENABLE_CACHE" = "yes" -a "x$1" != "xupdate" -a "x$clearcache" = "x0"
>> +if test -e ${ROOT_DIR}/etc/volatile.cache -a $VOLATILE_ENABLE_CACHE = yes -a x$1 != xupdate
>> then
>> - sh /etc/volatile.cache
>> + sh ${ROOT_DIR}/etc/volatile.cache
>> else
>> - rm -f /etc/volatile.cache /etc/volatile.cache.build
>> + rm -f ${ROOT_DRI}/etc/volatile.cache ${ROOT_DIR}/etc/volatile.cache.build
>> for file in `ls -1 "${CFGDIR}" | sort`; do
>> apply_cfgfile "${CFGDIR}/${file}"
>> done
>>
>> - [ -e /etc/volatile.cache.build ]&& sync&& mv /etc/volatile.cache.build /etc/volatile.cache
>> + [ -e ${ROOT_DIR}/etc/volatile.cache.build ]&& sync&& mv ${ROOT_DIR}/etc/volatile.cache.build ${ROOT_DIR}/etc/volatile.cache
>> fi
>>
>> -if test -f /etc/ld.so.cache -a ! -f /var/run/ld.so.cache
>> +if [ "${ROOT_DIR}" = "/" ]&& [ -f /etc/ld.so.cache ]&& [ ! -f /var/run/ld.so.cache ]
>> then
>> ln -s /etc/ld.so.cache /var/run/ld.so.cache
>> fi
>> diff --git a/meta/recipes-core/initscripts/initscripts-1.0/volatiles b/meta/recipes-core/initscripts/initscripts-1.0/volatiles
>> index e0741aa..f7e2ef7 100644
>> --- a/meta/recipes-core/initscripts/initscripts-1.0/volatiles
>> +++ b/meta/recipes-core/initscripts/initscripts-1.0/volatiles
>> @@ -31,6 +31,7 @@ l root root 1777 /var/lock /var/volatile/lock
>> l root root 0755 /var/log /var/volatile/log
>> l root root 0755 /var/run /var/volatile/run
>> l root root 1777 /var/tmp /var/volatile/tmp
>> +l root root 1777 /tmp /var/tmp
>> d root root 0755 /var/lock/subsys none
>> f root root 0664 /var/log/wtmp none
>> f root root 0664 /var/run/utmp none
>> diff --git a/meta/recipes-core/initscripts/initscripts-1.0/volatiles-readonly-minimal b/meta/recipes-core/initscripts/initscripts-1.0/volatiles-readonly-minimal
>> new file mode 100644
>> index 0000000..6169ecc
>> --- /dev/null
>> +++ b/meta/recipes-core/initscripts/initscripts-1.0/volatiles-readonly-minimal
>> @@ -0,0 +1,23 @@
>> +# This configuration file lists filesystem objects specific to readonly rootfs
>> +# that should get verified during startup and be created if missing.
>> +#
>> +# Every line must either be a comment starting with #
>> +# or a definition of format:
>> +#<type> <owner> <group> <mode> <path> <linksource>
>> +# where the items are separated by whitespace !
>> +#
>> +#<type> : d|f|l : (d)irectory|(f)ile|(l)ink
>> +#
>> +# A linking example:
>> +# l root root 0777 /var/test /tmp/testfile
>> +# f root root 0644 /var/test none
>> +#
>> +# Understanding links:
>> +# When populate-volatile is to verify/create a directory or file, it will first
>> +# check its existence. If a link is found to exist in the place of the target,
>> +# the path of the target is replaced with the target the link points to.
>> +# Thus, if a link is in the place to be verified, the object will be created
>> +# in the place the link points to instead.
>> +# This explains the order of "link before object" as in the example above, where
>> +# a link will be created at /var/test pointing to /tmp/testfile and due to this
>> +# link the file defined as /var/test will actually be created as /tmp/testfile.
>> diff --git a/meta/recipes-core/initscripts/initscripts-1.0/volatiles-readonly-sato b/meta/recipes-core/initscripts/initscripts-1.0/volatiles-readonly-sato
>> new file mode 100644
>> index 0000000..e128869
>> --- /dev/null
>> +++ b/meta/recipes-core/initscripts/initscripts-1.0/volatiles-readonly-sato
>> @@ -0,0 +1,30 @@
>> +# This configuration file lists filesystem objects specific to readonly rootfs
>> +# that should get verified during startup and be created if missing.
>> +#
>> +# Every line must either be a comment starting with #
>> +# or a definition of format:
>> +#<type> <owner> <group> <mode> <path> <linksource>
>> +# where the items are separated by whitespace !
>> +#
>> +#<type> : d|f|l : (d)irectory|(f)ile|(l)ink
>> +#
>> +# A linking example:
>> +# l root root 0777 /var/test /tmp/testfile
>> +# f root root 0644 /var/test none
>> +#
>> +# Understanding links:
>> +# When populate-volatile is to verify/create a directory or file, it will first
>> +# check it's existence. If a link is found to exist in the place of the target,
>> +# the path of the target is replaced with the target the link points to.
>> +# Thus, if a link is in the place to be verified, the object will be created
>> +# in the place the link points to instead.
>> +# This explains the order of "link before object" as in the example above, where
>> +# a link will be created at /var/test pointing to /tmp/testfile and due to this
>> +# link the file defined as /var/test will actually be created as /tmp/testfile.
>> +d root root 0755 /var/volatile/lib/ none
>> +d root root 0755 /var/volatile/lib/dropbear/ none
>> +d root root 0755 /var/volatile/lib/nfs/ none
>> +d root root 1777 /var/volatile/lib/dbus/ none
>> +l root root 0755 /var/lib/dropbear /var/volatile/lib/dropbear
>> +l root root 0755 /var/lib/nfs /var/volatile/lib/nfs
>> +l root root 0755 /var/lib/dbus /var/volatile/lib/dbus
>> diff --git a/meta/recipes-core/initscripts/initscripts_1.0.bb b/meta/recipes-core/initscripts/initscripts_1.0.bb
>> index 39be9a8..d0869ea 100644
>> --- a/meta/recipes-core/initscripts/initscripts_1.0.bb
>> +++ b/meta/recipes-core/initscripts/initscripts_1.0.bb
>> @@ -3,7 +3,7 @@ DESCRIPTION = "Initscripts provide the basic system startup initialization scrip
>> SECTION = "base"
>> LICENSE = "GPLv2"
>> LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe"
>> -PR = "r138"
>> +PR = "r139"
>>
>> INHIBIT_DEFAULT_DEPS = "1"
>>
>> @@ -30,8 +30,10 @@ SRC_URI = "file://functions \
>> file://device_table.txt \
>> file://populate-volatile.sh \
>> file://volatiles \
>> + file://volatiles-readonly-minimal \
>> + file://volatiles-readonly-sato \
>> file://save-rtc.sh \
>> - file://GPLv2.patch"
>> + file://GPLv2.patch"
>>
>> SRC_URI_append_arm = " file://alignment.sh"
>>
>> @@ -86,6 +88,15 @@ do_install () {
>> install -m 0755 ${WORKDIR}/populate-volatile.sh ${D}${sysconfdir}/init.d
>> install -m 0755 ${WORKDIR}/save-rtc.sh ${D}${sysconfdir}/init.d
>> install -m 0644 ${WORKDIR}/volatiles ${D}${sysconfdir}/default/volatiles/00_core
>> + # Install read-only rootfs specific config files in case of an read-only-rootfs image
>> + if ${@base_contains("IMAGE_FEATURES", "read-only-rootfs", "true", "false" ,d)}; then
>> + if ${@base_contains("IMAGE_FEATURES", "x11-sato", "true", "false" ,d)}; then
>> + install -m 0644 ${WORKDIR}/volatiles-readonly-sato ${D}${sysconfdir}/default/volatiles/00_core_readonly
>> + else
>> + install -m 0644 ${WORKDIR}/volatiles-readonly-minimal ${D}${sysconfdir}/default/volatiles/00_core_readonly
>> + fi
>> + fi
>> +
>> if [ "${TARGET_ARCH}" = "arm" ]; then
>> install -m 0755 ${WORKDIR}/alignment.sh ${D}${sysconfdir}/init.d
>> fi
>> --
>> 1.7.9.5
>>
>>
>> _______________________________________________
>> Openembedded-core mailing list
>> Openembedded-core@lists.openembedded.org
>> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
^ permalink raw reply
* [PATCH] mutter: finalize mutter removal
From: Constantin Musca @ 2012-12-24 8:41 UTC (permalink / raw)
To: poky; +Cc: Constantin Musca
Part of the sato trimming process
Signed-off-by: Constantin Musca <constantinx.musca@intel.com>
---
meta-yocto/conf/distro/include/maintainers.inc | 1 -
meta-yocto/conf/distro/include/poky-floating-revisions.inc | 1 -
meta-yocto/conf/distro/include/recipe_color.inc | 1 -
meta-yocto/conf/distro/include/upstream_tracking.inc | 3 ---
4 files changed, 6 deletions(-)
diff --git a/meta-yocto/conf/distro/include/maintainers.inc b/meta-yocto/conf/distro/include/maintainers.inc
index b0246b7..1d36694 100644
--- a/meta-yocto/conf/distro/include/maintainers.inc
+++ b/meta-yocto/conf/distro/include/maintainers.inc
@@ -557,7 +557,6 @@ RECIPE_MAINTAINER_pn-msynctool = "Cristian Iorga <cristian.iorga@intel.com>"
RECIPE_MAINTAINER_pn-mtdev = "Ross Burton <ross.burton@intel.com>"
RECIPE_MAINTAINER_pn-mtd-utils = "Radu Moisan <radu.moisan@intel.com>"
RECIPE_MAINTAINER_pn-mtools = "Scott Garman <scott.a.garman@intel.com>"
-RECIPE_MAINTAINER_pn-mutter = "Constantin Musca <constantinx.musca@intel.com>"
RECIPE_MAINTAINER_pn-mx = "Saul Wold <sgw@linux.intel.com>"
RECIPE_MAINTAINER_pn-nasm = "Bogdan Marinescu <bogdan.a.marinescu@intel.com>"
RECIPE_MAINTAINER_pn-nativesdk-cmake = "Saul Wold <sgw@linux.intel.com>"
diff --git a/meta-yocto/conf/distro/include/poky-floating-revisions.inc b/meta-yocto/conf/distro/include/poky-floating-revisions.inc
index af8ef11..7a4d9d3 100644
--- a/meta-yocto/conf/distro/include/poky-floating-revisions.inc
+++ b/meta-yocto/conf/distro/include/poky-floating-revisions.inc
@@ -52,7 +52,6 @@ SRCREV_pn-clutter-cairo ?= "${AUTOREV}"
SRCREV_pn-table ?= "${AUTOREV}"
SRCREV_pn-libmatchbox ?= "${AUTOREV}"
SRCREV_pn-tasks ?= "${AUTOREV}"
-SRCREV_pn-mutter ?= "${AUTOREV}"
SRCREV_pn-ofono ?= "${AUTOREV}"
SRCREV_pn-dri2proto = "${AUTOREV}"
diff --git a/meta-yocto/conf/distro/include/recipe_color.inc b/meta-yocto/conf/distro/include/recipe_color.inc
index 894c76a..d7ccb60 100644
--- a/meta-yocto/conf/distro/include/recipe_color.inc
+++ b/meta-yocto/conf/distro/include/recipe_color.inc
@@ -289,7 +289,6 @@ RECIPE_COLOR_pn-modutils-initscripts = "yellow"
RECIPE_COLOR_pn-msynctool = "yellow"
RECIPE_COLOR_pn-mtd-utils = "yellow"
RECIPE_COLOR_pn-mtools = "yellow"
-RECIPE_COLOR_pn-mutter = "red"
RECIPE_COLOR_pn-neon = "yellow"
RECIPE_COLOR_pn-netbase = "yellow"
RECIPE_COLOR_pn-nfs-utils = "yellow"
diff --git a/meta-yocto/conf/distro/include/upstream_tracking.inc b/meta-yocto/conf/distro/include/upstream_tracking.inc
index 1b3ddad..22487f9 100644
--- a/meta-yocto/conf/distro/include/upstream_tracking.inc
+++ b/meta-yocto/conf/distro/include/upstream_tracking.inc
@@ -1002,9 +1002,6 @@ RECIPE_UPSTREAM_DATE_pn-mtd-utils = "Dec 17, 2011"
RECIPE_UPSTREAM_VERSION_pn-mtools = "4.0.17"
RECIPE_UPSTREAM_DATE_pn-mtools = "Jun 28, 2011"
CHECK_DATE_pn-mtools = "Aug 31, 2012"
-RECIPE_UPSTREAM_VERSION_pn-mutter = "3.5.5"
-RECIPE_UPSTREAM_DATE_pn-mutter = "Aug 8, 2012"
-CHECK_DATE_pn-mutter = "Aug 31, 2012"
RECIPE_UPSTREAM_DATE_pn-nasm= "Aug 18, 2012"
RECIPE_UPSTREAM_VERSION_pn-nasm="2.10.04"
CHECK_DATE_pn-nasm = "Aug 31, 2012"
--
1.7.11.7
^ permalink raw reply related
* Re: Multiple .bb files are due to be built which each provide udev
From: Eric Bénard @ 2012-12-24 8:06 UTC (permalink / raw)
To: openembedded-devel; +Cc: koen
In-Reply-To: <657212B5-E6A0-45F8-AD05-3F99D7DB1B73@dominion.thruhere.net>
Hi Koen,
Le Sun, 23 Dec 2012 23:16:31 +0100,
Koen Kooi <koen@dominion.thruhere.net> a écrit :
> It does break angstrom since the autobuilder does have that change and the updated systemd was pushed into the feeds already after meta-oe gained the commit.
>
strange, I checked there and systemd is not at v189 :
http://www.angstrom-distribution.org/feeds/v2012.05/ipk/eglibc/armv5te/base/
may you please point me to the right feed ?
Thanks
Eric
^ permalink raw reply
* [PATCH 00/10] drm/exynos: Cleanup and update IPP drivers
From: Sachin Kamat @ 2012-12-24 8:33 UTC (permalink / raw)
To: dri-devel; +Cc: sachin.kamat, patches
Compile tested against linux-next tree (20121224).
Sachin Kamat (10):
drm/exynos: Use devm_kzalloc in exynos_drm_ipp.c
drm/exynos: Remove explicit freeing using devm_* APIs in
exynos_drm_fimc.c
drm/exynos: Remove redundant NULL check
drm/exynos: Use devm_clk_get in exynos_drm_fimc.c
drm/exynos: Remove unnecessary devm_* freeing APIs in
exynos_drm_rotator.c
drm/exynos: Remove redundant NULL check in exynos_drm_rotator.c
drm/exynos: Use devm_clk_get in exynos_drm_rotator.c
drm/exynos: Remove explicit freeing using devm_* APIs in
exynos_drm_gsc.c
drm/exynos: Remove redundant NULL check in exynos_drm_gsc.c
drm/exynos: Use devm_clk_get in exynos_drm_gsc.c
drivers/gpu/drm/exynos/exynos_drm_fimc.c | 78 ++++++---------------------
drivers/gpu/drm/exynos/exynos_drm_gsc.c | 30 ++---------
drivers/gpu/drm/exynos/exynos_drm_ipp.c | 9 +---
drivers/gpu/drm/exynos/exynos_drm_rotator.c | 25 ++-------
4 files changed, 28 insertions(+), 114 deletions(-)
--
1.7.4.1
^ permalink raw reply
* [PATCH 01/10] drm/exynos: Use devm_kzalloc in exynos_drm_ipp.c
From: Sachin Kamat @ 2012-12-24 8:33 UTC (permalink / raw)
To: dri-devel; +Cc: sachin.kamat, patches
In-Reply-To: <1356338031-23674-1-git-send-email-sachin.kamat@linaro.org>
devm_kzalloc makes the code simpler by eliminating the need for
explicit freeing.
Cc: Eunchul Kim <chulspro.kim@samsung.com>
Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
---
drivers/gpu/drm/exynos/exynos_drm_ipp.c | 9 ++-------
1 files changed, 2 insertions(+), 7 deletions(-)
diff --git a/drivers/gpu/drm/exynos/exynos_drm_ipp.c b/drivers/gpu/drm/exynos/exynos_drm_ipp.c
index 49eebe9..441b719 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_ipp.c
+++ b/drivers/gpu/drm/exynos/exynos_drm_ipp.c
@@ -1895,7 +1895,7 @@ static int __devinit ipp_probe(struct platform_device *pdev)
struct exynos_drm_subdrv *subdrv;
int ret;
- ctx = kzalloc(sizeof(*ctx), GFP_KERNEL);
+ ctx = devm_kzalloc(&pdev->dev, sizeof(*ctx), GFP_KERNEL);
if (!ctx)
return -ENOMEM;
@@ -1916,8 +1916,7 @@ static int __devinit ipp_probe(struct platform_device *pdev)
ctx->event_workq = create_singlethread_workqueue("ipp_event");
if (!ctx->event_workq) {
dev_err(dev, "failed to create event workqueue\n");
- ret = -EINVAL;
- goto err_clear;
+ return -EINVAL;
}
/*
@@ -1958,8 +1957,6 @@ err_cmd_workq:
destroy_workqueue(ctx->cmd_workq);
err_event_workq:
destroy_workqueue(ctx->event_workq);
-err_clear:
- kfree(ctx);
return ret;
}
@@ -1985,8 +1982,6 @@ static int __devexit ipp_remove(struct platform_device *pdev)
destroy_workqueue(ctx->cmd_workq);
destroy_workqueue(ctx->event_workq);
- kfree(ctx);
-
return 0;
}
--
1.7.4.1
^ permalink raw reply related
* [PATCH 02/10] drm/exynos: Remove explicit freeing using devm_* APIs in exynos_drm_fimc.c
From: Sachin Kamat @ 2012-12-24 8:33 UTC (permalink / raw)
To: dri-devel; +Cc: sachin.kamat, patches
In-Reply-To: <1356338031-23674-1-git-send-email-sachin.kamat@linaro.org>
devm_* APIs are device managed and get freed automatically when the
device detaches. Thus explicit freeing is not needed. This saves some
code.
Cc: Eunchul Kim <chulspro.kim@samsung.com>
Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
---
drivers/gpu/drm/exynos/exynos_drm_fimc.c | 30 +++++++++---------------------
1 files changed, 9 insertions(+), 21 deletions(-)
diff --git a/drivers/gpu/drm/exynos/exynos_drm_fimc.c b/drivers/gpu/drm/exynos/exynos_drm_fimc.c
index 61ea242..ab75150 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_fimc.c
+++ b/drivers/gpu/drm/exynos/exynos_drm_fimc.c
@@ -1742,64 +1742,58 @@ static int __devinit fimc_probe(struct platform_device *pdev)
ctx->sclk_fimc_clk = clk_get(dev, "sclk_fimc");
if (IS_ERR(ctx->sclk_fimc_clk)) {
dev_err(dev, "failed to get src fimc clock.\n");
- ret = PTR_ERR(ctx->sclk_fimc_clk);
- goto err_ctx;
+ return PTR_ERR(ctx->sclk_fimc_clk);
}
clk_enable(ctx->sclk_fimc_clk);
ctx->fimc_clk = clk_get(dev, "fimc");
if (IS_ERR(ctx->fimc_clk)) {
dev_err(dev, "failed to get fimc clock.\n");
- ret = PTR_ERR(ctx->fimc_clk);
clk_disable(ctx->sclk_fimc_clk);
clk_put(ctx->sclk_fimc_clk);
- goto err_ctx;
+ return PTR_ERR(ctx->fimc_clk);
}
ctx->wb_clk = clk_get(dev, "pxl_async0");
if (IS_ERR(ctx->wb_clk)) {
dev_err(dev, "failed to get writeback a clock.\n");
- ret = PTR_ERR(ctx->wb_clk);
clk_disable(ctx->sclk_fimc_clk);
clk_put(ctx->sclk_fimc_clk);
clk_put(ctx->fimc_clk);
- goto err_ctx;
+ return PTR_ERR(ctx->wb_clk);
}
ctx->wb_b_clk = clk_get(dev, "pxl_async1");
if (IS_ERR(ctx->wb_b_clk)) {
dev_err(dev, "failed to get writeback b clock.\n");
- ret = PTR_ERR(ctx->wb_b_clk);
clk_disable(ctx->sclk_fimc_clk);
clk_put(ctx->sclk_fimc_clk);
clk_put(ctx->fimc_clk);
clk_put(ctx->wb_clk);
- goto err_ctx;
+ return PTR_ERR(ctx->wb_b_clk);
}
parent_clk = clk_get(dev, ddata->parent_clk);
if (IS_ERR(parent_clk)) {
dev_err(dev, "failed to get parent clock.\n");
- ret = PTR_ERR(parent_clk);
clk_disable(ctx->sclk_fimc_clk);
clk_put(ctx->sclk_fimc_clk);
clk_put(ctx->fimc_clk);
clk_put(ctx->wb_clk);
clk_put(ctx->wb_b_clk);
- goto err_ctx;
+ return PTR_ERR(parent_clk);
}
if (clk_set_parent(ctx->sclk_fimc_clk, parent_clk)) {
dev_err(dev, "failed to set parent.\n");
- ret = -EINVAL;
clk_put(parent_clk);
clk_disable(ctx->sclk_fimc_clk);
clk_put(ctx->sclk_fimc_clk);
clk_put(ctx->fimc_clk);
clk_put(ctx->wb_clk);
clk_put(ctx->wb_b_clk);
- goto err_ctx;
+ return -EINVAL;
}
clk_put(parent_clk);
@@ -1825,7 +1819,7 @@ static int __devinit fimc_probe(struct platform_device *pdev)
if (!res) {
dev_err(dev, "failed to request irq resource.\n");
ret = -ENOENT;
- goto err_get_regs;
+ goto err_clk;
}
ctx->irq = res->start;
@@ -1833,7 +1827,7 @@ static int __devinit fimc_probe(struct platform_device *pdev)
IRQF_ONESHOT, "drm_fimc", ctx);
if (ret < 0) {
dev_err(dev, "failed to request irq.\n");
- goto err_get_regs;
+ goto err_clk;
}
/* context initailization */
@@ -1879,15 +1873,12 @@ err_ippdrv_register:
pm_runtime_disable(dev);
err_get_irq:
free_irq(ctx->irq, ctx);
-err_get_regs:
- devm_iounmap(dev, ctx->regs);
err_clk:
clk_put(ctx->sclk_fimc_clk);
clk_put(ctx->fimc_clk);
clk_put(ctx->wb_clk);
clk_put(ctx->wb_b_clk);
-err_ctx:
- devm_kfree(dev, ctx);
+
return ret;
}
@@ -1905,15 +1896,12 @@ static int __devexit fimc_remove(struct platform_device *pdev)
pm_runtime_disable(dev);
free_irq(ctx->irq, ctx);
- devm_iounmap(dev, ctx->regs);
clk_put(ctx->sclk_fimc_clk);
clk_put(ctx->fimc_clk);
clk_put(ctx->wb_clk);
clk_put(ctx->wb_b_clk);
- devm_kfree(dev, ctx);
-
return 0;
}
--
1.7.4.1
^ permalink raw reply related
* [PATCH 03/10] drm/exynos: Remove redundant NULL check
From: Sachin Kamat @ 2012-12-24 8:33 UTC (permalink / raw)
To: dri-devel; +Cc: sachin.kamat, patches
In-Reply-To: <1356338031-23674-1-git-send-email-sachin.kamat@linaro.org>
devm_request_and_ioremap API checks for NULL. Hence explicit
NULL check is not necessary. Saves some code.
Cc: Eunchul Kim <chulspro.kim@samsung.com>
Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
---
drivers/gpu/drm/exynos/exynos_drm_fimc.c | 6 ------
1 files changed, 0 insertions(+), 6 deletions(-)
diff --git a/drivers/gpu/drm/exynos/exynos_drm_fimc.c b/drivers/gpu/drm/exynos/exynos_drm_fimc.c
index ab75150..972aa70 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_fimc.c
+++ b/drivers/gpu/drm/exynos/exynos_drm_fimc.c
@@ -1801,12 +1801,6 @@ static int __devinit fimc_probe(struct platform_device *pdev)
/* resource memory */
ctx->regs_res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
- if (!ctx->regs_res) {
- dev_err(dev, "failed to find registers.\n");
- ret = -ENOENT;
- goto err_clk;
- }
-
ctx->regs = devm_request_and_ioremap(dev, ctx->regs_res);
if (!ctx->regs) {
dev_err(dev, "failed to map registers.\n");
--
1.7.4.1
^ permalink raw reply related
* [PATCH 04/10] drm/exynos: Use devm_clk_get in exynos_drm_fimc.c
From: Sachin Kamat @ 2012-12-24 8:33 UTC (permalink / raw)
To: dri-devel; +Cc: sachin.kamat, patches
In-Reply-To: <1356338031-23674-1-git-send-email-sachin.kamat@linaro.org>
This eliminates the need for explicit clk_put and makes the
cleanup and exit path code simpler.
Cc: Eunchul Kim <chulspro.kim@samsung.com>
Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
---
drivers/gpu/drm/exynos/exynos_drm_fimc.c | 46 ++++++-----------------------
1 files changed, 10 insertions(+), 36 deletions(-)
diff --git a/drivers/gpu/drm/exynos/exynos_drm_fimc.c b/drivers/gpu/drm/exynos/exynos_drm_fimc.c
index 972aa70..c4006b8 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_fimc.c
+++ b/drivers/gpu/drm/exynos/exynos_drm_fimc.c
@@ -1739,64 +1739,50 @@ static int __devinit fimc_probe(struct platform_device *pdev)
platform_get_device_id(pdev)->driver_data;
/* clock control */
- ctx->sclk_fimc_clk = clk_get(dev, "sclk_fimc");
+ ctx->sclk_fimc_clk = devm_clk_get(dev, "sclk_fimc");
if (IS_ERR(ctx->sclk_fimc_clk)) {
dev_err(dev, "failed to get src fimc clock.\n");
return PTR_ERR(ctx->sclk_fimc_clk);
}
clk_enable(ctx->sclk_fimc_clk);
- ctx->fimc_clk = clk_get(dev, "fimc");
+ ctx->fimc_clk = devm_clk_get(dev, "fimc");
if (IS_ERR(ctx->fimc_clk)) {
dev_err(dev, "failed to get fimc clock.\n");
clk_disable(ctx->sclk_fimc_clk);
- clk_put(ctx->sclk_fimc_clk);
return PTR_ERR(ctx->fimc_clk);
}
- ctx->wb_clk = clk_get(dev, "pxl_async0");
+ ctx->wb_clk = devm_clk_get(dev, "pxl_async0");
if (IS_ERR(ctx->wb_clk)) {
dev_err(dev, "failed to get writeback a clock.\n");
clk_disable(ctx->sclk_fimc_clk);
- clk_put(ctx->sclk_fimc_clk);
- clk_put(ctx->fimc_clk);
return PTR_ERR(ctx->wb_clk);
}
- ctx->wb_b_clk = clk_get(dev, "pxl_async1");
+ ctx->wb_b_clk = devm_clk_get(dev, "pxl_async1");
if (IS_ERR(ctx->wb_b_clk)) {
dev_err(dev, "failed to get writeback b clock.\n");
clk_disable(ctx->sclk_fimc_clk);
- clk_put(ctx->sclk_fimc_clk);
- clk_put(ctx->fimc_clk);
- clk_put(ctx->wb_clk);
return PTR_ERR(ctx->wb_b_clk);
}
- parent_clk = clk_get(dev, ddata->parent_clk);
+ parent_clk = devm_clk_get(dev, ddata->parent_clk);
if (IS_ERR(parent_clk)) {
dev_err(dev, "failed to get parent clock.\n");
clk_disable(ctx->sclk_fimc_clk);
- clk_put(ctx->sclk_fimc_clk);
- clk_put(ctx->fimc_clk);
- clk_put(ctx->wb_clk);
- clk_put(ctx->wb_b_clk);
return PTR_ERR(parent_clk);
}
if (clk_set_parent(ctx->sclk_fimc_clk, parent_clk)) {
dev_err(dev, "failed to set parent.\n");
- clk_put(parent_clk);
+ devm_clk_put(dev, parent_clk);
clk_disable(ctx->sclk_fimc_clk);
- clk_put(ctx->sclk_fimc_clk);
- clk_put(ctx->fimc_clk);
- clk_put(ctx->wb_clk);
- clk_put(ctx->wb_b_clk);
return -EINVAL;
}
- clk_put(parent_clk);
+ devm_clk_put(dev, parent_clk);
clk_set_rate(ctx->sclk_fimc_clk, pdata->clk_rate);
/* resource memory */
@@ -1804,16 +1790,14 @@ static int __devinit fimc_probe(struct platform_device *pdev)
ctx->regs = devm_request_and_ioremap(dev, ctx->regs_res);
if (!ctx->regs) {
dev_err(dev, "failed to map registers.\n");
- ret = -ENXIO;
- goto err_clk;
+ return -ENXIO;
}
/* resource irq */
res = platform_get_resource(pdev, IORESOURCE_IRQ, 0);
if (!res) {
dev_err(dev, "failed to request irq resource.\n");
- ret = -ENOENT;
- goto err_clk;
+ return -ENOENT;
}
ctx->irq = res->start;
@@ -1821,7 +1805,7 @@ static int __devinit fimc_probe(struct platform_device *pdev)
IRQF_ONESHOT, "drm_fimc", ctx);
if (ret < 0) {
dev_err(dev, "failed to request irq.\n");
- goto err_clk;
+ return ret;
}
/* context initailization */
@@ -1867,11 +1851,6 @@ err_ippdrv_register:
pm_runtime_disable(dev);
err_get_irq:
free_irq(ctx->irq, ctx);
-err_clk:
- clk_put(ctx->sclk_fimc_clk);
- clk_put(ctx->fimc_clk);
- clk_put(ctx->wb_clk);
- clk_put(ctx->wb_b_clk);
return ret;
}
@@ -1891,11 +1870,6 @@ static int __devexit fimc_remove(struct platform_device *pdev)
free_irq(ctx->irq, ctx);
- clk_put(ctx->sclk_fimc_clk);
- clk_put(ctx->fimc_clk);
- clk_put(ctx->wb_clk);
- clk_put(ctx->wb_b_clk);
-
return 0;
}
--
1.7.4.1
^ permalink raw reply related
* [PATCH 05/10] drm/exynos: Remove unnecessary devm_* freeing APIs in exynos_drm_rotator.c
From: Sachin Kamat @ 2012-12-24 8:33 UTC (permalink / raw)
To: dri-devel; +Cc: sachin.kamat, patches
In-Reply-To: <1356338031-23674-1-git-send-email-sachin.kamat@linaro.org>
devm_* APIs are device managed and get freed automatically when the
device detaches. Thus explicit freeing is not needed. This saves some
code.
Cc: Eunchul Kim <chulspro.kim@samsung.com>
Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
---
drivers/gpu/drm/exynos/exynos_drm_rotator.c | 18 ++++--------------
1 files changed, 4 insertions(+), 14 deletions(-)
diff --git a/drivers/gpu/drm/exynos/exynos_drm_rotator.c b/drivers/gpu/drm/exynos/exynos_drm_rotator.c
index 1c23660..0f168449 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_rotator.c
+++ b/drivers/gpu/drm/exynos/exynos_drm_rotator.c
@@ -657,29 +657,26 @@ static int __devinit rotator_probe(struct platform_device *pdev)
rot->regs_res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
if (!rot->regs_res) {
dev_err(dev, "failed to find registers\n");
- ret = -ENOENT;
- goto err_get_resource;
+ return -ENOENT;
}
rot->regs = devm_request_and_ioremap(dev, rot->regs_res);
if (!rot->regs) {
dev_err(dev, "failed to map register\n");
- ret = -ENXIO;
- goto err_get_resource;
+ return -ENXIO;
}
rot->irq = platform_get_irq(pdev, 0);
if (rot->irq < 0) {
dev_err(dev, "failed to get irq\n");
- ret = rot->irq;
- goto err_get_irq;
+ return rot->irq;
}
ret = request_threaded_irq(rot->irq, NULL, rotator_irq_handler,
IRQF_ONESHOT, "drm_rotator", rot);
if (ret < 0) {
dev_err(dev, "failed to request irq\n");
- goto err_get_irq;
+ return ret;
}
rot->clock = clk_get(dev, "rotator");
@@ -723,10 +720,6 @@ err_ippdrv_register:
clk_put(rot->clock);
err_clk_get:
free_irq(rot->irq, rot);
-err_get_irq:
- devm_iounmap(dev, rot->regs);
-err_get_resource:
- devm_kfree(dev, rot);
return ret;
}
@@ -743,9 +736,6 @@ static int __devexit rotator_remove(struct platform_device *pdev)
clk_put(rot->clock);
free_irq(rot->irq, rot);
- devm_iounmap(dev, rot->regs);
-
- devm_kfree(dev, rot);
return 0;
}
--
1.7.4.1
^ permalink raw reply related
* [PATCH 06/10] drm/exynos: Remove redundant NULL check in exynos_drm_rotator.c
From: Sachin Kamat @ 2012-12-24 8:33 UTC (permalink / raw)
To: dri-devel; +Cc: sachin.kamat, patches
In-Reply-To: <1356338031-23674-1-git-send-email-sachin.kamat@linaro.org>
devm_request_and_ioremap API checks for NULL. Hence explicit
NULL check is not necessary. Saves some code.
Cc: Eunchul Kim <chulspro.kim@samsung.com>
Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
---
drivers/gpu/drm/exynos/exynos_drm_rotator.c | 5 -----
1 files changed, 0 insertions(+), 5 deletions(-)
diff --git a/drivers/gpu/drm/exynos/exynos_drm_rotator.c b/drivers/gpu/drm/exynos/exynos_drm_rotator.c
index 0f168449..4505163 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_rotator.c
+++ b/drivers/gpu/drm/exynos/exynos_drm_rotator.c
@@ -655,11 +655,6 @@ static int __devinit rotator_probe(struct platform_device *pdev)
platform_get_device_id(pdev)->driver_data;
rot->regs_res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
- if (!rot->regs_res) {
- dev_err(dev, "failed to find registers\n");
- return -ENOENT;
- }
-
rot->regs = devm_request_and_ioremap(dev, rot->regs_res);
if (!rot->regs) {
dev_err(dev, "failed to map register\n");
--
1.7.4.1
^ permalink raw reply related
* [PATCH 07/10] drm/exynos: Use devm_clk_get in exynos_drm_rotator.c
From: Sachin Kamat @ 2012-12-24 8:33 UTC (permalink / raw)
To: dri-devel; +Cc: sachin.kamat, patches
In-Reply-To: <1356338031-23674-1-git-send-email-sachin.kamat@linaro.org>
This eliminates the need for explicit clk_put and makes the
cleanup and exit path code simpler.
Cc: Eunchul Kim <chulspro.kim@samsung.com>
Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
---
drivers/gpu/drm/exynos/exynos_drm_rotator.c | 4 +---
1 files changed, 1 insertions(+), 3 deletions(-)
diff --git a/drivers/gpu/drm/exynos/exynos_drm_rotator.c b/drivers/gpu/drm/exynos/exynos_drm_rotator.c
index 4505163..484c6bd 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_rotator.c
+++ b/drivers/gpu/drm/exynos/exynos_drm_rotator.c
@@ -674,7 +674,7 @@ static int __devinit rotator_probe(struct platform_device *pdev)
return ret;
}
- rot->clock = clk_get(dev, "rotator");
+ rot->clock = devm_clk_get(dev, "rotator");
if (IS_ERR_OR_NULL(rot->clock)) {
dev_err(dev, "failed to get clock\n");
ret = PTR_ERR(rot->clock);
@@ -712,7 +712,6 @@ static int __devinit rotator_probe(struct platform_device *pdev)
err_ippdrv_register:
devm_kfree(dev, ippdrv->prop_list);
pm_runtime_disable(dev);
- clk_put(rot->clock);
err_clk_get:
free_irq(rot->irq, rot);
return ret;
@@ -728,7 +727,6 @@ static int __devexit rotator_remove(struct platform_device *pdev)
exynos_drm_ippdrv_unregister(ippdrv);
pm_runtime_disable(dev);
- clk_put(rot->clock);
free_irq(rot->irq, rot);
--
1.7.4.1
^ permalink raw reply related
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.