* [PATCH 1/2] Version-check libtool correctly when doing an out-of-tree build
From: Simon McVittie @ 2010-10-08 8:06 UTC (permalink / raw)
To: alsa-devel
[-- Attachment #1.1: Type: text/plain, Size: 967 bytes --]
libtool is only created at the end of ./configure, so it doesn't make
sense to grep it in ./configure (the check would always fail the first
time). However, ltmain.sh is copied into the ${srcdir} by libtoolize and
should be safe to check at any time that configure can be run.
Signed-off-by: Simon McVittie <smcv@debian.org>
---
configure.in | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/configure.in b/configure.in
index abc4687..e904956 100644
--- a/configure.in
+++ b/configure.in
@@ -115,7 +115,7 @@ AC_ARG_WITH(versioned,
versioned="$withval", versioned="yes")
if test "$versioned" = "yes"; then
# it seems that GNU ld versions since 2.10 are not broken
- xres=`grep '^VERSION=' libtool | cut -d = -f 2 | cut -d \" -f 2`
+ xres=`grep '^VERSION=' ${srcdir}/ltmain.sh | cut -d = -f 2 | cut -d \" -f 2`
major=`echo $xres | cut -d . -f 1`
minor=`echo $xres | cut -d . -f 2`
pass=0
--
1.7.1
[-- Attachment #1.2: Digital signature --]
[-- Type: application/pgp-signature, Size: 793 bytes --]
[-- Attachment #2: Type: text/plain, Size: 160 bytes --]
_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
^ permalink raw reply related
* RE: [PATCH] ARM: S5P64X0: Replace the 6440 system device class definition with 64x0
From: Kukjin Kim @ 2010-10-08 8:06 UTC (permalink / raw)
To: 'Sangbeom Kim', linux-samsung-soc
Cc: ben-linux, 'Abhilash Kesavan'
In-Reply-To: <1286428163-18685-1-git-send-email-sbkim73@samsung.com>
Sangbeom Kim wrote:
>
> From: Abhilash Kesavan <a.kesavan@samsung.com>
>
> s5p64x0_sysclass should be used in place of the obselete s5p6440_sysclass
>
> Signed-off-by: Abhilash Kesavan <a.kesavan@samsung.com>
> Signed-off-by: Sangbeom Kim <sbkim73@samsung.com>
> ---
> arch/arm/plat-samsung/include/plat/cpu.h | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/arch/arm/plat-samsung/include/plat/cpu.h b/arch/arm/plat-
> samsung/include/plat/cpu.h
> index 6412933..9addb3d 100644
> --- a/arch/arm/plat-samsung/include/plat/cpu.h
> +++ b/arch/arm/plat-samsung/include/plat/cpu.h
> @@ -79,7 +79,7 @@ extern struct sysdev_class s3c2442_sysclass;
> extern struct sysdev_class s3c2443_sysclass;
> extern struct sysdev_class s3c6410_sysclass;
> extern struct sysdev_class s3c64xx_sysclass;
> -extern struct sysdev_class s5p6440_sysclass;
> +extern struct sysdev_class s5p64x0_sysclass;
> extern struct sysdev_class s5p6442_sysclass;
> extern struct sysdev_class s5pv210_sysclass;
>
> --
Ok...will apply.
Thanks.
Best regards,
Kgene.
--
Kukjin Kim <kgene.kim@samsung.com>, Senior Engineer,
SW Solution Development Team, Samsung Electronics Co., Ltd.
^ permalink raw reply
* RE: [PATCH] ARM: S5P64X0: fix gpio rbank support
From: Kukjin Kim @ 2010-10-08 8:05 UTC (permalink / raw)
To: 'Sangbeom Kim', linux-samsung-soc
Cc: ben-linux, 'Atul Dahiya'
In-Reply-To: <1286425239-11632-1-git-send-email-sbkim73@samsung.com>
Sangbeom Kim wrote:
>
> From: Atul Dahiya <atul.dahiya@samsung.com>
>
> The patch removes s3c_gpio_lock/unlock to avoid acquiring the lock
> recursively as lock is already acquired by calling function.
>
> Signed-off-by: Atul Dahiya <atul.dahiya@samsung.com>
> Signed-off-by: Sangbeom Kim <sbkim73@samsung.com>
> ---
> arch/arm/mach-s5p64x0/gpio.c | 4 ----
> 1 files changed, 0 insertions(+), 4 deletions(-)
>
> diff --git a/arch/arm/mach-s5p64x0/gpio.c b/arch/arm/mach-s5p64x0/gpio.c
> index 3073ed0..533c1a3 100644
> --- a/arch/arm/mach-s5p64x0/gpio.c
> +++ b/arch/arm/mach-s5p64x0/gpio.c
> @@ -158,15 +158,11 @@ int s5p64x0_gpio_setcfg_4bit_rbank(struct
> s3c_gpio_chip *chip,
> cfg <<= shift;
> }
>
> - s3c_gpio_lock(chip, flags);
> -
> con = __raw_readl(reg);
> con &= ~(0xf << shift);
> con |= cfg;
> __raw_writel(con, reg);
>
> - s3c_gpio_unlock(chip, flags);
> -
> return 0;
> }
>
> --
Right...will apply.
Thanks.
Best regards,
Kgene.
--
Kukjin Kim <kgene.kim@samsung.com>, Senior Engineer,
SW Solution Development Team, Samsung Electronics Co., Ltd.
^ permalink raw reply
* How to handle FBs for dual monitor
From: han jonghun @ 2010-10-08 8:05 UTC (permalink / raw)
To: linux-fbdev
Hi,
I have a question how to handle dual display controller which controls
FBs and LCD panel.
Many SoCs have single display controller which supports multiple layers.
For example fb1 is for UI and fb0 is for video playback and so on.
So each layer is registered as framebuffer from /dev/fb0 to /dev/fb4.
LCD
------------
fb4
------------
fb3
------------
fb2
------------
fb1
------------
fb0
------------
lower layer
If there are two display controller to support dual display like as
dual monitor on Desk.
Each display controller handles each LCD. In that case /dev/fb0 ~
/dev/fb5 will be used as below.
LCD0 LCD1
------------ ------------
fb2 fb5
------------ ------------
fb1 fb4
------------ ------------
fb0 fb3
------------ ------------
lower layer lower layer
If each FB only sees its own framebuffer, it does not matter.
But sometimes FBs should see the same framebuffer to support dual display.
For example I want to use single 960 x 800 framebuffer to support two
WVGA(480x800) LCDs.
And fb0(layer0@DISP.CON.0) looks at the left side of framebuffer,
fb3(layer0@DISP.CON.1) looks at the right side of framebuffer.
In this case should I handle only single fb(/dev/fb/0) not
two(/dev/fb0, /dev/fb3)?
How can I use dual display like this ? Is there any IOCTL COMMAND to use ?
How can I bind FBs and release the FBs ?
How can desktop support the feature ?
Can anyone help me?
Thanks
Best regards,
Jonhun Han.
^ permalink raw reply
* [PATCH] net_sched: use __TCA_HTB_MAX and TCA_HTB_MAX
From: Changli Gao @ 2010-09-30 16:17 UTC (permalink / raw)
To: Jamal Hadi Salim; +Cc: David S. Miller, netdev, Changli Gao
Signed-off-by: Changli Gao <xiaosuo@gmail.com>
---
net/sched/sch_htb.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/net/sched/sch_htb.c b/net/sched/sch_htb.c
index 4be8d04..87d9449 100644
--- a/net/sched/sch_htb.c
+++ b/net/sched/sch_htb.c
@@ -1302,14 +1302,14 @@ static int htb_change_class(struct Qdisc *sch, u32 classid,
struct htb_class *cl = (struct htb_class *)*arg, *parent;
struct nlattr *opt = tca[TCA_OPTIONS];
struct qdisc_rate_table *rtab = NULL, *ctab = NULL;
- struct nlattr *tb[TCA_HTB_RTAB + 1];
+ struct nlattr *tb[__TCA_HTB_MAX];
struct tc_htb_opt *hopt;
/* extract all subattrs from opt attr */
if (!opt)
goto failure;
- err = nla_parse_nested(tb, TCA_HTB_RTAB, opt, htb_policy);
+ err = nla_parse_nested(tb, TCA_HTB_MAX, opt, htb_policy);
if (err < 0)
goto failure;
^ permalink raw reply related
* Re: [PATCH 15/18] fs: introduce a per-cpu last_ino allocator
From: Dave Chinner @ 2010-10-08 8:05 UTC (permalink / raw)
To: Christoph Hellwig; +Cc: linux-fsdevel, linux-kernel
In-Reply-To: <20101008075320.GA30902@infradead.org>
On Fri, Oct 08, 2010 at 03:53:20AM -0400, Christoph Hellwig wrote:
> > +static unsigned int last_ino_get(void)
>
> Shouldn't this be get_next_ino?
Sure, that sounds better....
Cheers,
Dave.
--
Dave Chinner
david@fromorbit.com
^ permalink raw reply
* Re: [PATCH 14/18] fs: Protect inode->i_state with th einode->i_lock
From: Dave Chinner @ 2010-10-08 8:04 UTC (permalink / raw)
To: Christoph Hellwig; +Cc: linux-fsdevel, linux-kernel
In-Reply-To: <20101008074932.GC24089@infradead.org>
On Fri, Oct 08, 2010 at 03:49:32AM -0400, Christoph Hellwig wrote:
> On Fri, Oct 08, 2010 at 04:21:28PM +1100, Dave Chinner wrote:
> > From: Dave Chinner <dchinner@redhat.com>
> >
> > We currently protect the per-inode state flags with the inode_lock.
> > Using a global lock to protect per-object state is overkill when we
> > coul duse a per-inode lock to protect the state. Use the
> > inode->i_lock for this, and wrap all the state changes and checks
> > with the inode->i_lock.
> >
> > Based on work originally written by Nick Piggin.
>
> > @@ -884,9 +897,9 @@ struct inode *new_inode(struct super_block *sb)
> > inode = alloc_inode(sb);
> > if (inode) {
> > spin_lock(&inode_lock);
> > - __inode_add_to_lists(sb, NULL, inode);
> > inode->i_ino = ++last_ino;
> > inode->i_state = 0;
> > + __inode_add_to_lists(sb, NULL, inode);
> > spin_unlock(&inode_lock);
> > }
> > return inode;
>
> What's the point in doing this move?
hmmmm, let me think on that....
>
> > @@ -953,8 +966,8 @@ static struct inode *get_new_inode(struct super_block *sb,
> > if (set(inode, data))
> > goto set_failed;
> >
> > - __inode_add_to_lists(sb, b, inode);
> > inode->i_state = I_NEW;
> > + __inode_add_to_lists(sb, b, inode);
>
> Same here.
Ah, done thinking now! I was so the i_state field had been set
before the inode was added to various lists and potentially
accessable to other threads. I should probably add a comment to that
effect, right?
> Otherwise it looks good. But all this moving around of i_lock really
> hurts my brain. I guess I'll need to review the placement on a tree
> with the fully applied series again.
Probably best - I didn't get it right the first time, either, when
doing it patch by patch. I had to take that step back to analyse
where i'd screwed it up....
Cheers,
Dave.
--
Dave Chinner
david@fromorbit.com
^ permalink raw reply
* Re: [PATCH] allow 945 to control self refresh automatically
From: Li Peng @ 2010-10-08 8:05 UTC (permalink / raw)
To: Alexander Lam; +Cc: intel-gfx, peng.li
In-Reply-To: <1286235085-29700-1-git-send-email-lambchop468@gmail.com>
[-- Attachment #1.1: Type: text/plain, Size: 5553 bytes --]
Hi, Alexander:
I think you are right that GEN3 hardware CXSR requires enabling low
power render writes.
This patch is OK for me, but DRM_DEBUG_KMS is better than printk.
Acked-by : Li Peng <peng.li@linux.intel.com>
On Mon, 2010-10-04 at 19:31 -0400, Alexander Lam wrote:
> Using 2.6.35.7 (this patch is against drm-intel-next 7dcd249, but untested),
> I changed 945's self refresh to work without the need for the driver to
> enable/disable self refresh manually based on the idle state of the gpu.
> This is much better than enabling/disabling self refresh for various
> reasons, including staying in a lower power state for more time and
> avoiding the need for cpu cycles.
>
> Something must have been fixed in the driver between the initial
> implementation of 945 self refresh and now.
> (maybe 944001201ca0196bcdb088129e5866a9f379d08c: drm/i915: enable low
> power render writes on GEN3 hardware?)
>
> This patch probably doesn't cover all cases concerning if SR should
> be enabled/disabled, not to mention doing things in the wrong order or
> in the wrong place.
>
> It only works with printk statements or replacing the printk's
> with DRM_DEBUG and turning drm debugging on (I don't understand what is
> going on there...).
> ---
> drivers/gpu/drm/i915/intel_display.c | 37 ++++++++++-----------------------
> 1 files changed, 11 insertions(+), 26 deletions(-)
>
>
> differences between files attachment
> (0001-allow-945-to-control-self-refresh-automatically.patch)
>
> diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
> index 69c54c5..97f4d86 100644
> --- a/drivers/gpu/drm/i915/intel_display.c
> +++ b/drivers/gpu/drm/i915/intel_display.c
> @@ -3256,7 +3256,7 @@ static void i9xx_update_wm(struct drm_device *dev, int planea_clock,
> int planea_wm, planeb_wm;
> struct intel_watermark_params planea_params, planeb_params;
> unsigned long line_time_us;
> - int sr_clock, sr_entries = 0;
> + int sr_clock, sr_entries = 0, sr_enabled = 0;
>
> /* Create copies of the base settings for each pipe */
> if (IS_CRESTLINE(dev) || IS_I945GM(dev))
> @@ -3303,8 +3303,11 @@ static void i9xx_update_wm(struct drm_device *dev, int planea_clock,
> if (srwm < 0)
> srwm = 1;
>
> - if (IS_I945G(dev) || IS_I945GM(dev))
> + if (IS_I945G(dev) || IS_I945GM(dev)){
> I915_WRITE(FW_BLC_SELF, FW_BLC_SELF_FIFO_MASK | (srwm & 0xff));
> + printk("enable memory self refresh on 945\n");
> + sr_enabled = 1;
> + }
> else if (IS_I915GM(dev)) {
> /* 915M has a smaller SRWM field */
> I915_WRITE(FW_BLC_SELF, srwm & 0x3f);
> @@ -3313,6 +3316,8 @@ static void i9xx_update_wm(struct drm_device *dev, int planea_clock,
> } else {
> /* Turn off self refresh if both pipes are enabled */
> if (IS_I945G(dev) || IS_I945GM(dev)) {
> + printk("disable memory self refresh on 945\n");
> + sr_enabled = 0;
> I915_WRITE(FW_BLC_SELF, I915_READ(FW_BLC_SELF)
> & ~FW_BLC_SELF_EN);
> } else if (IS_I915GM(dev)) {
> @@ -3332,6 +3337,8 @@ static void i9xx_update_wm(struct drm_device *dev, int planea_clock,
>
> I915_WRITE(FW_BLC, fwater_lo);
> I915_WRITE(FW_BLC2, fwater_hi);
> + if (sr_enabled)
> + I915_WRITE(FW_BLC_SELF, FW_BLC_SELF_EN_MASK | FW_BLC_SELF_EN);
> }
>
> static void i830_update_wm(struct drm_device *dev, int planea_clock, int unused,
> @@ -4828,7 +4835,6 @@ static void intel_idle_update(struct work_struct *work)
> struct drm_device *dev = dev_priv->dev;
> struct drm_crtc *crtc;
> struct intel_crtc *intel_crtc;
> - int enabled = 0;
>
> if (!i915_powersave)
> return;
> @@ -4842,16 +4848,11 @@ static void intel_idle_update(struct work_struct *work)
> if (!crtc->fb)
> continue;
>
> - enabled++;
> intel_crtc = to_intel_crtc(crtc);
> if (!intel_crtc->busy)
> intel_decrease_pllclock(crtc);
> }
>
> - if ((enabled == 1) && (IS_I945G(dev) || IS_I945GM(dev))) {
> - DRM_DEBUG_DRIVER("enable memory self refresh on 945\n");
> - I915_WRITE(FW_BLC_SELF, FW_BLC_SELF_EN_MASK | FW_BLC_SELF_EN);
> - }
>
> mutex_unlock(&dev->struct_mutex);
> }
> @@ -4876,17 +4877,9 @@ void intel_mark_busy(struct drm_device *dev, struct drm_gem_object *obj)
> if (!drm_core_check_feature(dev, DRIVER_MODESET))
> return;
>
> - if (!dev_priv->busy) {
> - if (IS_I945G(dev) || IS_I945GM(dev)) {
> - u32 fw_blc_self;
> -
> - DRM_DEBUG_DRIVER("disable memory self refresh on 945\n");
> - fw_blc_self = I915_READ(FW_BLC_SELF);
> - fw_blc_self &= ~FW_BLC_SELF_EN;
> - I915_WRITE(FW_BLC_SELF, fw_blc_self | FW_BLC_SELF_EN_MASK);
> - }
> + if (!dev_priv->busy)
> dev_priv->busy = true;
> - } else
> + else
> mod_timer(&dev_priv->idle_timer, jiffies +
> msecs_to_jiffies(GPU_IDLE_TIMEOUT));
>
> @@ -4898,14 +4891,6 @@ void intel_mark_busy(struct drm_device *dev, struct drm_gem_object *obj)
> intel_fb = to_intel_framebuffer(crtc->fb);
> if (intel_fb->obj == obj) {
> if (!intel_crtc->busy) {
> - if (IS_I945G(dev) || IS_I945GM(dev)) {
> - u32 fw_blc_self;
> -
> - DRM_DEBUG_DRIVER("disable memory self refresh on 945\n");
> - fw_blc_self = I915_READ(FW_BLC_SELF);
> - fw_blc_self &= ~FW_BLC_SELF_EN;
> - I915_WRITE(FW_BLC_SELF, fw_blc_self | FW_BLC_SELF_EN_MASK);
> - }
> /* Non-busy -> busy, upclock */
> intel_increase_pllclock(crtc);
> intel_crtc->busy = true;
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx
[-- Attachment #1.2: Type: text/html, Size: 6022 bytes --]
[-- Attachment #2: Type: text/plain, Size: 159 bytes --]
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply
* Re: [PATCH 1 of 3] To be able to support arbitrary numbers of physical cpus it was necessary to
From: Juergen Gross @ 2010-10-08 8:03 UTC (permalink / raw)
To: Ian Campbell; +Cc: xen-devel@lists.xensource.com, Stefano Stabellini
In-Reply-To: <1286372485.23155.12849.camel@zakaz.uk.xensource.com>
On 10/06/10 15:41, Ian Campbell wrote:
> On Wed, 2010-10-06 at 12:21 +0100, Stefano Stabellini wrote:
>> On Tue, 5 Oct 2010, Juergen Gross wrote:
>>> diff -r fe3018c6976d -r cfce8e755505 tools/libxl/libxl_internal.h
>>> --- a/tools/libxl/libxl_internal.h Mon Oct 04 12:52:14 2010 +0100
>>> +++ b/tools/libxl/libxl_internal.h Tue Oct 05 14:19:13 2010 +0200
>>> @@ -239,7 +239,6 @@
>>> _hidden char *libxl__domid_to_name(libxl__gc *gc, uint32_t domid);
>>> _hidden char *libxl__poolid_to_name(libxl__gc *gc, uint32_t poolid);
>>>
>>> -
>>> /* holds the CPUID response for a single CPUID leaf
>>> * input contains the value of the EAX and ECX register,
>>> * and each policy string contains a filter to apply to
>>
>> we don't need this change
>>
>>
>>> diff -r fe3018c6976d -r cfce8e755505 tools/libxl/xl_cmdimpl.c
>>> --- a/tools/libxl/xl_cmdimpl.c Mon Oct 04 12:52:14 2010 +0100
>>> +++ b/tools/libxl/xl_cmdimpl.c Tue Oct 05 14:19:13 2010 +0200
>>> @@ -3616,12 +3616,11 @@
>>> static void vcpupin(char *d, const char *vcpu, char *cpu)
>>> {
>>> libxl_vcpuinfo *vcpuinfo;
>>> - libxl_physinfo physinfo;
>>> uint64_t *cpumap = NULL;
>>>
>>> uint32_t vcpuid, cpuida, cpuidb;
>>> char *endptr, *toka, *tokb;
>>> - int i, nb_vcpu, cpusize;
>>> + int i, nb_vcpu, cpusize, cpumapsize;
>>>
>>> vcpuid = strtoul(vcpu,&endptr, 10);
>>> if (vcpu == endptr) {
>>> @@ -3634,12 +3633,13 @@
>>>
>>> find_domain(d);
>>>
>>> - if (libxl_get_physinfo(&ctx,&physinfo) != 0) {
>>> - fprintf(stderr, "libxl_get_physinfo failed.\n");
>>> + if ((cpusize = xc_get_max_cpus(ctx.xch)) == 0) {
>>> + fprintf(stderr, "xc_get_maxcpus failed.\n");
>>> goto vcpupin_out1;
>>> }
>>
>> You shouldn't be calling xc functions directly from xl_cmdimpl.c.
>> The basic rule is: libxl clients (such as xl) shouldn't need to call any
>> library functions other than libxenlight's functions.
>> You can add a libxl_get_max_cpus function though.
>
> Maybe we should add libxl_cpumap_alloc_phys which returns a libxl_cpumap
> big enough to hold all physical CPUs, there are a few places within
> libxl itself which might benefit from this, e.g. libxl_list_cpupool and
> libxl_list_vcpu both call xc_get_max_cpus and then use the result as a
> parameter to libxl_cpumap_alloc.
>
> Actually, given that libxl_cpumap is only ever used for PCPUs perhaps
> alloc should just always return a suitably sized map and there's no need
> for the size parameter to libxl_cpumap_alloc? Is there any plausible
> potential use for a libxl_cpumap of nrVCPU rather than nrPCPU ?
Currently there seems to be no demand for cpumasks larger than nrPCPU.
Changinf libxl_cpumap_alloc to allocate just the correct size seems
appropriate.
I think I'll do this in my planned cpumask rework.
Juergen
--
Juergen Gross Principal Developer Operating Systems
TSP ES&S SWE OS6 Telephone: +49 (0) 89 3222 2967
Fujitsu Technology Solutions e-mail: juergen.gross@ts.fujitsu.com
Domagkstr. 28 Internet: ts.fujitsu.com
D-80807 Muenchen Company details: ts.fujitsu.com/imprint.html
^ permalink raw reply
* Re: [PATCH] fast-import: Allow filemodify to set the root
From: Jonathan Nieder @ 2010-10-08 8:00 UTC (permalink / raw)
To: Johannes Sixt
Cc: Sverre Rabbelier, David Barr, Git Mailing List,
Ramkumar Ramachandra
In-Reply-To: <4CAEC6E6.5000305@viscovery.net>
Some quick answers before I go to sleep.
Johannes Sixt wrote:
> What is the special new thing here? That "" means 'empty string' == 'tree
> at the root'? If so:
Yes.
> 1. Then this is the missing piece in the justification. Then I could buy
> that the observed speed-up is due to the reuse of an existing tree object
> (which avoids parsing it and re-constructing it from its pieces because
> fast-imports syntax didn't allow it otherwise). But it has nothing to do
> with new loose objects (the re-constructed object would be identical to an
> existing one).
If I remember correctly:
Version 1 of the script was similar to filter-branch and used
"git read-tree", "git write-tree", and "git commit-tree" (or something
equivalent). Reconstructing the trees seemed to be a significant overhead,
leading to:
Version 2, which just called "git commit-tree" (or equivalent) repeatedly.
What this patch allows is
Version 3, which is a bit over 20% faster than version 2 and uses fast-import
to write the new commits directly to pack.
That speed-up could be due to avoiding the repeated fork() + exec() +
git startup cost, or avoiding loose objects, or any number of other
things. Without this patch, one could write
Theoretical version 1', which uses cat-file --batch to unpack each
tree and uses fast-import to write commits with the same (recreated)
tree directly to pack. But that would be kind of insane.
> 2. Without this patch, would this syntax create a tree object with a name
> consisting of two double-quotes in the root? Or would it be a syntax
> error?
Syntax error.
> How would one construct such an entry with this patch?
M 040000 <tree id> "\"\""
Thanks again.
^ permalink raw reply
* [U-Boot] [PATCH] Crash in env_relocate_spec() of env_mmc.c
From: Stefano Babic @ 2010-10-08 8:03 UTC (permalink / raw)
To: u-boot
mmc_initialize is not called at the startup if the
relocation takes place and the environment is stored
into a MMC card.
Signed-off-by: Stefano Babic <sbabic@denx.de>
---
arch/arm/lib/board.c | 10 +++++-----
common/env_mmc.c | 11 +++++------
2 files changed, 10 insertions(+), 11 deletions(-)
diff --git a/arch/arm/lib/board.c b/arch/arm/lib/board.c
index 5f2dfd0..704ddcb 100644
--- a/arch/arm/lib/board.c
+++ b/arch/arm/lib/board.c
@@ -775,6 +775,11 @@ void board_init_r (gd_t *id, ulong dest_addr)
nand_init(); /* go init the NAND */
#endif
+#ifdef CONFIG_GENERIC_MMC
+ puts ("MMC: ");
+ mmc_initialize (bd);
+#endif
+
#if defined(CONFIG_CMD_ONENAND)
onenand_init();
#endif
@@ -854,11 +859,6 @@ extern void davinci_eth_set_mac_addr (const u_int8_t *addr);
board_late_init ();
#endif
-#ifdef CONFIG_GENERIC_MMC
- puts ("MMC: ");
- mmc_initialize (gd->bd);
-#endif
-
#ifdef CONFIG_BITBANGMII
bb_miiphy_init();
#endif
diff --git a/common/env_mmc.c b/common/env_mmc.c
index 14203b6..cb7c448 100644
--- a/common/env_mmc.c
+++ b/common/env_mmc.c
@@ -130,24 +130,23 @@ void env_relocate_spec(void)
{
#if !defined(ENV_IS_EMBEDDED)
struct mmc *mmc = find_mmc_device(CONFIG_SYS_MMC_ENV_DEV);
+ char buf[CONFIG_ENV_SIZE];
if (init_mmc_for_env(mmc))
return;
- if (read_env(mmc, CONFIG_ENV_SIZE, CONFIG_ENV_OFFSET, env_ptr))
- return use_default();
-
- if (crc32(0, env_ptr->data, ENV_SIZE) != env_ptr->crc)
+ if (read_env(mmc, CONFIG_ENV_SIZE, CONFIG_ENV_OFFSET, buf))
return use_default();
gd->env_valid = 1;
+
+ env_import(buf, 1);
#endif
}
#if !defined(ENV_IS_EMBEDDED)
static void use_default()
{
- puts ("*** Warning - bad CRC or MMC, using default environment\n\n");
- set_default_env();
+ set_default_env("*** Warning - bad CRC or MMC, using default environment\n\n");
}
#endif
--
1.6.3.3
^ permalink raw reply related
* Re: [PATCH 17/18] fs: icache remove inode_lock
From: Christoph Hellwig @ 2010-10-08 8:03 UTC (permalink / raw)
To: Dave Chinner; +Cc: linux-fsdevel, linux-kernel
In-Reply-To: <1286515292-15882-18-git-send-email-david@fromorbit.com>
On Fri, Oct 08, 2010 at 04:21:31PM +1100, Dave Chinner wrote:
> From: Dave Chinner <dchinner@redhat.com>
>
> All the functionality that the inode_lock protected has now been
> wrapped up in new independent locks and/or functionality. Hence the
> inode_lock does not serve a purpose any longer and hence can now be
> removed.
Might be worth mentioning this also updates the locking / lock order
documenation all over the place.
> --- a/Documentation/filesystems/Locking
> +++ b/Documentation/filesystems/Locking
> @@ -114,7 +114,7 @@ alloc_inode:
> destroy_inode:
> dirty_inode: (must not sleep)
> write_inode:
> -drop_inode: !!!inode_lock!!!
> +drop_inode: !!!i_lock, sb_inode_list_lock!!!
sb_inode_list_lock now is sb->s_inodes_lock, this also applies in a few
other places.
> +[mandatory]
> + inode_lock is gone, replaced by fine grained locks. See fs/inode.c
> +for details of what locks to replace inode_lock with in order to protect
> +particular things. Most of the time, a filesystem only needs ->i_lock, which
> +protects *all* the inode state and its membership on lists that was
> +previously protected with inode_lock.
Which list membership does i_lock protect?
> --- a/fs/notify/inode_mark.c
> +++ b/fs/notify/inode_mark.c
> @@ -22,7 +22,7 @@
> #include <linux/module.h>
> #include <linux/mutex.h>
> #include <linux/spinlock.h>
> -#include <linux/writeback.h> /* for inode_lock */
> +#include <linux/writeback.h>
Do we still need writeback.h here?
> @@ -76,7 +76,7 @@
> #include <linux/buffer_head.h>
> #include <linux/capability.h>
> #include <linux/quotaops.h>
> -#include <linux/writeback.h> /* for inode_lock, oddly enough.. */
> +#include <linux/writeback.h>
Same here.
Otherwise looks good,
Reviewed-by: Christoph Hellwig <hch@lst.de>
^ permalink raw reply
* [PATCH] i.MX35: use the correct IIM register to get CPU revision
From: Eric Bénard @ 2010-10-08 8:02 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <1286523290-25321-3-git-send-email-u.kleine-koenig@pengutronix.de>
instead of using ROM_SI_REV use IIM's Silicon Revision register
as described in :
- Reference Manual 29.3.3.10
- RM Errata 29.3.3.9.13
Signed-off-by: Eric B?nard <eric@eukrea.com>
---
arch/arm/mach-mx3/clock-imx35.c | 1 +
arch/arm/mach-mx3/cpu.c | 23 +++++++++--------------
arch/arm/plat-mxc/include/mach/mx35.h | 8 +++-----
3 files changed, 13 insertions(+), 19 deletions(-)
diff --git a/arch/arm/mach-mx3/clock-imx35.c b/arch/arm/mach-mx3/clock-imx35.c
index 85884c7..f7cec59 100644
--- a/arch/arm/mach-mx3/clock-imx35.c
+++ b/arch/arm/mach-mx3/clock-imx35.c
@@ -535,6 +535,7 @@ int __init mx35_clocks_init()
__raw_writel(cgr2, CCM_BASE + CCM_CGR2);
__raw_writel(cgr3, CCM_BASE + CCM_CGR3);
+ clk_enable(&iim_clk);
mx35_read_cpu_rev();
mxc_timer_init(&gpt_clk,
diff --git a/arch/arm/mach-mx3/cpu.c b/arch/arm/mach-mx3/cpu.c
index db7af50..d00a754 100644
--- a/arch/arm/mach-mx3/cpu.c
+++ b/arch/arm/mach-mx3/cpu.c
@@ -59,31 +59,26 @@ void __init mx31_read_cpu_rev(void)
unsigned int mx35_cpu_rev;
EXPORT_SYMBOL(mx35_cpu_rev);
-#define MX35_ROM_SI_REV 0x40
-
void __init mx35_read_cpu_rev(void)
{
- void __iomem *rom = ioremap(MX35_IROM_BASE_ADDR, MX35_IROM_SIZE);
u32 rev;
char *srev = "unknown";
- if (!rom)
- return;
-
- rev = readl(rom + MX35_ROM_SI_REV);
+ rev = __raw_readl(MX35_IO_ADDRESS(MX35_IIM_BASE_ADDR + MXC_IIMSREV));
switch (rev) {
- case 0x1:
- mx35_cpu_rev = MX35_CHIP_REV_1_0;
+ case 0x00:
+ mx35_cpu_rev = MX3x_CHIP_REV_1_0;
srev = "1.0";
break;
- case 0x2:
- mx35_cpu_rev = MX35_CHIP_REV_2_0;
+ case 0x10:
+ mx35_cpu_rev = MX3x_CHIP_REV_2_0;
srev = "2.0";
break;
+ case 0x11:
+ mx35_cpu_rev = MX3x_CHIP_REV_2_1;
+ srev = "2.1";
+ break;
}
printk(KERN_INFO "CPU identified as i.MX35, silicon rev %s\n", srev);
-
- iounmap(rom);
}
-
diff --git a/arch/arm/plat-mxc/include/mach/mx35.h b/arch/arm/plat-mxc/include/mach/mx35.h
index d1675ae..92794be 100644
--- a/arch/arm/plat-mxc/include/mach/mx35.h
+++ b/arch/arm/plat-mxc/include/mach/mx35.h
@@ -70,6 +70,8 @@
#define MX35_CAN1_BASE_ADDR (MX35_AIPS2_BASE_ADDR + 0xe4000)
#define MX35_CAN2_BASE_ADDR (MX35_AIPS2_BASE_ADDR + 0xe8000)
#define MX35_RTIC_BASE_ADDR (MX35_AIPS2_BASE_ADDR + 0xec000)
+#define MX35_IIM_BASE_ADDR (MX35_AIPS2_BASE_ADDR + 0xf0000)
+
#define MX35_OTG_BASE_ADDR 0x53ff4000
#define MX35_ROMP_BASE_ADDR 0x60000000
@@ -182,11 +184,7 @@
#define MX35_PROD_SIGNATURE 0x1 /* For MX31 */
-/* silicon revisions specific to i.MX35 */
-#define MX35_CHIP_REV_1_0 0x1
-#define MX35_CHIP_REV_2_0 0x2
-
-#define MX35_SYSTEM_REV_MIN MX35_CHIP_REV_1_0
+#define MX35_SYSTEM_REV_MIN MX3x_CHIP_REV_1_0
#define MX35_SYSTEM_REV_NUM 3
#ifdef IMX_NEEDS_DEPRECATED_SYMBOLS
--
1.7.0.4
^ permalink raw reply related
* Re: [PATCH 13/18] fs: split locking of inode writeback and LRU lists
From: Dave Chinner @ 2010-10-08 8:00 UTC (permalink / raw)
To: Christoph Hellwig; +Cc: linux-fsdevel, linux-kernel
In-Reply-To: <20101008074243.GB24089@infradead.org>
On Fri, Oct 08, 2010 at 03:42:43AM -0400, Christoph Hellwig wrote:
> On Fri, Oct 08, 2010 at 04:21:27PM +1100, Dave Chinner wrote:
> > From: Dave Chinner <dchinner@redhat.com>
> >
> > Now that the inode LRU and IO lists are split apart, we can separate
> > the locking for them. The IO lists are only ever accessed in the
> > context of writeback, so a per-BDI lock for those lists separates
> > them out nicely.
>
> I think this description needs some updates. It seems like it's from
> Nick's original patch that splits the lock, but at this point we still
> have inode_lock anyway.
Ok, will do.
> > -static inline struct backing_dev_info *inode_to_bdi(struct inode *inode)
> > -{
> > - struct super_block *sb = inode->i_sb;
> > -
> > - if (strcmp(sb->s_type->name, "bdev") == 0)
> > - return inode->i_mapping->a_bdi;
> > -
> > - return sb->s_bdi;
> > -}
>
> Please don't extent the scope of this one. Just add a new inode_wb_del
> or similar helper to remove and inode from the writeback list.
OK, will do.
> > @@ -484,7 +483,7 @@ static int writeback_sb_inodes(struct super_block *sb, struct bdi_writeback *wb,
> > return 0;
> > }
> >
> > - if (inode->i_state & (I_NEW | I_WILL_FREE)) {
> > + if (inode->i_state & (I_NEW | I_WILL_FREE | I_FREEING)) {
> > requeue_io(inode);
> > continue;
> > }
>
> What does this have to do with the rest of the patch?
That's because there's now a window between setting I_FREEING and taking
the inode off the writeback list which means that we can see inodes
in that state here. Generally it means that the code setting
I_FREEING is spinning waiting for the wb->b_lock that this thread
currently holds so it can be removed from the list.. Hence the requeue
to move the inode out of the way and keep processing inodes for
writeback.
> > @@ -495,8 +494,11 @@ static int writeback_sb_inodes(struct super_block *sb, struct bdi_writeback *wb,
> > if (inode_dirtied_after(inode, wbc->wb_start))
> > return 1;
> >
> > - BUG_ON(inode->i_state & I_FREEING);
> > + spin_lock(&inode->i_lock);
> > iref_locked(inode);
> > + spin_unlock(&inode->i_lock);
>
> Shouldn't this become a plain iref now?
No, because we're holding the inode_lock here. And later, the lock
get moved to protect the i_state fields as well, so it would end up
this way, anyway.
> > +/*
> > + * check against I_FREEING as inode writeback completion could race with
> > + * setting the I_FREEING and removing the inode from the LRU.
> > + */
> > +void inode_lru_list_add(struct inode *inode)
> > +{
> > + spin_lock(&inode_lru_lock);
> > + if (list_empty(&inode->i_lru) && !(inode->i_state & I_FREEING)) {
> > + list_add(&inode->i_lru, &inode_lru);
> > + percpu_counter_inc(&nr_inodes_unused);
> > + }
> > + spin_unlock(&inode_lru_lock);
> > +}
>
> Ah, here you introduce the lru list helpers I suggested earlier. Moving
> them earlier in the series probably is a good idea to avoid exporting
> nr_inodes_unused, even if the locking for the helpers will change in
> this patch.
I'll see what I can do.
Cheers,
Dave.
--
Dave Chinner
david@fromorbit.com
^ permalink raw reply
* Re: [patch] infiniband: uverbs: limit the number of entries
From: Nicolas Palix @ 2010-10-08 7:59 UTC (permalink / raw)
To: Dan Carpenter
Cc: Jason Gunthorpe, Roland Dreier, Sean Hefty, Hal Rosenstock,
linux-rdma, kernel-janitors
In-Reply-To: <20101007165947.GD11681@bicker>
Hi,
On Thu, Oct 7, 2010 at 6:59 PM, Dan Carpenter <error27-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
> On Thu, Oct 07, 2010 at 10:16:49AM -0600, Jason Gunthorpe wrote:
>> On Thu, Oct 07, 2010 at 09:16:10AM +0200, Dan Carpenter wrote:
>> > If we don't limit cmd.ne then the multiplications can overflow. This
>> > will allocate a small amount of RAM successfully for the "resp" and
>> > "wc" buffers. The heap will get corrupted when we call ib_poll_cq().
>>
>> I think you could cap the number of returned entries to
>> UVERBS_MAX_NUM_ENTRIES rather than return EINVAL. That might be more
>> compatible with user space..
>>
>
> Good idea. I don't actually have this hardware, so I can't test it, but
> that definitely sounds reasonable.
>
> If we did that then UVERBS_MAX_NUM_ENTRIES could be lower than 1000.
> What is a reasonable number?
You can also use kcalloc to allocate wc.
>
> regards,
> dan carpenter
>
> --
> To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in
> the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
--
Nicolas Palix
Tel: +33 6 81 07 91 72
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply
* Re: [patch] infiniband: uverbs: limit the number of entries
From: Nicolas Palix @ 2010-10-08 7:59 UTC (permalink / raw)
To: Dan Carpenter
Cc: Jason Gunthorpe, Roland Dreier, Sean Hefty, Hal Rosenstock,
linux-rdma, kernel-janitors
In-Reply-To: <20101007165947.GD11681@bicker>
Hi,
On Thu, Oct 7, 2010 at 6:59 PM, Dan Carpenter <error27@gmail.com> wrote:
> On Thu, Oct 07, 2010 at 10:16:49AM -0600, Jason Gunthorpe wrote:
>> On Thu, Oct 07, 2010 at 09:16:10AM +0200, Dan Carpenter wrote:
>> > If we don't limit cmd.ne then the multiplications can overflow. This
>> > will allocate a small amount of RAM successfully for the "resp" and
>> > "wc" buffers. The heap will get corrupted when we call ib_poll_cq().
>>
>> I think you could cap the number of returned entries to
>> UVERBS_MAX_NUM_ENTRIES rather than return EINVAL. That might be more
>> compatible with user space..
>>
>
> Good idea. I don't actually have this hardware, so I can't test it, but
> that definitely sounds reasonable.
>
> If we did that then UVERBS_MAX_NUM_ENTRIES could be lower than 1000.
> What is a reasonable number?
You can also use kcalloc to allocate wc.
>
> regards,
> dan carpenter
>
> --
> To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
--
Nicolas Palix
Tel: +33 6 81 07 91 72
--
To unsubscribe from this list: send the line "unsubscribe kernel-janitors" 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
* [TopGit PATCH 10/10] [RFC] tg-patch: simulate mnemonic prefixes
From: Bert Wesarg @ 2010-10-08 7:58 UTC (permalink / raw)
To: Uwe Kleine-Koenig; +Cc: git, pasky, martin f krafft, Bert Wesarg
In-Reply-To: <160b8b0eb6152da98f4fa633ac25c7a25ff32aa4.1286524446.git.bert.wesarg@googlemail.com>
b/ is for base, i/ and w/ correspond to -i/-w and t/ is the committed
topic.
Signed-off-by: Bert Wesarg <bert.wesarg@googlemail.com>
---
tg-patch.sh | 8 ++++++--
1 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/tg-patch.sh b/tg-patch.sh
index dcce672..c8ad723 100644 tg-patch.sh
--- a/tg-patch.sh
+++ b/tg-patch.sh
@@ -6,7 +6,7 @@
name=
head_from=
-
+dst_prefix="t/"
## Parse options
@@ -15,7 +15,8 @@ while [ -n "$1" ]; do
case "$arg" in
-i|-w)
[ -z "$head_from" ] || die "-i and -w are mutually exclusive"
- head_from="$arg";;
+ head_from="$arg"
+ dst_prefix="${arg#-}/";;
-*)
echo "Usage: tg [...] patch [-i | -w] [NAME]" >&2
exit 1;;
@@ -72,6 +73,9 @@ if [ $b_tree = $t_tree ]; then
else
# use the ui diff command when the pager is active
diff_command=diff
+ if $(git config --bool diff.mnemonicprefix); then
+ diff_command="$diff_command --src-prefix=b/ --dst-prefix=$dst_prefix"
+ fi
[ "x$GIT_PAGER_IN_USE" = "x1" ] ||
diff_command=diff-tree
--
1.7.1.1067.g5aeb7
^ permalink raw reply related
* [TopGit PATCH 09/10] [RFC] tg-patch: use ui diff when pager is active
From: Bert Wesarg @ 2010-10-08 7:58 UTC (permalink / raw)
To: Uwe Kleine-Koenig; +Cc: git, pasky, martin f krafft, Bert Wesarg
In-Reply-To: <160b8b0eb6152da98f4fa633ac25c7a25ff32aa4.1286524446.git.bert.wesarg@googlemail.com>
Signed-off-by: Bert Wesarg <bert.wesarg@googlemail.com>
---
tg-patch.sh | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletions(-)
diff --git a/tg-patch.sh b/tg-patch.sh
index 9def6e5..dcce672 100644 tg-patch.sh
--- a/tg-patch.sh
+++ b/tg-patch.sh
@@ -70,7 +70,12 @@ t_tree=$(pretty_tree "$name" $head_from)
if [ $b_tree = $t_tree ]; then
echo "No changes."
else
- git diff-tree -p --stat $b_tree $t_tree
+ # use the ui diff command when the pager is active
+ diff_command=diff
+ [ "x$GIT_PAGER_IN_USE" = "x1" ] ||
+ diff_command=diff-tree
+
+ git $diff_command -p --stat $b_tree $t_tree
fi
echo '-- '
--
1.7.1.1067.g5aeb7
^ permalink raw reply related
* [TopGit PATCH 08/10] tg-prev/tg-next: commands to explore dependencies
From: Bert Wesarg @ 2010-10-08 7:58 UTC (permalink / raw)
To: Uwe Kleine-Koenig; +Cc: git, pasky, martin f krafft, Bert Wesarg
In-Reply-To: <160b8b0eb6152da98f4fa633ac25c7a25ff32aa4.1286524446.git.bert.wesarg@googlemail.com>
Two new commands to explore the dependencies of TopGit branches:
a) tg prev [-i | -w] [NAME]
outputs the dependencies of NAME
b) tg next [-i | -w] [NAME]
outputs branches which depends on NAME
Obviously, quilt next was the inspiration.
Signed-off-by: Bert Wesarg <bert.wesarg@googlemail.com>
---
.gitignore | 4 +++
README | 18 ++++++++++++++++-
contrib/tg-completion.bash | 34 +++++++++++++++++++++++++++++++++
tg-next.sh | 45 ++++++++++++++++++++++++++++++++++++++++++++
tg-prev.sh | 38 +++++++++++++++++++++++++++++++++++++
5 files changed, 138 insertions(+), 1 deletions(-)
create mode 100644 tg-next.sh
create mode 100644 tg-prev.sh
diff --git a/.gitignore b/.gitignore
index 2a4d165..6cfab6e 100644 .gitignore
--- a/.gitignore
+++ b/.gitignore
@@ -30,10 +30,14 @@
/tg-info.txt
/tg-mail
/tg-mail.txt
+/tg-next
+/tg-next.txt
/tg-log
/tg-log.txt
/tg-patch
/tg-patch.txt
+/tg-prev
+/tg-prev.txt
/tg-push
/tg-push.txt
/tg-remote
diff --git a/README b/README
index 552a2f1..3b6d0fd 100644 README
--- a/README
+++ b/README
@@ -540,8 +540,24 @@ tg files
-i list files based on index instead of branch
-w list files based on working tree instead of branch
-TODO: tg rename
+tg prev
+~~~~~~~
+ Outputs the direct dependencies for the current or named patch.
+ Options:
+ -i show dependencies based on index instead of branch
+ -w show dependencies based on working tree instead of branch
+
+tg next
+~~~~~~~
+ Outputs all patches which directly depend on the current or
+ named patch.
+
+ Options:
+ -i show dependencies based on index instead of branch
+ -w show dependencies based on working tree instead of branch
+
+TODO: tg rename
IMPLEMENTATION
--------------
diff --git a/contrib/tg-completion.bash b/contrib/tg-completion.bash
index eff85ee..e468474 100755 contrib/tg-completion.bash
--- a/contrib/tg-completion.bash
+++ b/contrib/tg-completion.bash
@@ -445,6 +445,38 @@ _tg_update ()
esac
}
+_tg_next ()
+{
+ local cur="${COMP_WORDS[COMP_CWORD]}"
+
+ case "$cur" in
+ -*)
+ __tgcomp "
+ -i
+ -w
+ "
+ ;;
+ *)
+ __tgcomp "$(__tg_heads)"
+ esac
+}
+
+_tg_prev ()
+{
+ local cur="${COMP_WORDS[COMP_CWORD]}"
+
+ case "$cur" in
+ -*)
+ __tgcomp "
+ -i
+ -w
+ "
+ ;;
+ *)
+ __tgcomp "$(__tg_topics)"
+ esac
+}
+
### }}}
### {{{ tg completion
@@ -492,7 +524,9 @@ _tg ()
info) _tg_info ;;
log) _tg_log ;;
mail) _tg_mail ;;
+ next) _tg_next ;;
patch) _tg_patch ;;
+ prev) _tg_prev ;;
push) _tg_push ;;
remote) _tg_remote ;;
summary) _tg_summary ;;
diff --git a/tg-next.sh b/tg-next.sh
new file mode 100644
index 0000000..93dd5b5 tg-next.sh
--- /dev/null
+++ b/tg-next.sh
@@ -0,0 +1,45 @@
+#!/bin/sh
+# TopGit - A different patch queue manager
+# (c) Petr Baudis <pasky@suse.cz> 2008
+# (c) Bert Wesarg <Bert.Wesarg@googlemail.com> 2009
+# GPLv2
+
+name=
+head_from=
+
+
+## Parse options
+
+while [ -n "$1" ]; do
+ arg="$1"; shift
+ case "$arg" in
+ -i|-w)
+ [ -z "$head_from" ] || die "-i and -w are mutually exclusive"
+ head_from="$arg";;
+ -*)
+ echo "Usage: tg next [-i | -w] [NAME]" >&2
+ exit 1;;
+ *)
+ [ -z "$name" ] || die "name already specified ($name)"
+ name="$arg";;
+ esac
+done
+
+head="$(git rev-parse --abbrev-ref=loose HEAD)"
+[ -n "$name" ] ||
+ name="$head"
+
+git for-each-ref --format='%(refname)' refs/top-bases |
+ while read ref; do
+ parent="${ref#refs/top-bases/}"
+
+ from=$head_from
+ # select .topdeps source for HEAD branch
+ [ "x$parent" = "x$head" ] ||
+ from=
+
+ cat_file "$parent:.topdeps" $from | fgrep -qx "$name" ||
+ continue
+
+ echo "$parent"
+ done
diff --git a/tg-prev.sh b/tg-prev.sh
new file mode 100644
index 0000000..1f1e0c1 tg-prev.sh
--- /dev/null
+++ b/tg-prev.sh
@@ -0,0 +1,38 @@
+#!/bin/sh
+# TopGit - A different patch queue manager
+# (c) Petr Baudis <pasky@suse.cz> 2008
+# (c) Bert Wesarg <Bert.Wesarg@googlemail.com> 2009
+# GPLv2
+
+name=
+head_from=
+
+
+## Parse options
+
+while [ -n "$1" ]; do
+ arg="$1"; shift
+ case "$arg" in
+ -i|-w)
+ [ -z "$head_from" ] || die "-i and -w are mutually exclusive"
+ head_from="$arg";;
+ -*)
+ echo "Usage: tg next [-i | -w] [NAME]" >&2
+ exit 1;;
+ *)
+ [ -z "$name" ] || die "name already specified ($name)"
+ name="$arg";;
+ esac
+done
+
+head="$(git rev-parse --abbrev-ref=loose HEAD)"
+[ -n "$name" ] ||
+ name="$head"
+base_rev="$(git rev-parse --short --verify "refs/top-bases/$name" 2>/dev/null)" ||
+ die "not a TopGit-controlled branch"
+
+# select .topdeps source for HEAD branch
+[ "x$name" = "x$head" ] ||
+ head_from=
+
+cat_file "$name:.topdeps" $head_from
--
1.7.1.1067.g5aeb7
^ permalink raw reply related
* [TopGit PATCH 07/10] tg-files: list files changed by the topic branch
From: Bert Wesarg @ 2010-10-08 7:58 UTC (permalink / raw)
To: Uwe Kleine-Koenig; +Cc: git, pasky, martin f krafft, Bert Wesarg
In-Reply-To: <160b8b0eb6152da98f4fa633ac25c7a25ff32aa4.1286524446.git.bert.wesarg@googlemail.com>
this could also be a --name-only option to tg-patch. But I Like the
similarity to 'quilt files'.
Signed-off-by: Bert Wesarg <bert.wesarg@googlemail.com>
---
.gitignore | 2 ++
README | 8 ++++++++
contrib/tg-completion.bash | 1 +
tg-files.sh | 43 +++++++++++++++++++++++++++++++++++++++++++
4 files changed, 54 insertions(+), 0 deletions(-)
create mode 100644 tg-files.sh
diff --git a/.gitignore b/.gitignore
index 3298889..2a4d165 100644 .gitignore
--- a/.gitignore
+++ b/.gitignore
@@ -22,6 +22,8 @@
/tg-depend.txt
/tg-export
/tg-export.txt
+/tg-files
+/tg-files.txt
/tg-import
/tg-import.txt
/tg-info
diff --git a/README b/README
index c96dc5a..552a2f1 100644 README
--- a/README
+++ b/README
@@ -532,6 +532,14 @@ tg log
~~~~~~
Prints the git log of the named topgit branch.
+tg files
+~~~~~~~~
+ List files changed by the current or specified topic branch.
+
+ Options:
+ -i list files based on index instead of branch
+ -w list files based on working tree instead of branch
+
TODO: tg rename
diff --git a/contrib/tg-completion.bash b/contrib/tg-completion.bash
index 6a1e182..eff85ee 100755 contrib/tg-completion.bash
--- a/contrib/tg-completion.bash
+++ b/contrib/tg-completion.bash
@@ -486,6 +486,7 @@ _tg ()
delete) _tg_delete ;;
depend) _tg_depend ;;
export) _tg_export ;;
+ files) _tg_patch ;;
help) _tg_help ;;
import) _tg_import ;;
info) _tg_info ;;
diff --git a/tg-files.sh b/tg-files.sh
new file mode 100644
index 0000000..ab97624 tg-files.sh
--- /dev/null
+++ b/tg-files.sh
@@ -0,0 +1,43 @@
+#!/bin/sh
+# TopGit - A different patch queue manager
+# (c) Petr Baudis <pasky@suse.cz> 2008
+# GPLv2
+
+name=
+head_from=
+
+
+## Parse options
+
+while [ -n "$1" ]; do
+ arg="$1"; shift
+ case "$arg" in
+ -i|-w)
+ [ -z "$head_from" ] || die "-i and -w are mutually exclusive"
+ head_from="$arg";;
+ -*)
+ echo "Usage: tg [...] files [-i | -w] [NAME]" >&2
+ exit 1;;
+ *)
+ [ -z "$name" ] || die "name already specified ($name)"
+ name="$arg";;
+ esac
+done
+
+
+head="$(git symbolic-ref HEAD)"
+head="${head#refs/heads/}"
+
+[ -n "$name" ] ||
+ name="$head"
+base_rev="$(git rev-parse --short --verify "refs/top-bases/$name" 2>/dev/null)" ||
+ die "not a TopGit-controlled branch"
+
+if [ -n "$head_from" ] && [ "$name" != "$head" ]; then
+ die "$head_from makes only sense for the current branch"
+fi
+
+b_tree=$(pretty_tree "$name" -b)
+t_tree=$(pretty_tree "$name" $head_from)
+
+git diff-tree --name-only -r $b_tree $t_tree
--
1.7.1.1067.g5aeb7
^ permalink raw reply related
* [TopGit PATCH 06/10] tg-summary: accept -i/-w
From: Bert Wesarg @ 2010-10-08 7:58 UTC (permalink / raw)
To: Uwe Kleine-Koenig
Cc: git, pasky, martin f krafft, Bert Wesarg, Per Cederqvist
In-Reply-To: <160b8b0eb6152da98f4fa633ac25c7a25ff32aa4.1286524446.git.bert.wesarg@googlemail.com>
Signed-off-by: Bert Wesarg <bert.wesarg@googlemail.com>
---
README | 4 ++++
contrib/tg-completion.bash | 4 ++++
tg-summary.sh | 21 +++++++++++++++------
3 files changed, 23 insertions(+), 6 deletions(-)
diff --git a/README b/README
index ce0c3a6..c96dc5a 100644 README
--- a/README
+++ b/README
@@ -362,6 +362,10 @@ tg summary
branches in a machine-readable format. Feed this to "tsort"
to get the output from --sort.
+ Options:
+ -i Use TopGit meta data from the index instead of branch
+ -w Use TopGit meta data from the working tree instead of branch
+
TODO: Speed up by an order of magnitude
TODO: Text graph view
diff --git a/contrib/tg-completion.bash b/contrib/tg-completion.bash
index ccf1a32..6a1e182 100755 contrib/tg-completion.bash
--- a/contrib/tg-completion.bash
+++ b/contrib/tg-completion.bash
@@ -426,7 +426,11 @@ _tg_summary ()
*)
__tgcomp "
--graphviz
+ --sort
+ --deps
-t
+ -i
+ -w
"
esac
}
diff --git a/tg-summary.sh b/tg-summary.sh
index af16888..113efc2 100644 tg-summary.sh
--- a/tg-summary.sh
+++ b/tg-summary.sh
@@ -7,13 +7,16 @@ terse=
graphviz=
sort=
deps=
-
+head_from=
## Parse options
while [ -n "$1" ]; do
arg="$1"; shift
case "$arg" in
+ -i|-w)
+ [ -z "$head_from" ] || die "-i and -w are mutually exclusive"
+ head_from="$arg";;
-t)
terse=1;;
--graphviz)
@@ -23,7 +26,7 @@ while [ -n "$1" ]; do
--deps)
deps=1;;
*)
- echo "Usage: tg [...] summary [-t | --sort | --deps | --graphviz]" >&2
+ echo "Usage: tg [...] summary [-t | --sort | --deps | --graphviz] [-i | -w]" >&2
exit 1;;
esac
done
@@ -69,8 +72,11 @@ process_branch()
current=' '
[ "$name" != "$curname" ] || current='>'
+ from=$head_from
+ [ "$name" = "$curname" ] ||
+ from=
nonempty=' '
- ! branch_empty "$name" || nonempty='0'
+ ! branch_empty "$name" $from || nonempty='0'
remote=' '
[ -z "$base_remote" ] || remote='l'
! has_remote "$name" || remote='r'
@@ -89,7 +95,7 @@ process_branch()
branch_contains "$name" "refs/top-bases/$name" || base_update='B'
if [ "$(git rev-parse "$name")" != "$rev" ]; then
- subject="$(git cat-file blob "$name:.topmsg" | sed -n 's/^Subject: //p')"
+ subject="$(cat_file "$name:.topmsg" $from | sed -n 's/^Subject: //p')"
else
# No commits yet
subject="(No commits)"
@@ -100,7 +106,7 @@ process_branch()
}
if [ -n "$deps" ]; then
- list_deps
+ list_deps $head_from
exit 0
fi
@@ -114,7 +120,10 @@ git for-each-ref refs/top-bases |
if [ -n "$terse" ]; then
echo "$name"
elif [ -n "$graphviz$sort" ]; then
- git cat-file blob "$name:.topdeps" | while read dep; do
+ from=$head_from
+ [ "$name" = "$curname" ] ||
+ from=
+ cat_file "$name:.topdeps" $from | while read dep; do
dep_is_tgish=true
ref_exists "refs/top-bases/$dep" ||
dep_is_tgish=false
--
1.7.1.1067.g5aeb7
^ permalink raw reply related
* [TopGit PATCH 04/10] tg-path: use pretty_tree and diff-tree to generate the patch
From: Bert Wesarg @ 2010-10-08 7:58 UTC (permalink / raw)
To: Uwe Kleine-Koenig; +Cc: git, pasky, martin f krafft, Bert Wesarg
In-Reply-To: <160b8b0eb6152da98f4fa633ac25c7a25ff32aa4.1286524446.git.bert.wesarg@googlemail.com>
Signed-off-by: Bert Wesarg <bert.wesarg@googlemail.com>
---
tg-patch.sh | 55 +++++++++++++++++++++++++++++++------------------------
1 files changed, 31 insertions(+), 24 deletions(-)
diff --git a/tg-patch.sh b/tg-patch.sh
index 5b7386a..9def6e5 100644 tg-patch.sh
--- a/tg-patch.sh
+++ b/tg-patch.sh
@@ -6,8 +6,6 @@
name=
head_from=
-diff_opts=
-diff_committed_only=yes # will be unset for index/worktree
## Parse options
@@ -15,15 +13,9 @@ diff_committed_only=yes # will be unset for index/worktree
while [ -n "$1" ]; do
arg="$1"; shift
case "$arg" in
- -i)
+ -i|-w)
[ -z "$head_from" ] || die "-i and -w are mutually exclusive"
- head_from=-i
- diff_opts="$diff_opts --cached";
- diff_committed_only=;;
- -w)
- [ -z "$head_from" ] || die "-i and -w are mutually exclusive"
- head_from=-w
- diff_committed_only=;;
+ head_from="$arg";;
-*)
echo "Usage: tg [...] patch [-i | -w] [NAME]" >&2
exit 1;;
@@ -49,22 +41,37 @@ fi
setup_pager
-cat_file "$name:.topmsg" $head_from
-echo
-[ -n "$(git grep $diff_opts '^[-]--' ${diff_committed_only:+"$name"} -- ".topmsg")" ] || echo '---'
-
-# Evil obnoxious hack to work around the lack of git diff --exclude
-git_is_stupid="$(mktemp -t tg-patch-changes.XXXXXX)"
-git diff --name-only $diff_opts "$base_rev" ${diff_committed_only:+"$name"} -- |
- fgrep -vx ".topdeps" |
- fgrep -vx ".topmsg" >"$git_is_stupid" || : # fgrep likes to fail randomly?
-if [ -s "$git_is_stupid" ]; then
- cd "$root_dir"
- cat "$git_is_stupid" | xargs git diff -a --patch-with-stat $diff_opts "$base_rev" ${diff_committed_only:+"$name"} --
-else
+
+# put out the commit message
+# and put an empty line out, if the last one in the message was not an empty line
+# and put out "---" if the commit message does not have one yet
+cat_file "$name:.topmsg" $head_from |
+ awk '
+/^---/ {
+ has_3dash=1;
+}
+ {
+ need_empty = 1;
+ if ($0 == "")
+ need_empty = 0;
+ print;
+}
+END {
+ if (need_empty)
+ print "";
+ if (!has_3dash)
+ print "---";
+}
+'
+
+b_tree=$(pretty_tree "$name" -b)
+t_tree=$(pretty_tree "$name" $head_from)
+
+if [ $b_tree = $t_tree ]; then
echo "No changes."
+else
+ git diff-tree -p --stat $b_tree $t_tree
fi
-rm "$git_is_stupid"
echo '-- '
echo "tg: ($base_rev..) $name (depends on: $(cat_file "$name:.topdeps" $head_from | paste -s -d' '))"
--
1.7.1.1067.g5aeb7
^ permalink raw reply related
* [TopGit PATCH 05/10] list_deps: accept -i/-w
From: Bert Wesarg @ 2010-10-08 7:58 UTC (permalink / raw)
To: Uwe Kleine-Koenig
Cc: git, pasky, martin f krafft, Bert Wesarg, Per Cederqvist
In-Reply-To: <160b8b0eb6152da98f4fa633ac25c7a25ff32aa4.1286524446.git.bert.wesarg@googlemail.com>
Signed-off-by: Bert Wesarg <bert.wesarg@googlemail.com>
---
tg.sh | 11 +++++++++--
1 files changed, 9 insertions(+), 2 deletions(-)
diff --git a/tg.sh b/tg.sh
index a166a70..72ee9f5 100644 tg.sh
--- a/tg.sh
+++ b/tg.sh
@@ -289,9 +289,13 @@ branch_empty()
[ "$(pretty_tree "$1" -b)" = "$(pretty_tree "$1" ${2-})" ]
}
-# list_deps
+# list_deps [-i | -w]
+# -i/-w apply only to HEAD
list_deps()
{
+ head="$(git symbolic-ref HEAD)"
+ head="${head#refs/heads/}"
+
git for-each-ref refs/top-bases |
while read rev type ref; do
name="${ref#refs/top-bases/}"
@@ -299,7 +303,10 @@ list_deps()
continue;
fi
- git cat-file blob "$name:.topdeps" | while read dep; do
+ from=$head_from
+ [ "$name" = "$head" ] ||
+ from=
+ cat_file "$name:.topdeps" $from | while read dep; do
dep_is_tgish=true
ref_exists "refs/top-bases/$dep" ||
dep_is_tgish=false
--
1.7.1.1067.g5aeb7
^ permalink raw reply related
* [TopGit PATCH 03/10] branch_empty: use pretty_tree and therefore respect -i/-w
From: Bert Wesarg @ 2010-10-08 7:58 UTC (permalink / raw)
To: Uwe Kleine-Koenig; +Cc: git, pasky, martin f krafft, Bert Wesarg
In-Reply-To: <160b8b0eb6152da98f4fa633ac25c7a25ff32aa4.1286524446.git.bert.wesarg@googlemail.com>
Signed-off-by: Bert Wesarg <bert.wesarg@googlemail.com>
---
tg.sh | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/tg.sh b/tg.sh
index 308ed28..a166a70 100644 tg.sh
--- a/tg.sh
+++ b/tg.sh
@@ -283,10 +283,10 @@ needs_update()
recurse_deps branch_needs_update "$@"
}
-# branch_empty NAME
+# branch_empty NAME [-i | -w]
branch_empty()
{
- [ -z "$(git diff-tree "refs/top-bases/$1" "$1" -- | fgrep -v " .top")" ]
+ [ "$(pretty_tree "$1" -b)" = "$(pretty_tree "$1" ${2-})" ]
}
# list_deps
--
1.7.1.1067.g5aeb7
^ permalink raw reply related
* [TopGit PATCH 02/10] pretty_tree: globalize and respect -i/-w options
From: Bert Wesarg @ 2010-10-08 7:58 UTC (permalink / raw)
To: Uwe Kleine-Koenig; +Cc: git, pasky, martin f krafft, Bert Wesarg
In-Reply-To: <160b8b0eb6152da98f4fa633ac25c7a25ff32aa4.1286524446.git.bert.wesarg@googlemail.com>
Signed-off-by: Bert Wesarg <bert.wesarg@googlemail.com>
---
tg-export.sh | 13 ++-----------
tg.sh | 47 +++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 49 insertions(+), 11 deletions(-)
diff --git a/tg-export.sh b/tg-export.sh
index 6d82d55..5c707ce 100644 tg-export.sh
--- a/tg-export.sh
+++ b/tg-export.sh
@@ -63,15 +63,6 @@ trap 'rm -rf "$playground"' EXIT
## Collapse driver
-# pretty_tree NAME
-# Output tree ID of a cleaned-up tree without tg's artifacts.
-pretty_tree()
-{
- git ls-tree --full-tree "$1" \
- | awk -F ' ' '$2 !~ /^.top/' \
- | git mktree
-}
-
create_tg_commit()
{
name="$1"
@@ -112,7 +103,7 @@ collapsed_commit()
echo "TopGit-driven merge of branches:"
echo
cut -f 2 "$playground/$name^parents"
- } | git commit-tree "$(pretty_tree "refs/top-bases/$name")" \
+ } | git commit-tree "$(pretty_tree "$name" -b)" \
$(for p in $parent; do echo -p $p; done))"
fi
@@ -227,7 +218,7 @@ linearize()
else
retmerge=0;
- git merge-recursive "$(pretty_tree "refs/top-bases/$_dep")" -- HEAD "$(pretty_tree "refs/heads/$_dep")" || retmerge="$?";
+ git merge-recursive "$(pretty_tree "$_dep" -b)" -- HEAD "$(pretty_tree "refs/heads/$_dep")" || retmerge="$?";
if test "x$retmerge" != "x0"; then
git rerere;
diff --git a/tg.sh b/tg.sh
index 4d7d4ef..308ed28 100644 tg.sh
--- a/tg.sh
+++ b/tg.sh
@@ -42,6 +42,53 @@ cat_file()
esac
}
+# get tree for the committed topic
+get_tree_()
+{
+ echo "$1"
+}
+
+# get tree for the base
+get_tree_b()
+{
+ echo "refs/top-bases/$1"
+}
+
+# get tree for the index
+get_tree_i()
+{
+ git write-tree
+}
+
+# get tree for the worktree
+get_tree_w()
+{
+ i_tree=$(git write-tree)
+ (
+ # the file for --index-output needs to sit next to the
+ # current index file
+ : ${GIT_INDEX_FILE:="$git_dir/index"}
+ TMP_INDEX="$(mktemp "${GIT_INDEX_FILE}-tg.XXXXXX")"
+ git read-tree -m $i_tree --index-output="$TMP_INDEX" &&
+ GIT_INDEX_FILE="$TMP_INDEX" &&
+ export GIT_INDEX_FILE &&
+ git diff --name-only -z HEAD |
+ git update-index -z --add --remove --stdin &&
+ git write-tree &&
+ rm -f "$TMP_INDEX"
+ )
+}
+
+# pretty_tree NAME [-b | -i | -w]
+# Output tree ID of a cleaned-up tree without tg's artifacts.
+# NAME will be ignored for -i and -w, but needs to be present
+pretty_tree()
+{
+ git ls-tree --full-tree "$(get_tree_${2#-} "$1")" |
+ awk -F ' ' '$2 !~ /^.top/' |
+ git mktree
+}
+
# setup_hook NAME
setup_hook()
{
--
1.7.1.1067.g5aeb7
^ 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.