* Re: pvops Dom0 graphics doesnt work with Intel i915
From: sanjay kushwaha @ 2010-10-07 19:12 UTC (permalink / raw)
To: Konrad Rzeszutek Wilk; +Cc: Jeremy Fitzhardinge, xen-devel
In-Reply-To: <20101007180518.GA11383@dumpdata.com>
[-- Attachment #1.1: Type: text/plain, Size: 10805 bytes --]
Hi Konrad,
Unfortunately T410 doesnt have a serial port and neither does the docking
station. I havent had any success with USB-to-Serial port dongles in the
past. is there any way to get the serial port output?
Thanks,
Sanjay
On Thu, Oct 7, 2010 at 11:05 AM, Konrad Rzeszutek Wilk <
konrad.wilk@oracle.com> wrote:
> On Thu, Oct 07, 2010 at 10:36:34AM -0700, sanjay kushwaha wrote:
> > Hi Konrad,
> > I tried your tree. It created a 2.6.32.15 based pvops kernel but graphics
> > with VT-d still doesn't work. when I give iommu=0 on xen kernel command
> line
> > in grub menu, graphics works but with iommu=1 it doesnt work (The whole
> > screen is garbage).
>
> Are there any warnings/debug messages in the serial log? Please follow
> the PVOPS Wiki on how to enable all the debug options.
> >
> >
> > On Wed, Oct 6, 2010 at 6:07 PM, Konrad Rzeszutek Wilk <
> > konrad.wilk@oracle.com> wrote:
> >
> > > On Wed, Oct 06, 2010 at 04:02:51PM -0700, sanjay kushwaha wrote:
> > > > Thanks Pasi.
> > > >
> > > > Hi Konrad,
> > > > Could you please let me know how to get these backported drivers as
> > > > indicated by Pasi? This is the tree that I have.
> > >
> > > Just follow the Wiki. Oh, I need to update it.
> > >
> > > Here do this:
> > >
> > > git remote add konrad git://
> > > git.kernel.org/pub/scm/linux/kernel/git/konrad/xen.git
> > >
> > > git pull konrad
> > > git checkout konrad/devel/next.drm
> > >
> > > make
> > >
> > > >
> > > > [evans@vwifi0 linux-2.6.32.x]$ git show
> > > > commit b297cdac0373625d3cd0e6f2b393570dcf2edba6
> > > > Merge: c6cfd01 64392f6
> > > > Author: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
> > > > Date: Mon Sep 13 14:27:24 2010 -0700
> > > >
> > > > Merge branch 'xen/next' into xen/next-2.6.32
> > > >
> > > > * xen/next:
> > > > xen/netfront: Fix another potential race condition
> > > > Revert "xen/netfront: default smartpoll to on"
> > > >
> > > > [evans@vwifi0 linux-2.6.32.x]$
> > > >
> > > >
> > > > Thanks,
> > > > Sanjay
> > > >
> > > > On Wed, Oct 6, 2010 at 1:12 PM, Pasi Kärkkäinen <pasik@iki.fi>
> wrote:
> > > >
> > > > > On Wed, Oct 06, 2010 at 10:50:57AM -0700, sanjay kushwaha wrote:
> > > > > > Hi,
> > > > > > I have run into more problems now. This time with VT-d.
> > > > > > When I enable VT-d on this laptop, graphics again stops
> working in
> > > > > dom0
> > > > > > with pvops (linux 2.6.32.21). the screen starts showing
> garbage as
> > > > > soon as
> > > > > > it switches into graphics mode.this happens when I boot the
> pvops
> > > > > kernel
> > > > > > both as dom0 and native linux. However, when I try 2.6.33
> based
> > > pvops
> > > > > > kernel (stable-2.6.33.x) graphics seems to work fine with VT-d
> > > when
> > > > > > running native but it doesnt work when running as Dom0.
> > > > > >
> > > > > > so now the problem is:
> > > > > >
> > > > > > with stable-2.6.32.x: graphics works in Dom0 without Vt-d but
> not
> > > with
> > > > > > VT-d (neither native nor Dom0).
> > > > > > with stable-2.6.33.x: graphics works with VT-d when running
> native
> > > but
> > > > > > doesnt work when running as Dom0 (with or without VT-d).
> > > > > >
> > > > >
> > > > > stable-2.6.33.x is not maintained, and you shouldn't use it.
> > > > >
> > > > > I think Konrad has a backport of the 2.6.34 drm/dri drivers
> > > > > to stable-2.6.32.x somewhere.. that might help.
> > > > >
> > > > > http://wiki.xensource.com/xenwiki/XenPVOPSDRM
> > > > >
> > > > > -- Pasi
> > > > >
> > > > > > I am experiencing this problem both with Lenovo T410, and Dell
> > > > > latitude
> > > > > > E6410.
> > > > > > Has anybody experienced this problem?
> > > > > >
> > > > > > Thanks,
> > > > > > Sanjay
> > > > > >
> > > > > > On Fri, Oct 1, 2010 at 11:06 AM, sanjay kushwaha
> > > > > > <[1]sanjay.kushwaha@gmail.com> wrote:
> > > > > >
> > > > > > havent tried stable-2.6.32.x on Radeon. It works with
> nomodeset
> > > and
> > > > > > nopat options with stable-2.6.33.x branch.
> > > > > >
> > > > > > On Fri, Oct 1, 2010 at 10:57 AM, Konrad Rzeszutek Wilk
> > > > > > <[2]konrad.wilk@oracle.com> wrote:
> > > > > >
> > > > > > On Fri, Oct 01, 2010 at 10:06:48AM -0700, sanjay kushwaha
> > > wrote:
> > > > > > > When I dont use nomodeset option, dom0 boots fine X runs
> > > > > properly.
> > > > > > So Fedora
> > > > > > > 13 (X86_64) distro with stable-2.6.32.x pvops kernel and
> > > > > > xen-unstable works
> > > > > > > fine for i915 without nomodeset option.
> > > > > >
> > > > > > Good to hear it works for you.
> > > > > >
> > > > > > What about your radeon laptop?
> > > > > > >
> > > > > > > Thanks,
> > > > > > > Sanjay
> > > > > > >
> > > > > > > On Wed, Sep 29, 2010 at 3:56 PM, sanjay kushwaha
> > > > > > > <[3]sanjay.kushwaha@gmail.com>wrote:
> > > > > > >
> > > > > > > > Hi Jeremy,
> > > > > > > > I switched to stable-2.6.32.x branch (which is
> 2.6.32.21
> > > > > based)
> > > > > > but I get
> > > > > > > > the same problem. Attached is the Xorg.0.log file when
> I
> > > > > booted
> > > > > > with
> > > > > > > > nomodeset option.
> > > > > > > >
> > > > > > > > interestingly I did not see any kernel or driver crash
> > > > > messages in
> > > > > > the
> > > > > > > > dmesg output. I do see these messages multiple times
> in
> > > > > > /var/log/messages
> > > > > > > > *
> > > > > > > > Sep 29 15:40:32 vwifi0 gdm-binary[2244]: WARNING:
> > > GdmDisplay:
> > > > > > display
> > > > > > > > lasted 0.048984 seconds
> > > > > > > > Sep 29 15:40:32 vwifi0 gdm-binary[2244]: WARNING:
> > > > > > GdmLocalDisplayFactory:
> > > > > > > > maximum number of X display failures reached: check X
> > > server
> > > > > log
> > > > > > for errors
> > > > > > > > *
> > > > > > > >
> > > > > > > > Thanks,
> > > > > > > > Sanjay
> > > > > > > >
> > > > > > > >
> > > > > > > > On Wed, Sep 29, 2010 at 11:57 AM, Jeremy Fitzhardinge
> > > > > > <[4]jeremy@goop.org>wrote:
> > > > > > > >
> > > > > > > >> On 09/29/2010 11:12 AM, sanjay kushwaha wrote:
> > > > > > > >> > Hi Folks,
> > > > > > > >> > I am trying to boot latest xen-unstable on my
> laptop
> > > which
> > > > > has
> > > > > > Intel
> > > > > > > >> > i915 graphics. PVOPS dom0 is 2.6.33.6 based (from
> > > branch
> > > > > > > >> > xen/stable-2.6.33.x)
> > > > > > > >>
> > > > > > > >> Don't use that branch; it isn't supported (in fact, I
> > > deleted
> > > > > it
> > > > > > a while
> > > > > > > >> ago). Use xen/stable-2.6.32.x for now.
> > > > > > > >>
> > > > > > > >> J
> > > > > > > >>
> > > > > > > >> > and the distro is fedora 13 64-bit. The graphics
> doesnt
> > > > > come up
> > > > > > and it
> > > > > > > >> > seems that i915 driver is crashing multiple times.
> If I
> > > > > boot in
> > > > > > > >> > run-level 3 (without X) dom0 boots fine.
> > > > > > > >> > I tried booting the dom0 kernel with nomodeset and
> > > nopat
> > > > > > options
> > > > > > > >> > without any success. I searched on internet and
> found
> > > that
> > > > > > multiple
> > > > > > > >> > people have reported similar problem but I could
> not
> > > find
> > > > > any
> > > > > > solution.
> > > > > > > >> >
> > > > > > > >> > Has anybody found a solution or workaround to this
> > > problem?
> > > > > > > >> >
> > > > > > > >> > Thanks,
> > > > > > > >> > Sanjay
> > > > > > > >> >
> > > > > > > >> > PS: I have another laptop with same version of xen
> and
> > > > > pvops
> > > > > > dom0 but
> > > > > > > >> > it has ATI radeon graphics card. This laptop boots
> dom0
> > > > > with
> > > > > > graphics
> > > > > > > >> > when I give nomodeset and nopat options (but fails
> if I
> > > > > dont
> > > > > > give
> > > > > > > >> > either of those two options).
> > > > > > > >> >
> > > > > > > >> >
> > > > > > > >> >
> > > > > > > >> > _______________________________________________
> > > > > > > >> > Xen-devel mailing list
> > > > > > > >> > [5]Xen-devel@lists.xensource.com
> > > > > > > >> > [6]http://lists.xensource.com/xen-devel
> > > > > > > >>
> > > > > > > >>
> > > > > > > >
> > > > > >
> > > > > > > _______________________________________________
> > > > > > > Xen-devel mailing list
> > > > > > > [7]Xen-devel@lists.xensource.com
> > > > > > > [8]http://lists.xensource.com/xen-devel
> > > > > >
> > > > > > --
> > > > > > ----------------------
> > > > > > Dr. Sanjay Kumar
> > > > > > Research Scientist
> > > > > > Intel Corporation
> > > > > >
> > > > > > --
> > > > > > ----------------------
> > > > > > Dr. Sanjay Kumar
> > > > > > Research Scientist
> > > > > > Intel Corporation
> > > > > >
> > > > > > References
> > > > > >
> > > > > > Visible links
> > > > > > 1. mailto:sanjay.kushwaha@gmail.com
> > > > > > 2. mailto:konrad.wilk@oracle.com
> > > > > > 3. mailto:sanjay.kushwaha@gmail.com
> > > > > > 4. mailto:jeremy@goop.org
> > > > > > 5. mailto:Xen-devel@lists.xensource.com
> > > > > > 6. http://lists.xensource.com/xen-devel
> > > > > > 7. mailto:Xen-devel@lists.xensource.com
> > > > > > 8. http://lists.xensource.com/xen-devel
> > > > >
> > > > > > _______________________________________________
> > > > > > Xen-devel mailing list
> > > > > > Xen-devel@lists.xensource.com
> > > > > > http://lists.xensource.com/xen-devel
> > > > >
> > > > >
> > > >
> > > >
> > > > --
> > > > ----------------------
> > > > Dr. Sanjay Kumar
> > > > Research Scientist
> > > > Intel Corporation
> > >
> >
> >
> >
> > --
> > ----------------------
> > Dr. Sanjay Kumar
> > Research Scientist
> > Intel Corporation
>
> > _______________________________________________
> > Xen-devel mailing list
> > Xen-devel@lists.xensource.com
> > http://lists.xensource.com/xen-devel
>
>
--
----------------------
Dr. Sanjay Kumar
Research Scientist
Intel Corporation
[-- Attachment #1.2: Type: text/html, Size: 16917 bytes --]
[-- Attachment #2: Type: text/plain, Size: 138 bytes --]
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel
^ permalink raw reply
* Re: [PATCH 1/2] drivers:staging:ti-st: move TI_ST from staging
From: Alan Cox @ 2010-10-07 19:38 UTC (permalink / raw)
To: Savoy, Pavan
Cc: Jiri Slaby, gregkh@suse.de, linux-kernel@vger.kernel.org,
devel@driverdev.osuosl.org
In-Reply-To: <19F8576C6E063C45BE387C64729E739404AA21D220@dbde02.ent.ti.com>
> The situation here was to access the UART from a kernel driver. Say we have
> a V4L2 FM radio over the UART, How can I write a v4L2 driver? I has to be a
> line discipline driver correct?
Why would you want to ? you can just control it from user space. If you
did want to drive it from the kernel then an ldisc would be one way to do
it I guess.
Alan
^ permalink raw reply
* [PATCHv5 6/8] add tests of commit --fixup
From: Pat Notz @ 2010-10-07 19:10 UTC (permalink / raw)
To: git
In-Reply-To: <1286478657-61581-1-git-send-email-patnotz@gmail.com>
t7500: test expected behavior of commit --fixup
t3415: test interaction of commit --fixup with rebase --autosquash
t3900: test commit --fixup with i18n encodings
Signed-off-by: Pat Notz <patnotz@gmail.com>
---
t/t3415-rebase-autosquash.sh | 25 +++++++++++++++++++++++--
t/t3900-i18n-commit.sh | 26 ++++++++++++++++++++++++++
t/t7500-commit.sh | 33 +++++++++++++++++++++++++++++++++
3 files changed, 82 insertions(+), 2 deletions(-)
diff --git a/t/t3415-rebase-autosquash.sh b/t/t3415-rebase-autosquash.sh
index fd2184c..b77a413 100755
--- a/t/t3415-rebase-autosquash.sh
+++ b/t/t3415-rebase-autosquash.sh
@@ -14,6 +14,7 @@ test_expect_success setup '
git add . &&
test_tick &&
git commit -m "first commit" &&
+ git tag first-commit &&
echo 3 >file3 &&
git add . &&
test_tick &&
@@ -21,7 +22,7 @@ test_expect_success setup '
git tag base
'
-test_auto_fixup() {
+test_auto_fixup () {
git reset --hard base &&
echo 1 >file1 &&
git add -u &&
@@ -50,7 +51,7 @@ test_expect_success 'auto fixup (config)' '
test_must_fail test_auto_fixup final-fixup-config-false
'
-test_auto_squash() {
+test_auto_squash () {
git reset --hard base &&
echo 1 >file1 &&
git add -u &&
@@ -94,4 +95,24 @@ test_expect_success 'misspelled auto squash' '
test 0 = $(git rev-list final-missquash...HEAD | wc -l)
'
+test_auto_commit_flags () {
+ git reset --hard base &&
+ echo 1 >file1 &&
+ git add -u &&
+ test_tick &&
+ git commit --$1 first-commit &&
+ git tag final-commit-$1 &&
+ test_tick &&
+ git rebase --autosquash -i HEAD^^^ &&
+ git log --oneline >actual &&
+ test 3 = $(wc -l <actual) &&
+ git diff --exit-code final-commit-$1 &&
+ test 1 = "$(git cat-file blob HEAD^:file1)" &&
+ test $2 = $(git cat-file commit HEAD^ | grep first | wc -l)
+}
+
+test_expect_success 'use commit --fixup' '
+ test_auto_commit_flags fixup 1
+'
+
test_done
diff --git a/t/t3900-i18n-commit.sh b/t/t3900-i18n-commit.sh
index 256c4c9..ff6d8dd 100755
--- a/t/t3900-i18n-commit.sh
+++ b/t/t3900-i18n-commit.sh
@@ -133,4 +133,30 @@ do
'
done
+test_commit_autosquash_flags () {
+ H=$1
+ flag=$2
+ test_expect_success "commit --$flag with $H encoding" '
+ git config i18n.commitencoding $H &&
+ git checkout -b $H-$flag C0 &&
+ echo $H >>F &&
+ git commit -a -F "$TEST_DIRECTORY"/t3900/$H.txt &&
+ test_tick &&
+ echo intermediate stuff >>G &&
+ git add G &&
+ git commit -a -m "intermediate commit" &&
+ test_tick &&
+ echo $H $flag >>F &&
+ git commit -a --$flag HEAD~1 $3 &&
+ E=$(git cat-file commit '$H-$flag' | sed -ne "s/^encoding //p") &&
+ test "z$E" = "z'$H'" &&
+ git config --unset-all i18n.commitencoding &&
+ git rebase --autosquash -i HEAD^^^ &&
+ git log --oneline >actual &&
+ test 3 = $(wc -l <actual)
+ '
+}
+
+test_commit_autosquash_flags eucJP fixup
+
test_done
diff --git a/t/t7500-commit.sh b/t/t7500-commit.sh
index aa9c577..a41b819 100755
--- a/t/t7500-commit.sh
+++ b/t/t7500-commit.sh
@@ -215,4 +215,37 @@ test_expect_success 'Commit a message with --allow-empty-message' '
commit_msg_is "hello there"
'
+commit_for_rebase_autosquash_setup () {
+ echo "first content line" >>foo &&
+ git add foo &&
+ cat >log <<EOF &&
+target message subject line
+
+target message body line 1
+target message body line 2
+EOF
+ git commit -F log &&
+ echo "second content line" >>foo &&
+ git add foo &&
+ git commit -m "intermediate commit" &&
+ echo "third content line" >>foo &&
+ git add foo
+}
+
+test_expect_success 'commit --fixup provides correct one-line commit message' '
+ commit_for_rebase_autosquash_setup &&
+ git commit --fixup HEAD~1 &&
+ commit_msg_is "fixup! target message subject line"
+'
+
+test_expect_success 'invalid message options when using --fixup' '
+ echo changes >>foo &&
+ echo "message" >log &&
+ git add foo &&
+ test_must_fail git commit --fixup HEAD~1 -C HEAD~2 &&
+ test_must_fail git commit --fixup HEAD~1 -c HEAD~2 &&
+ test_must_fail git commit --fixup HEAD~1 -m "cmdline message" &&
+ test_must_fail git commit --fixup HEAD~1 -F log
+'
+
test_done
--
1.7.3.1
^ permalink raw reply related
* [PATCHv5 7/8] commit: --squash option for use with rebase --autosquash
From: Pat Notz @ 2010-10-07 19:10 UTC (permalink / raw)
To: git
In-Reply-To: <1286478657-61581-1-git-send-email-patnotz@gmail.com>
This option makes it convenient to construct commit messages for use
with 'rebase --autosquash'. The resulting commit message will be
"squash! ..." where "..." is the subject line of the specified commit
message. This option can be used with other commit message options
such as -m, -c, -C and -F.
If an editor is invoked (as with -c or -eF or no message options) the
commit message is seeded with the correctly formatted subject line.
Example usage:
$ git commit --squash HEAD~2
$ git commit --squash HEAD~2 -m "clever comment"
$ git commit --squash HEAD~2 -F msgfile
$ git commit --squash HEAD~2 -C deadbeef
Signed-off-by: Pat Notz <patnotz@gmail.com>
---
Documentation/git-commit.txt | 9 ++++++++-
builtin/commit.c | 32 ++++++++++++++++++++++++++++++--
2 files changed, 38 insertions(+), 3 deletions(-)
diff --git a/Documentation/git-commit.txt b/Documentation/git-commit.txt
index f4a2b8c..6e4c220 100644
--- a/Documentation/git-commit.txt
+++ b/Documentation/git-commit.txt
@@ -9,7 +9,7 @@ SYNOPSIS
--------
[verse]
'git commit' [-a | --interactive] [-s] [-v] [-u<mode>] [--amend] [--dry-run]
- [(-c | -C | --fixup) <commit>] [-F <file> | -m <msg>]
+ [(-c | -C | --fixup | --squash) <commit>] [-F <file> | -m <msg>]
[--reset-author] [--allow-empty] [--allow-empty-message] [--no-verify]
[-e] [--author=<author>] [--date=<date>] [--cleanup=<mode>]
[--status | --no-status] [--] [[-i | -o ]<file>...]
@@ -76,6 +76,13 @@ OPTIONS
commit with a prefix of "fixup! ". See linkgit:git-rebase[1]
for details.
+--squash=<commit>::
+ Construct a commit message for use with `rebase --autosquash`.
+ The commit message subject line is taken from the specified
+ commit with a prefix of "squash! ". Can be used with additional
+ commit message options (`-m`/`-c`/`-C`/`-F`). See
+ linkgit:git-rebase[1] for details.
+
--reset-author::
When used with -C/-c/--amend options, declare that the
authorship of the resulting commit now belongs of the committer.
diff --git a/builtin/commit.c b/builtin/commit.c
index 851bb59..6dfad73 100644
--- a/builtin/commit.c
+++ b/builtin/commit.c
@@ -69,7 +69,7 @@ static enum {
static const char *logfile, *force_author;
static const char *template_file;
static char *edit_message, *use_message;
-static char *fixup_message;
+static char *fixup_message, *squash_message;
static char *author_name, *author_email, *author_date;
static int all, edit_flag, also, interactive, only, amend, signoff;
static int quiet, verbose, no_verify, allow_empty, dry_run, renew_authorship;
@@ -126,6 +126,7 @@ static struct option builtin_commit_options[] = {
OPT_STRING('c', "reedit-message", &edit_message, "COMMIT", "reuse and edit message from specified commit"),
OPT_STRING('C', "reuse-message", &use_message, "COMMIT", "reuse message from specified commit"),
OPT_STRING(0, "fixup", &fixup_message, "COMMIT", "use autosquash formatted message to fixup specified commit"),
+ OPT_STRING(0, "squash", &squash_message, "COMMIT", "use autosquash formatted message to squash specified commit"),
OPT_BOOLEAN(0, "reset-author", &renew_authorship, "the commit is authored by me now (used with -C-c/--amend)"),
OPT_BOOLEAN('s', "signoff", &signoff, "add Signed-off-by:"),
OPT_FILENAME('t', "template", &template_file, "use specified template file"),
@@ -567,6 +568,22 @@ static int prepare_to_commit(const char *index_file, const char *prefix,
if (!no_verify && run_hook(index_file, "pre-commit", NULL))
return 0;
+ if (squash_message) {
+ /*
+ * Insert the proper subject line before other commit
+ * message options add their content.
+ */
+ struct pretty_print_context ctx = {0};
+ struct commit *commit;
+ const char *out_enc;
+ commit = lookup_commit_reference_by_name(squash_message);
+ out_enc = get_commit_output_encoding();
+ if(use_message && !strcmp(use_message, squash_message))
+ strbuf_addstr(&sb,"squash! ");
+ else
+ format_commit_message(commit, "squash! %s\n\n", &sb, &ctx, out_enc);
+ }
+
if (message.len) {
strbuf_addbuf(&sb, &message);
hook_arg1 = "message";
@@ -617,6 +634,16 @@ static int prepare_to_commit(const char *index_file, const char *prefix,
else if (in_merge)
hook_arg1 = "merge";
+ if (squash_message) {
+ /*
+ * If squash_commit was used for the commit subject,
+ * then we're possibly hijacking other commit log options.
+ * Reset the hook args to tell the real story.
+ */
+ hook_arg1 = "message";
+ hook_arg2 = "";
+ }
+
fp = fopen(git_path(commit_editmsg), "w");
if (fp == NULL)
die_errno("could not open '%s'", git_path(commit_editmsg));
@@ -888,7 +915,8 @@ static int parse_and_validate_options(int argc, const char *argv[],
die("You have nothing to amend.");
if (amend && in_merge)
die("You are in the middle of a merge -- cannot amend.");
-
+ if (fixup_message && squash_message)
+ die("Options --squash and --fixup cannot be used together");
if (use_message)
f++;
if (edit_message)
--
1.7.3.1
^ permalink raw reply related
* [PATCHv5 4/8] pretty.c: teach format_commit_message() to reencode the output
From: Pat Notz @ 2010-10-07 19:10 UTC (permalink / raw)
To: git
In-Reply-To: <1286478657-61581-1-git-send-email-patnotz@gmail.com>
format_commit_message() will now reencode the content if the desired
output encoding is different from the encoding in the passed in
commit.
Signed-off-by: Pat Notz <patnotz@gmail.com>
---
archive.c | 2 +-
builtin/commit.c | 6 +++---
builtin/fmt-merge-msg.c | 2 +-
commit.h | 3 ++-
log-tree.c | 2 +-
notes-cache.c | 2 +-
pretty.c | 39 +++++++++++++++++++++++++++++++++++----
submodule.c | 4 ++--
8 files changed, 46 insertions(+), 14 deletions(-)
diff --git a/archive.c b/archive.c
index edd6853..42b7ab1 100644
--- a/archive.c
+++ b/archive.c
@@ -51,7 +51,7 @@ static void format_subst(const struct commit *commit,
strbuf_add(&fmt, b + 8, c - b - 8);
strbuf_add(buf, src, b - src);
- format_commit_message(commit, fmt.buf, buf, &ctx);
+ format_commit_message(commit, fmt.buf, buf, &ctx, NULL);
len -= c + 1 - src;
src = c + 1;
}
diff --git a/builtin/commit.c b/builtin/commit.c
index ea3801d..e66f10c 100644
--- a/builtin/commit.c
+++ b/builtin/commit.c
@@ -826,7 +826,7 @@ static const char *find_author_by_nickname(const char *name)
struct pretty_print_context ctx = {0};
ctx.date_mode = DATE_NORMAL;
strbuf_release(&buf);
- format_commit_message(commit, "%an <%ae>", &buf, &ctx);
+ format_commit_message(commit, "%an <%ae>", &buf, &ctx, NULL);
return strbuf_detach(&buf, NULL);
}
die("No existing author found with '%s'", name);
@@ -1135,8 +1135,8 @@ static void print_summary(const char *prefix, const unsigned char *sha1)
strbuf_addstr(&format, "format:%h] %s");
- format_commit_message(commit, "%an <%ae>", &author_ident, &pctx);
- format_commit_message(commit, "%cn <%ce>", &committer_ident, &pctx);
+ format_commit_message(commit, "%an <%ae>", &author_ident, &pctx, NULL);
+ format_commit_message(commit, "%cn <%ce>", &committer_ident, &pctx, NULL);
if (strbuf_cmp(&author_ident, &committer_ident)) {
strbuf_addstr(&format, "\n Author: ");
strbuf_addbuf_percentquote(&format, &author_ident);
diff --git a/builtin/fmt-merge-msg.c b/builtin/fmt-merge-msg.c
index 78c7774..7619f4f 100644
--- a/builtin/fmt-merge-msg.c
+++ b/builtin/fmt-merge-msg.c
@@ -173,7 +173,7 @@ static void shortlog(const char *name, unsigned char *sha1,
if (subjects.nr > limit)
continue;
- format_commit_message(commit, "%s", &sb, &ctx);
+ format_commit_message(commit, "%s", &sb, &ctx, NULL);
strbuf_ltrim(&sb);
if (!sb.len)
diff --git a/commit.h b/commit.h
index 6f4b586..51c7110 100644
--- a/commit.h
+++ b/commit.h
@@ -92,7 +92,8 @@ extern char *get_header(const struct commit *commit, const char *key);
extern void userformat_find_requirements(const char *fmt, struct userformat_want *w);
extern void format_commit_message(const struct commit *commit,
const char *format, struct strbuf *sb,
- const struct pretty_print_context *context);
+ const struct pretty_print_context *context,
+ const char *output_encoding);
extern void pretty_print_commit(enum cmit_fmt fmt, const struct commit *commit,
struct strbuf *sb,
const struct pretty_print_context *context);
diff --git a/log-tree.c b/log-tree.c
index b46ed3b..af3200d 100644
--- a/log-tree.c
+++ b/log-tree.c
@@ -274,7 +274,7 @@ void get_patch_filename(struct commit *commit, int nr, const char *suffix,
struct pretty_print_context ctx = {0};
ctx.date_mode = DATE_NORMAL;
- format_commit_message(commit, "%f", buf, &ctx);
+ format_commit_message(commit, "%f", buf, &ctx, NULL);
if (max_len < buf->len)
strbuf_setlen(buf, max_len);
strbuf_addstr(buf, suffix);
diff --git a/notes-cache.c b/notes-cache.c
index dee6d62..461c474 100644
--- a/notes-cache.c
+++ b/notes-cache.c
@@ -19,7 +19,7 @@ static int notes_cache_match_validity(const char *ref, const char *validity)
return 0;
memset(&pretty_ctx, 0, sizeof(pretty_ctx));
- format_commit_message(commit, "%s", &msg, &pretty_ctx);
+ format_commit_message(commit, "%s", &msg, &pretty_ctx, NULL);
strbuf_trim(&msg);
ret = !strcmp(msg.buf, validity);
diff --git a/pretty.c b/pretty.c
index a607fd6..e5ce7fb 100644
--- a/pretty.c
+++ b/pretty.c
@@ -1009,16 +1009,47 @@ void userformat_find_requirements(const char *fmt, struct userformat_want *w)
void format_commit_message(const struct commit *commit,
const char *format, struct strbuf *sb,
- const struct pretty_print_context *pretty_ctx)
+ const struct pretty_print_context *pretty_ctx,
+ const char *output_encoding)
{
struct format_commit_context context;
+ static char utf8[] = "UTF-8";
+ char *enc;
+ char *buffer;
+ char *enc_buffer;
+ struct strbuf scratch_sb = STRBUF_INIT;
+ struct strbuf *sb_ptr;
+
+ enc = get_header(commit, "encoding");
+ enc = enc ? enc : utf8;
+ if(output_encoding && strcmp(enc,output_encoding)) {
+ sb_ptr = &scratch_sb;
+ } else {
+ sb_ptr = sb;
+ }
memset(&context, 0, sizeof(context));
context.commit = commit;
context.pretty_ctx = pretty_ctx;
context.wrap_start = sb->len;
- strbuf_expand(sb, format, format_commit_item, &context);
- rewrap_message_tail(sb, &context, 0, 0, 0);
+ strbuf_expand(sb_ptr, format, format_commit_item, &context);
+ rewrap_message_tail(sb_ptr, &context, 0, 0, 0);
+
+ if(sb_ptr != sb) {
+ /* if re-encoding fails, take the content byte-for-byte */
+ buffer = strbuf_detach(sb_ptr, 0);
+ enc_buffer = reencode_string(buffer, output_encoding, enc);
+ enc_buffer = enc_buffer ? enc_buffer : buffer;
+
+ strbuf_addstr(sb,enc_buffer);
+
+ if(enc_buffer != buffer)
+ free(enc_buffer);
+ free(buffer);
+ }
+
+ if(enc != utf8)
+ free(enc);
}
static void pp_header(enum cmit_fmt fmt,
@@ -1177,7 +1208,7 @@ void pretty_print_commit(enum cmit_fmt fmt, const struct commit *commit,
int need_8bit_cte = context->need_8bit_cte;
if (fmt == CMIT_FMT_USERFORMAT) {
- format_commit_message(commit, user_format, sb, context);
+ format_commit_message(commit, user_format, sb, context, NULL);
return;
}
diff --git a/submodule.c b/submodule.c
index 91a4758..c108ff6 100644
--- a/submodule.c
+++ b/submodule.c
@@ -217,7 +217,7 @@ void show_submodule_summary(FILE *f, const char *path,
}
else if (add)
strbuf_addstr(&sb, add);
- format_commit_message(commit, format, &sb, &ctx);
+ format_commit_message(commit, format, &sb, &ctx, NULL);
if (reset)
strbuf_addstr(&sb, reset);
strbuf_addch(&sb, '\n');
@@ -362,7 +362,7 @@ static void print_commit(struct commit *commit)
struct strbuf sb = STRBUF_INIT;
struct pretty_print_context ctx = {0};
ctx.date_mode = DATE_NORMAL;
- format_commit_message(commit, " %h: %m %s", &sb, &ctx);
+ format_commit_message(commit, " %h: %m %s", &sb, &ctx, NULL);
fprintf(stderr, "%s\n", sb.buf);
strbuf_release(&sb);
}
--
1.7.3.1
^ permalink raw reply related
* [PATCHv5 3/8] pretty.c: helper methods for getting output encodings
From: Pat Notz @ 2010-10-07 19:10 UTC (permalink / raw)
To: git
In-Reply-To: <1286478657-61581-1-git-send-email-patnotz@gmail.com>
Add helpers get_log_output_encoding() and get_commit_output_encoding()
that eliminate some messy and duplicate if-blocks.
Signed-off-by: Pat Notz <patnotz@gmail.com>
---
builtin/commit.c | 2 +-
cache.h | 3 +++
environment.c | 11 +++++++++++
pretty.c | 6 +-----
4 files changed, 16 insertions(+), 6 deletions(-)
diff --git a/builtin/commit.c b/builtin/commit.c
index 9fe4bdc..ea3801d 100644
--- a/builtin/commit.c
+++ b/builtin/commit.c
@@ -905,7 +905,7 @@ static int parse_and_validate_options(int argc, const char *argv[],
enc = get_header(commit, "encoding");
enc = enc ? enc : utf8;
- out_enc = git_commit_encoding ? git_commit_encoding : utf8;
+ out_enc = get_commit_output_encoding();
if (strcmp(out_enc, enc))
use_message_buffer =
diff --git a/cache.h b/cache.h
index 3d5ed51..7d49805 100644
--- a/cache.h
+++ b/cache.h
@@ -1003,6 +1003,9 @@ extern int git_env_bool(const char *, int);
extern int git_config_system(void);
extern int git_config_global(void);
extern int config_error_nonbool(const char *);
+extern const char *get_log_output_encoding(void);
+extern const char *get_commit_output_encoding(void);
+
extern const char *config_exclusive_filename;
#define MAX_GITNAME (1000)
diff --git a/environment.c b/environment.c
index de5581f..a9d44a2 100644
--- a/environment.c
+++ b/environment.c
@@ -192,3 +192,14 @@ int set_git_dir(const char *path)
setup_git_env();
return 0;
}
+
+const char *get_log_output_encoding(void)
+{
+ return git_log_output_encoding ? git_log_output_encoding
+ : get_commit_output_encoding();
+}
+
+const char *get_commit_output_encoding(void)
+{
+ return git_commit_encoding ? git_commit_encoding : "UTF-8";
+}
diff --git a/pretty.c b/pretty.c
index 839944c..a607fd6 100644
--- a/pretty.c
+++ b/pretty.c
@@ -1159,11 +1159,7 @@ char *reencode_commit_message(const struct commit *commit, const char **encoding
{
const char *encoding;
- encoding = (git_log_output_encoding
- ? git_log_output_encoding
- : git_commit_encoding);
- if (!encoding)
- encoding = "UTF-8";
+ encoding = get_log_output_encoding();
if (encoding_p)
*encoding_p = encoding;
return logmsg_reencode(commit, encoding);
--
1.7.3.1
^ permalink raw reply related
* [PATCHv5 5/8] commit: --fixup option for use with rebase --autosquash
From: Pat Notz @ 2010-10-07 19:10 UTC (permalink / raw)
To: git
In-Reply-To: <1286478657-61581-1-git-send-email-patnotz@gmail.com>
This option makes it convenient to construct commit messages for use
with 'rebase --autosquash'. The resulting commit message will be
"fixup! ..." where "..." is the subject line of the specified commit
message.
Example usage:
$ git commit --fixup HEAD~2
Signed-off-by: Pat Notz <patnotz@gmail.com>
---
Documentation/git-commit.txt | 14 ++++++++++----
builtin/commit.c | 20 ++++++++++++++++----
2 files changed, 26 insertions(+), 8 deletions(-)
diff --git a/Documentation/git-commit.txt b/Documentation/git-commit.txt
index 42fb1f5..f4a2b8c 100644
--- a/Documentation/git-commit.txt
+++ b/Documentation/git-commit.txt
@@ -9,10 +9,10 @@ SYNOPSIS
--------
[verse]
'git commit' [-a | --interactive] [-s] [-v] [-u<mode>] [--amend] [--dry-run]
- [(-c | -C) <commit>] [-F <file> | -m <msg>] [--reset-author]
- [--allow-empty] [--allow-empty-message] [--no-verify] [-e] [--author=<author>]
- [--date=<date>] [--cleanup=<mode>] [--status | --no-status] [--]
- [[-i | -o ]<file>...]
+ [(-c | -C | --fixup) <commit>] [-F <file> | -m <msg>]
+ [--reset-author] [--allow-empty] [--allow-empty-message] [--no-verify]
+ [-e] [--author=<author>] [--date=<date>] [--cleanup=<mode>]
+ [--status | --no-status] [--] [[-i | -o ]<file>...]
DESCRIPTION
-----------
@@ -70,6 +70,12 @@ OPTIONS
Like '-C', but with '-c' the editor is invoked, so that
the user can further edit the commit message.
+--fixup=<commit>::
+ Construct a commit message for use with `rebase --autosquash`.
+ The commit message will be the subject line from the specified
+ commit with a prefix of "fixup! ". See linkgit:git-rebase[1]
+ for details.
+
--reset-author::
When used with -C/-c/--amend options, declare that the
authorship of the resulting commit now belongs of the committer.
diff --git a/builtin/commit.c b/builtin/commit.c
index e66f10c..851bb59 100644
--- a/builtin/commit.c
+++ b/builtin/commit.c
@@ -69,6 +69,7 @@ static enum {
static const char *logfile, *force_author;
static const char *template_file;
static char *edit_message, *use_message;
+static char *fixup_message;
static char *author_name, *author_email, *author_date;
static int all, edit_flag, also, interactive, only, amend, signoff;
static int quiet, verbose, no_verify, allow_empty, dry_run, renew_authorship;
@@ -124,6 +125,7 @@ static struct option builtin_commit_options[] = {
OPT_CALLBACK('m', "message", &message, "MESSAGE", "specify commit message", opt_parse_m),
OPT_STRING('c', "reedit-message", &edit_message, "COMMIT", "reuse and edit message from specified commit"),
OPT_STRING('C', "reuse-message", &use_message, "COMMIT", "reuse message from specified commit"),
+ OPT_STRING(0, "fixup", &fixup_message, "COMMIT", "use autosquash formatted message to fixup specified commit"),
OPT_BOOLEAN(0, "reset-author", &renew_authorship, "the commit is authored by me now (used with -C-c/--amend)"),
OPT_BOOLEAN('s', "signoff", &signoff, "add Signed-off-by:"),
OPT_FILENAME('t', "template", &template_file, "use specified template file"),
@@ -586,6 +588,14 @@ static int prepare_to_commit(const char *index_file, const char *prefix,
strbuf_add(&sb, buffer + 2, strlen(buffer + 2));
hook_arg1 = "commit";
hook_arg2 = use_message;
+ } else if (fixup_message) {
+ struct pretty_print_context ctx = {0};
+ struct commit *commit;
+ const char *out_enc;
+ commit = lookup_commit_reference_by_name(fixup_message);
+ out_enc = get_commit_output_encoding();
+ format_commit_message(commit, "fixup! %s\n\n", &sb, &ctx, out_enc);
+ hook_arg1 = "message";
} else if (!stat(git_path("MERGE_MSG"), &statbuf)) {
if (strbuf_read_file(&sb, git_path("MERGE_MSG"), 0) < 0)
die_errno("could not read MERGE_MSG");
@@ -863,7 +873,7 @@ static int parse_and_validate_options(int argc, const char *argv[],
if (force_author && renew_authorship)
die("Using both --reset-author and --author does not make sense");
- if (logfile || message.len || use_message)
+ if (logfile || message.len || use_message || fixup_message)
use_editor = 0;
if (edit_flag)
use_editor = 1;
@@ -883,15 +893,17 @@ static int parse_and_validate_options(int argc, const char *argv[],
f++;
if (edit_message)
f++;
+ if (fixup_message)
+ f++;
if (logfile)
f++;
if (f > 1)
- die("Only one of -c/-C/-F can be used.");
+ die("Only one of -c/-C/-F/--fixup can be used.");
if (message.len && f > 0)
- die("Option -m cannot be combined with -c/-C/-F.");
+ die("Option -m cannot be combined with -c/-C/-F/--fixup.");
if (edit_message)
use_message = edit_message;
- if (amend && !use_message)
+ if (amend && !use_message && !fixup_message)
use_message = "HEAD";
if (!use_message && renew_authorship)
die("--reset-author can be used only with -C, -c or --amend.");
--
1.7.3.1
^ permalink raw reply related
* [PATCHv5 1/8] commit.c: prefer get_header() to manual searching
From: Pat Notz @ 2010-10-07 19:10 UTC (permalink / raw)
To: git
In-Reply-To: <1286478657-61581-1-git-send-email-patnotz@gmail.com>
Signed-off-by: Pat Notz <patnotz@gmail.com>
---
builtin/commit.c | 11 +++--------
commit.h | 1 +
pretty.c | 2 +-
3 files changed, 5 insertions(+), 9 deletions(-)
diff --git a/builtin/commit.c b/builtin/commit.c
index 66fdd22..bf9fcc1 100644
--- a/builtin/commit.c
+++ b/builtin/commit.c
@@ -899,7 +899,7 @@ static int parse_and_validate_options(int argc, const char *argv[],
unsigned char sha1[20];
static char utf8[] = "UTF-8";
const char *out_enc;
- char *enc, *end;
+ char *enc;
struct commit *commit;
if (get_sha1(use_message, sha1))
@@ -908,13 +908,8 @@ static int parse_and_validate_options(int argc, const char *argv[],
if (!commit || parse_commit(commit))
die("could not parse commit %s", use_message);
- enc = strstr(commit->buffer, "\nencoding");
- if (enc) {
- end = strchr(enc + 10, '\n');
- enc = xstrndup(enc + 10, end - (enc + 10));
- } else {
- enc = utf8;
- }
+ enc = get_header(commit, "encoding");
+ enc = enc ? enc : utf8;
out_enc = git_commit_encoding ? git_commit_encoding : utf8;
if (strcmp(out_enc, enc))
diff --git a/commit.h b/commit.h
index 9113bbe..c246c94 100644
--- a/commit.h
+++ b/commit.h
@@ -87,6 +87,7 @@ struct rev_info; /* in revision.h, it circularly uses enum cmit_fmt */
extern char *reencode_commit_message(const struct commit *commit,
const char **encoding_p);
extern void get_commit_format(const char *arg, struct rev_info *);
+extern char *get_header(const struct commit *commit, const char *key);
extern void userformat_find_requirements(const char *fmt, struct userformat_want *w);
extern void format_commit_message(const struct commit *commit,
const char *format, struct strbuf *sb,
diff --git a/pretty.c b/pretty.c
index f85444b..839944c 100644
--- a/pretty.c
+++ b/pretty.c
@@ -348,7 +348,7 @@ static void add_merge_info(enum cmit_fmt fmt, struct strbuf *sb,
strbuf_addch(sb, '\n');
}
-static char *get_header(const struct commit *commit, const char *key)
+char *get_header(const struct commit *commit, const char *key)
{
int key_len = strlen(key);
const char *line = commit->buffer;
--
1.7.3.1
^ permalink raw reply related
* [PATCHv5 0/8] Add commit message options for rebase --autosquash
From: Pat Notz @ 2010-10-07 19:10 UTC (permalink / raw)
To: git
This patch series adds new command line options to git-commit to make
it easy to specify messages for commits correctly formatted for use
wit 'rebase -i --autosquash'.
The first three patches introduce minor refactorings that set the stage
for subsequent patches.
The fourth patch teaches format_commit_message to reencode the content
if the caller's commit object uses an encoding different from the
commit encoding.
The remaining patches add the --fixup and --squash commands to
git-commit including tests of commit, interactions with rebase and
i18n encodings.
One issue which limits the testing (but not the implementation, I
think) is that when 'rebase --autosquash' is comparing commit subject
lines it does not first make sure that the commits use a common
encoding. That's follow-on work.
Pat Notz (8):
commit.c: prefer get_header() to manual searching
commit.c: new function for looking up a comit by name
pretty.c: helper methods for getting output encodings
pretty.c: teach format_commit_message() to reencode the output
commit: --fixup option for use with rebase --autosquash
add tests of commit --fixup
commit: --squash option for use with rebase --autosquash
add tests of commit --squash
Documentation/git-commit.txt | 21 +++++++++--
archive.c | 2 +-
builtin/commit.c | 76 +++++++++++++++++++++++++++------------
builtin/fmt-merge-msg.c | 2 +-
cache.h | 3 ++
commit.c | 13 +++++++
commit.h | 5 ++-
environment.c | 11 ++++++
log-tree.c | 2 +-
notes-cache.c | 2 +-
pretty.c | 47 +++++++++++++++++++-----
submodule.c | 4 +-
t/t3415-rebase-autosquash.sh | 29 ++++++++++++++-
t/t3900-i18n-commit.sh | 28 +++++++++++++++
t/t7500-commit.sh | 80 ++++++++++++++++++++++++++++++++++++++++++
t/t7500/edit-content | 4 ++
16 files changed, 283 insertions(+), 46 deletions(-)
create mode 100755 t/t7500/edit-content
--
1.7.3.1
^ permalink raw reply
* [PATCHv5 8/8] add tests of commit --squash
From: Pat Notz @ 2010-10-07 19:10 UTC (permalink / raw)
To: git
In-Reply-To: <1286478657-61581-1-git-send-email-patnotz@gmail.com>
t7500: test expected behavior of commit --squash
t3415: test interaction of commit --squash with rebase --autosquash
t3900: test commit --squash with i18n encodings
Signed-off-by: Pat Notz <patnotz@gmail.com>
---
As noted in the cover letter, one issue which limits the testing is
that rebase --autosquash does not (yet) consider encodings when
comparing commit subjects. So, we can't test the case of a fixup! or
squash! commit having a different encoding than the commit with which
it will be combined.
t/t3415-rebase-autosquash.sh | 4 +++
t/t3900-i18n-commit.sh | 2 +
t/t7500-commit.sh | 47 ++++++++++++++++++++++++++++++++++++++++++
t/t7500/edit-content | 4 +++
4 files changed, 57 insertions(+), 0 deletions(-)
create mode 100755 t/t7500/edit-content
diff --git a/t/t3415-rebase-autosquash.sh b/t/t3415-rebase-autosquash.sh
index b77a413..0028533 100755
--- a/t/t3415-rebase-autosquash.sh
+++ b/t/t3415-rebase-autosquash.sh
@@ -115,4 +115,8 @@ test_expect_success 'use commit --fixup' '
test_auto_commit_flags fixup 1
'
+test_expect_success 'use commit --squash' '
+ test_auto_commit_flags squash 2
+'
+
test_done
diff --git a/t/t3900-i18n-commit.sh b/t/t3900-i18n-commit.sh
index ff6d8dd..dfabb3a 100755
--- a/t/t3900-i18n-commit.sh
+++ b/t/t3900-i18n-commit.sh
@@ -159,4 +159,6 @@ test_commit_autosquash_flags () {
test_commit_autosquash_flags eucJP fixup
+test_commit_autosquash_flags ISO-2022-JP squash '-m "squash message"'
+
test_done
diff --git a/t/t7500-commit.sh b/t/t7500-commit.sh
index a41b819..162527c 100755
--- a/t/t7500-commit.sh
+++ b/t/t7500-commit.sh
@@ -238,10 +238,57 @@ test_expect_success 'commit --fixup provides correct one-line commit message' '
commit_msg_is "fixup! target message subject line"
'
+test_expect_success 'commit --squash works with -F' '
+ commit_for_rebase_autosquash_setup &&
+ echo "log message from file" >msgfile &&
+ git commit --squash HEAD~1 -F msgfile &&
+ commit_msg_is "squash! target message subject linelog message from file"
+'
+
+test_expect_success 'commit --squash works with -m' '
+ commit_for_rebase_autosquash_setup &&
+ git commit --squash HEAD~1 -m "foo bar\nbaz" &&
+ commit_msg_is "squash! target message subject linefoo bar\nbaz"
+'
+
+test_expect_success 'commit --squash works with -C' '
+ commit_for_rebase_autosquash_setup &&
+ git commit --squash HEAD~1 -C HEAD &&
+ commit_msg_is "squash! target message subject lineintermediate commit"
+'
+
+test_expect_success 'commit --squash works with -c' '
+ commit_for_rebase_autosquash_setup &&
+ test_set_editor "$TEST_DIRECTORY"/t7500/edit-content &&
+ git commit --squash HEAD~1 -c HEAD &&
+ commit_msg_is "squash! target message subject lineedited commit"
+'
+
+test_expect_success 'commit --squash works with -C for same commit' '
+ commit_for_rebase_autosquash_setup &&
+ git commit --squash HEAD -C HEAD &&
+ commit_msg_is "squash! intermediate commit"
+'
+
+test_expect_success 'commit --squash works with -c for same commit' '
+ commit_for_rebase_autosquash_setup &&
+ test_set_editor "$TEST_DIRECTORY"/t7500/edit-content &&
+ git commit --squash HEAD -c HEAD &&
+ commit_msg_is "squash! edited commit"
+'
+
+test_expect_success 'commit --squash works with editor' '
+ commit_for_rebase_autosquash_setup &&
+ test_set_editor "$TEST_DIRECTORY"/t7500/add-content &&
+ git commit --squash HEAD~1 &&
+ commit_msg_is "squash! target message subject linecommit message"
+'
+
test_expect_success 'invalid message options when using --fixup' '
echo changes >>foo &&
echo "message" >log &&
git add foo &&
+ test_must_fail git commit --fixup HEAD~1 --squash HEAD~2 &&
test_must_fail git commit --fixup HEAD~1 -C HEAD~2 &&
test_must_fail git commit --fixup HEAD~1 -c HEAD~2 &&
test_must_fail git commit --fixup HEAD~1 -m "cmdline message" &&
diff --git a/t/t7500/edit-content b/t/t7500/edit-content
new file mode 100755
index 0000000..08db9fd
--- /dev/null
+++ b/t/t7500/edit-content
@@ -0,0 +1,4 @@
+#!/bin/sh
+sed -e "s/intermediate/edited/g" <"$1" >"$1-"
+mv "$1-" "$1"
+exit 0
--
1.7.3.1
^ permalink raw reply related
* [PATCHv5 2/8] commit.c: new function for looking up a comit by name
From: Pat Notz @ 2010-10-07 19:10 UTC (permalink / raw)
To: git
In-Reply-To: <1286478657-61581-1-git-send-email-patnotz@gmail.com>
Signed-off-by: Pat Notz <patnotz@gmail.com>
---
builtin/commit.c | 7 +------
commit.c | 13 +++++++++++++
commit.h | 1 +
3 files changed, 15 insertions(+), 6 deletions(-)
diff --git a/builtin/commit.c b/builtin/commit.c
index bf9fcc1..9fe4bdc 100644
--- a/builtin/commit.c
+++ b/builtin/commit.c
@@ -896,17 +896,12 @@ static int parse_and_validate_options(int argc, const char *argv[],
if (!use_message && renew_authorship)
die("--reset-author can be used only with -C, -c or --amend.");
if (use_message) {
- unsigned char sha1[20];
static char utf8[] = "UTF-8";
const char *out_enc;
char *enc;
struct commit *commit;
- if (get_sha1(use_message, sha1))
- die("could not lookup commit %s", use_message);
- commit = lookup_commit_reference(sha1);
- if (!commit || parse_commit(commit))
- die("could not parse commit %s", use_message);
+ commit = lookup_commit_reference_by_name(use_message);
enc = get_header(commit, "encoding");
enc = enc ? enc : utf8;
diff --git a/commit.c b/commit.c
index 0094ec1..f51098a 100644
--- a/commit.c
+++ b/commit.c
@@ -49,6 +49,19 @@ struct commit *lookup_commit(const unsigned char *sha1)
return check_commit(obj, sha1, 0);
}
+struct commit *lookup_commit_reference_by_name(const char *name)
+{
+ unsigned char sha1[20];
+ struct commit *commit;
+
+ if (get_sha1(name, sha1))
+ die("could not lookup commit %s", name);
+ commit = lookup_commit_reference(sha1);
+ if (!commit || parse_commit(commit))
+ die("could not parse commit %s", name);
+ return commit;
+}
+
static unsigned long parse_commit_date(const char *buf, const char *tail)
{
const char *dateptr;
diff --git a/commit.h b/commit.h
index c246c94..6f4b586 100644
--- a/commit.h
+++ b/commit.h
@@ -36,6 +36,7 @@ struct commit *lookup_commit(const unsigned char *sha1);
struct commit *lookup_commit_reference(const unsigned char *sha1);
struct commit *lookup_commit_reference_gently(const unsigned char *sha1,
int quiet);
+struct commit *lookup_commit_reference_by_name(const char *name);
int parse_commit_buffer(struct commit *item, void *buffer, unsigned long size);
--
1.7.3.1
^ permalink raw reply related
* Re: New Hypercall Declaration
From: Keir Fraser @ 2010-10-07 19:11 UTC (permalink / raw)
To: Dan Magenheimer, Nimgaonkar, Satyajeet, xen-devel
In-Reply-To: <e081449e-ba8d-41d9-9aba-30c493acd268@default>
And furthermore, do_jeet() needs to return a long, not void.
-- Keir
On 07/10/2010 19:07, "Dan Magenheimer" <dan.magenheimer@oracle.com> wrote:
> The hypercall_table and hypercall_args_table are initialized sequences of
> quads and bytes. Even though you have put 56 in the comment, you are
> initializing the table entry immediately following the 48th entry, which would
> be hypercall 49. You need to fill the entries from 49 to 55 in both tables
> with the appropriate values. (The assembler syntax for these tables is weird,
> e.g. endr and rept, and I am not an expert on it.)
>
>
> From: Nimgaonkar, Satyajeet [mailto:SatyajeetNimgaonkar@my.unt.edu]
> Sent: Thursday, October 07, 2010 11:37 AM
> To: Dan Magenheimer; xen-devel@lists.xensource.com
> Subject: RE: [Xen-devel] New Hypercall Declaration
>
>
> Hi Dan,
> I followed your instruction from the below email, but still I am
> getting -1 for hypercall invocation. These are the steps I followed.
>
> 1. Add my hypercall in xen.h ---- #define __HYPERVISOR_jeet1
> 56
>
> 2. Added it to entry.S - hypercall table ---- .quad do_mca /* 48
> */
> .quad
> do_jeet1 /* 56 */
> - hypercall_args_table ---- .byte 1 /* do_mca
> */ /* 48 */
>
> .byte 0 /* do_jeet1 */ /* 56 */
>
> 3. Then declared my hypercall in asm-x86/hypercall.h ---- void do_jeet1(void);
>
> 4. Then calling it in domctl.c in xen/common --- void do_jeet1(void){
>
> printk ("Successfull Hypercall made to __HYPERVISOR_jeet1");
>
> }
>
> 5. Declared a function in xc_domain.c in xen/tools to call this hypercall
>
> int hypercall_test(int handle){
>
> int rc;
> int arg=0;
> //int cmd=1;
> //
> //int test;
> /* Hypercall definitions */
>
> DECLARE_HYPERCALL;
> hypercall.op = __HYPERVISOR_jeet1;
> rc = do_xen_hypercall(handle, &hypercall);
> hypercall.arg[0] = 0;
> hypercall.arg[1] = (unsigned long)&arg;
> //printf ("Hypercall Details: %d\n", rc);
> //xc_interface_close(handle);
> return rc;
> }
>
> 6. Then wrote a userlevel program to call function hypercall_test and invoke
> my hypercall.
>
> #include <xenctrl.h>
> #include <stdio.h>
>
>
>
> int main(){
>
> printf("Attempt to invoke the hypercall: __HYPERVISOR_jeet1\n");
> int handle, rc;
>
> /* Acquire Hypervisor Interface Handle.
> This handle goes as the first argument for the function
> do_xen_hypercall()
> */
>
> handle = xc_interface_open();
> printf ("Acquired handle to Xen Hypervisor:%d\n",handle);
>
>
> rc = hypercall_test(handle);
> printf ("Hypercall Details: %d\n", rc);
>
> xc_interface_close(handle);
> printf ("Hypervisor handle closed\n");
>
> return 0;
>
> }
>
>
> I compiled entire xen, installed it and booted into the atest compiled xen.
> But still my userlevel program compiles error free but returns me a -1 error
> for hypercall invocation. Can you please tell me what is that I doing wrong.
> Thanks.
>
> Regards,
> Satyajeet Nimgaonkar
>
>
> From: Dan Magenheimer [dan.magenheimer@oracle.com]
> Sent: Thursday, September 30, 2010 4:47 PM
> To: Nimgaonkar, Satyajeet; xen-devel@lists.xensource.com
> Subject: RE: [Xen-devel] New Hypercall Declaration
>
> Do you understand that you must also change the hypervisor to recognize and do
> something with your new hypercall? Your userland code may actually be working
> and the hypercall may actually be resulting in an entry into the hypervisor,
> but unless the hypervisor is modified to recognize the new hypercall (#56) and
> do something with it, the hypervisor will generate a return value of -1
> (essentially saying ³I don¹t recognize this hypercall number²).
>
> If you have modified the hypervisor, please share that patch. If not, you
> will need to modify at least the hypercall_table and the hypercall_args_table
> in entry.S (under x86, x86_64, and x86_64/compat, or all three, depending on
> the bit-ness of your hypervisor and guest) and create a do_my_hypercall()
> routine somewhere. Then of course you will need to ensure that you are
> properly building, installing, and booting your newly modified hypervisor.
>
> Printk¹s done inside the hypervisor can be viewed using ³xm dmesg² or via a
> properly configured serial port.
>
> Use ³xm info² and look at cc_compile_date to ensure you are booting your newly
> modified hypervisor.
>
> Hope that helps,
> Dan
>
>
> From: Nimgaonkar, Satyajeet [mailto:SatyajeetNimgaonkar@my.unt.edu]
> Sent: Thursday, September 30, 2010 4:03 PM
> To: xen-devel@lists.xensource.com
> Subject: [Xen-devel] New Hypercall Declaration
>
>
> Hello Xen Developers,
>
> I am currently working on declaring a new hypercall in Xen.
> For this i have declared my hypercall in xen.h -
> #define __HYPERVISOR_jeet1 56
>
> Then I modified the xcom_privcmd.c to accomodate my hypercall -
> case __HYPERVISOR_jeet1:
> printk("Successfull Hypercall made to
> __HYPERVISOR_jeet1");
>
> I defined the structure for the Hypercall in xc_domain.c
>
> int hypercall_test(int handle){
>
> int rc;
>
> /* Hypercall definitions */
>
> DECLARE_HYPERCALL;
> hypercall.op = __HYPERVISOR_jeet1;
> rc = do_xen_hypercall(handle, &hypercall);
> hypercall.arg[0] = 0;
> hypercall.arg[1] = 1;
> //printf ("Hypercall Details: %d\n", rc);
> //xc_interface_close(handle);
> return rc;
> }
>
> And then I am calling this Hypercall through an user level program-
>
> #include <xenctrl.h>
> #include <stdio.h>
>
>
>
> int main(){
>
> printf("Attempt to invoke the hypercall: __HYPERVISOR_jeet1\n");
> int handle, rc;
>
> /* Acquire Hypervisor Interface Handle.
> This handle goes as the first argument for the function
> do_xen_hypercall()
> */
>
> handle = xc_interface_open();
> printf ("Acquired handle to Xen Hypervisor:%d\n",handle);
>
>
> rc = hypercall_test(handle);
> printf ("Hypercall Details: %d\n", rc);
>
> xc_interface_close(handle);
>
> return 0;
>
> }
>
>
> The program compiles properly but gives me -1 error for rc. I have posted the
> same query and I got replies on it. But even after trying many things, I am
> still stuck with this problem. Can anyone please tell me what I am doing wrong
> here. Also please tell me where
> should I view the output of printk in xen.
>
> Thanks in advance.
>
> Regards,
> Satyajeet Nimgaonkar
>
>
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xensource.com
> http://lists.xensource.com/xen-devel
^ permalink raw reply
* [cron job] v4l-dvb daily build 2.6.26 and up: ERRORS
From: Hans Verkuil @ 2010-10-07 19:09 UTC (permalink / raw)
To: linux-media
This message is generated daily by a cron job that builds v4l-dvb for
the kernels and architectures in the list below.
Results of the daily build of v4l-dvb:
date: Thu Oct 7 19:00:17 CEST 2010
path: http://www.linuxtv.org/hg/v4l-dvb
changeset: 15164:1da5fed5c8b2
git master: 3e6dce76d99b328716b43929b9195adfee1de00c
git media-master: c8dd732fd119ce6d562d5fa82a10bbe75a376575
gcc version: i686-linux-gcc (GCC) 4.5.1
host hardware: x86_64
host os: 2.6.32.5
linux-git-armv5: WARNINGS
linux-git-armv5-davinci: WARNINGS
linux-git-armv5-ixp: WARNINGS
linux-git-armv5-omap2: WARNINGS
linux-git-i686: WARNINGS
linux-git-m32r: WARNINGS
linux-git-mips: WARNINGS
linux-git-powerpc64: WARNINGS
linux-git-x86_64: WARNINGS
linux-2.6.32.6-armv5: WARNINGS
linux-2.6.33-armv5: WARNINGS
linux-2.6.34-armv5: WARNINGS
linux-2.6.35.3-armv5: WARNINGS
linux-2.6.32.6-armv5-davinci: ERRORS
linux-2.6.33-armv5-davinci: ERRORS
linux-2.6.34-armv5-davinci: ERRORS
linux-2.6.35.3-armv5-davinci: ERRORS
linux-2.6.32.6-armv5-ixp: ERRORS
linux-2.6.33-armv5-ixp: ERRORS
linux-2.6.34-armv5-ixp: ERRORS
linux-2.6.35.3-armv5-ixp: ERRORS
linux-2.6.32.6-armv5-omap2: ERRORS
linux-2.6.33-armv5-omap2: ERRORS
linux-2.6.34-armv5-omap2: ERRORS
linux-2.6.35.3-armv5-omap2: ERRORS
linux-2.6.26.8-i686: WARNINGS
linux-2.6.27.44-i686: WARNINGS
linux-2.6.28.10-i686: WARNINGS
linux-2.6.29.1-i686: WARNINGS
linux-2.6.30.10-i686: WARNINGS
linux-2.6.31.12-i686: WARNINGS
linux-2.6.32.6-i686: WARNINGS
linux-2.6.33-i686: WARNINGS
linux-2.6.34-i686: WARNINGS
linux-2.6.35.3-i686: WARNINGS
linux-2.6.32.6-m32r: WARNINGS
linux-2.6.33-m32r: WARNINGS
linux-2.6.34-m32r: WARNINGS
linux-2.6.35.3-m32r: WARNINGS
linux-2.6.32.6-mips: WARNINGS
linux-2.6.33-mips: WARNINGS
linux-2.6.34-mips: WARNINGS
linux-2.6.35.3-mips: WARNINGS
linux-2.6.32.6-powerpc64: WARNINGS
linux-2.6.33-powerpc64: WARNINGS
linux-2.6.34-powerpc64: WARNINGS
linux-2.6.35.3-powerpc64: WARNINGS
linux-2.6.26.8-x86_64: WARNINGS
linux-2.6.27.44-x86_64: WARNINGS
linux-2.6.28.10-x86_64: WARNINGS
linux-2.6.29.1-x86_64: WARNINGS
linux-2.6.30.10-x86_64: WARNINGS
linux-2.6.31.12-x86_64: WARNINGS
linux-2.6.32.6-x86_64: WARNINGS
linux-2.6.33-x86_64: WARNINGS
linux-2.6.34-x86_64: WARNINGS
linux-2.6.35.3-x86_64: WARNINGS
spec-git: OK
sparse: ERRORS
Detailed results are available here:
http://www.xs4all.nl/~hverkuil/logs/Thursday.log
Full logs are available here:
http://www.xs4all.nl/~hverkuil/logs/Thursday.tar.bz2
The V4L-DVB specification from this daily build is here:
http://www.xs4all.nl/~hverkuil/spec/media.html
^ permalink raw reply
* Re: [PATCH 1/2] drivers:bluetooth: TI_ST bluetooth driver
From: Gustavo F. Padovan @ 2010-10-07 19:09 UTC (permalink / raw)
To: Greg KH
Cc: Marcel Holtmann, pavan-savoy, linux-bluetooth, johan.hedberg,
linux-kernel, Pavan Savoy
In-Reply-To: <20101007213018.GA28043@kroah.com>
* Greg KH <greg@kroah.com> [2010-10-07 14:30:18 -0700]:
> On Thu, Oct 07, 2010 at 02:51:48PM -0300, Gustavo F. Padovan wrote:
> > Hi Greg,
> >
> > * Greg KH <greg@kroah.com> [2010-10-07 07:34:09 -0700]:
> >
> > > On Thu, Oct 07, 2010 at 12:05:48PM +0200, Marcel Holtmann wrote:
> > > > Hi Pavan,
> > > >
> > > > > This is the bluetooth protocol driver for the TI WiLink7 chipsets.
> > > > > Texas Instrument's WiLink chipsets combine wireless technologies
> > > > > like BT, FM, GPS and WLAN onto a single chip.
> > > > >
> > > > > This Bluetooth driver works on top of the TI_ST shared transport
> > > > > line discipline driver which also allows other drivers like
> > > > > FM V4L2 and GPS character driver to make use of the same UART interface.
> > > > >
> > > > > Signed-off-by: Pavan Savoy <pavan_savoy@ti.com>
> > > > > ---
> > > > > drivers/bluetooth/bt_ti.c | 463 ++++++++++++++++++++++++++++++++++++
> > > > > drivers/staging/ti-st/bt_drv.c | 509 ----------------------------------------
> > > > > drivers/staging/ti-st/bt_drv.h | 61 -----
> > > > > 3 files changed, 463 insertions(+), 570 deletions(-)
> > > > > create mode 100644 drivers/bluetooth/bt_ti.c
> > > > > delete mode 100644 drivers/staging/ti-st/bt_drv.c
> > > > > delete mode 100644 drivers/staging/ti-st/bt_drv.h
> > > >
> > > > I don't care about staging at all. So you sort that out with Greg.
> > > >
> > > > Submit your driver for upstream inclusion. And once accepted you can pin
> > > > Greg about removing it.
> > >
> > > The driver is already in staging, this is the request to move it out of
> > > staging and into the "correct" place in the tree. The core of the ti-st
> > > code is now in the drivers/misc/ directory in the linux-next tree, and
> > > this patch is the request to move the bluetooth drive into the proper
> > > drivers/bluetooth/ location.
> >
> > I'm wondering why this driver never touched linux-bluetooth before. It
> > is on staging because it is not ready for a proper merge and while it is
> > not ready it needs the comments from the bluetooth developers here to
> > get it ready for merge in drivers/bluetooth. So why this never arrived
> > here before?
>
> This is the exact reason _why_ it is being sent here now. To get the
> review of the bluetooth developers for any changes that are needed to
> get it merged into the proper place in the tree.
Yes, but IMHO it took to long, from what I looked this drivers was merged
in stage about May and the patches arrived in linux-bluetooth only in
October. Is there a reason for such delay? That's is something we need
to fix for the next bluetooth drivers we want to merge, so the developers
can get feedback earlier.
--
Gustavo F. Padovan
ProFUSION embedded systems - http://profusion.mobi
^ permalink raw reply
* Re: [RFC] tidspbridge: use a parameter to allocate shared memory
From: Russell King - ARM Linux @ 2010-10-07 19:07 UTC (permalink / raw)
To: Laurent Pinchart
Cc: linux-arm-kernel, Omar Ramirez Luna, Tony Lindgren,
Ohad Ben-Cohen, Greg Kroah-Hartman, Ivan Gomez Castellanos,
Felipe Contreras, Ernesto Ramos, linux-omap, Ameya Palande
In-Reply-To: <201010071601.04597.laurent.pinchart@ideasonboard.com>
On Thu, Oct 07, 2010 at 04:01:02PM +0200, Laurent Pinchart wrote:
> Do we have an infrastructure, or even an embryo thereof, to remove pages from
> the kernel's direct-mapped memory mapping at runtime ? The use of super pages
> probably complicates the matter.
No, and yes, using section mappings/supersection mappings further
complicates the issue because these are duplicated across all
processes in the system.
Even if you did walk all processes in the system, if your system is SMP
without h/w TLB broadcasting, you'd need to IPI the other CPUs and wait
for the IPI to complete - which you can not do if you're trying to
allocate non-cacheable memory from IRQ context.
We _could_ reduce TASK_SIZE to be slightly below 2GB, which then means
we can split the page tables in hardware, but I don't think its safe to
assume that the kernel will always use the init_mm page table to lookup
the >2GB page table entries.
^ permalink raw reply
* [RFC] tidspbridge: use a parameter to allocate shared memory
From: Russell King - ARM Linux @ 2010-10-07 19:07 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <201010071601.04597.laurent.pinchart@ideasonboard.com>
On Thu, Oct 07, 2010 at 04:01:02PM +0200, Laurent Pinchart wrote:
> Do we have an infrastructure, or even an embryo thereof, to remove pages from
> the kernel's direct-mapped memory mapping at runtime ? The use of super pages
> probably complicates the matter.
No, and yes, using section mappings/supersection mappings further
complicates the issue because these are duplicated across all
processes in the system.
Even if you did walk all processes in the system, if your system is SMP
without h/w TLB broadcasting, you'd need to IPI the other CPUs and wait
for the IPI to complete - which you can not do if you're trying to
allocate non-cacheable memory from IRQ context.
We _could_ reduce TASK_SIZE to be slightly below 2GB, which then means
we can split the page tables in hardware, but I don't think its safe to
assume that the kernel will always use the init_mm page table to lookup
the >2GB page table entries.
^ permalink raw reply
* Re: [PATCH] Documentation: update-index: -z applies also to --index-info
From: Bert Wesarg @ 2010-10-07 18:55 UTC (permalink / raw)
To: Štěpán Němec; +Cc: Junio C Hamano, git
In-Reply-To: <AANLkTimsJ+uG7KhiBMii8szFYmbXo5OjAkYgs99_Hjzr@mail.gmail.com>
On Thu, Oct 7, 2010 at 20:52, Bert Wesarg <bert.wesarg@googlemail.com> wrote:
> On Thu, Oct 7, 2010 at 20:33, Štěpán Němec <stepnem@gmail.com> wrote:
>>
>> Also the usage string in builtin/update-index.c should be updated to the
>> same effect.
>>
>> There is actually at least one more problem with the current SYNOPSIS of
>> `update-index'. Obviously the `*' on the third line of the Asciidoc
>> source makes the whole `--cacheinfo' line disappear and the rest bold
>> (cf. e.g. the result at
>> <http://www.kernel.org/pub/software/scm/git/docs/git-update-index.html>).
ls-files too:
http://www.kernel.org/pub/software/scm/git/docs/git-ls-files.html
So it deserve more attention and its own patch.
^ permalink raw reply
* Re: [PATCH v1 05/16] OMAP3 DSS Driver register moved to mach_omap2
From: Thomas Petazzoni @ 2010-10-07 19:06 UTC (permalink / raw)
To: Guruswamy Senthilvadivu
Cc: khilman, tomi.valkeinen, paul, hvaibhav, linux-omap
In-Reply-To: <1286363699-9614-6-git-send-email-svadivu@ti.com>
Hello,
The patch title is a bit misleading, maybe it should rather be
something like "Move OMAP3 DSS driver registration to
mach-omap2/devices.c"/
On Wed, 6 Oct 2010 16:44:48 +0530
Guruswamy Senthilvadivu <svadivu@ti.com> wrote:
> /*---------------------------------------------------------------------------*/
> +#ifdef CONFIG_OMAP2_DSS
> +
> +static struct platform_device omap_display_device = {
> + .name = "omapdisplay",
> + .id = -1,
> + .dev = {
> + .platform_data = NULL,
> + },
This .dev = {} part is useless. The compiler will automatically
initialize unset fields to zero.
> +};
> +
> +void __init omap_display_init(struct omap_dss_board_info
> + *board_data)
*board_data should probably be on the same line as the argument type.
> +{
> +
The general kernel coding style seems to be that there shouldn't be
such empty newlines at the beginning of functions.
> + omap_display_device.dev.platform_data = board_data;
> +
> + if (platform_device_register(&omap_display_device) < 0)
> + printk(KERN_ERR "Unable to register OMAP-Display device\n");
> +
> +
Unneeded newlines.
> + return ;
This return is not needed, we are at the end of a void function.
> @@ -712,7 +712,7 @@ static struct platform_driver omap_dss_driver = {
> .suspend = omap_dss_suspend,
> .resume = omap_dss_resume,
> .driver = {
> - .name = "omapdss",
> + .name = "omapdisplay",
> .owner = THIS_MODULE,
> },
> };
There are other boards instantiating a platform_device with the omapdss
name, so I think this change is going to break those boards. In my
not-so-old linux-omap tree :
$ grep "\.name.*omapdss" *
board-3430sdp.c: .name = "omapdss",
board-am3517evm.c: .name = "omapdss",
board-cm-t35.c: .name = "omapdss",
board-devkit8000.c: .name = "omapdss",
board-igep0020.c: .name = "omapdss",
board-omap3beagle.c: .name = "omapdss",
board-omap3evm.c: .name = "omapdss",
board-omap3pandora.c: .name = "omapdss",
board-omap3stalker.c: .name = "omapdss",
board-rx51-video.c: .name = "omapdss",
Shouldn't these board files also be updated to use the new
omap_display_init() function ?
Regards,
Thomas
--
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
^ permalink raw reply
* Re: [ipw3945-devel] [PATCH 1/6] iwlwifi: schedule to deprecate software scan support
From: Daniel Halperin @ 2010-10-07 18:31 UTC (permalink / raw)
To: Johannes Berg
Cc: John W. Linville, linux-wireless@vger.kernel.org,
ipw3945-devel@lists.sourceforge.net
In-Reply-To: <1286440790.3657.28.camel@jlt3.sipsolutions.net>
On Thu, 7 Oct 2010, Johannes Berg wrote:
> On Wed, 2010-10-06 at 15:03 -0400, John W. Linville wrote:
>
>>> The current HW scan implementation was improve a lot and sw scan will
>>> cause problem, especially once we introduce P2P.
>>
>> What support issues are caused by supporting software scanning?
>>
>> Whatever issues are caused by scanning with P2P, doesn't mac80211
>> have to handle them anyway?
>
> Technically, yes, but there are some things it doesn't handle today, and
> there are some things in mac80211's scan implementation that
> unfortunately make our firmware somewhat unhappy. Also, when we have two
> virtual interfaces (for p2p) the firmware can get completely confused by
> a software scan, especially when we were operating as a p2p-GO.
>
Is there a description somewhere of the p2p functionality, modes, etc?
Thanks,
Dan
^ permalink raw reply
* Re: format-patch on permission change gives empty patch
From: Nicolas Pitre @ 2010-10-07 19:06 UTC (permalink / raw)
To: Junio C Hamano; +Cc: git, David Miller
In-Reply-To: <7vocb6y5sq.fsf@alter.siamese.dyndns.org>
On Wed, 6 Oct 2010, Junio C Hamano wrote:
> I have a mixed feeling about where to go next.
>
> (1) Treat "rebase" as a way to reproduce a reasonable history; the
> current behaviour to drop empty commits is consistent with this view,
> as a history with an empty commit is _not_ entirely reasonable.
But a file mode change isn't exactly an empty commit, no?
Nicolas
^ permalink raw reply
* Re: testing 2010-10-04
From: Dallas Foley @ 2010-10-07 19:04 UTC (permalink / raw)
To: openembedded-devel
In-Reply-To: <AANLkTimOrM-DCsoP4yoo14g_wJ_h0ZVaY99R7UJ=TGmJ@mail.gmail.com>
On 10-10-07 11:26 AM, Khem Raj wrote:
> On Thu, Oct 7, 2010 at 8:34 AM, dfoley<dfoley@telus.net> wrote:
>> On 10-10-06 03:37 AM, Stefan Schmidt wrote:
>>>
>>> Hello.
>>>
>>> On Tue, 2010-10-05 at 07:50, dfoley wrote:
>>>>
>>>> May not be correct, but I ran into the same problem and patched.
>>>>
>>>> diff --git a/recipes/cacao/cacao.inc b/recipes/cacao/cacao.inc
>>>> index c366b74..70bda75 100644
>>>> --- a/recipes/cacao/cacao.inc
>>>> +++ b/recipes/cacao/cacao.inc
>>>> @@ -23,7 +23,7 @@ EXTRA_OECONF = "\
>>>> ${@['','--enable-softfloat'][bb.data.getVar('TARGET_FPU',d,1) ==
>>>> 'soft']} \
>>>> --enable-debug \
>>>> --with-vm-zip=${datadir}/cacao/vm.zip \
>>>> - --with-cacaoh=${STAGING_BINDIR_NATIVE}/cacaoh-${PV} \
>>>> + --with-cacaoh=${STAGING_BINDIR_NATIVE}/cacaoh-${PV}/cacaoh \
>>>>
>>>> --with-build-java-runtime-library-classes=${STAGING_DATADIR}/classpath/glibj.zip
>>>> \
>>>> --with-java-runtime-library-classes=${datadir}/classpath/glibj.zip \
>>>> --with-java-runtime-library-libdir=${libdir_jni}:${libdir} \
>>>
>>> This does it fix for me as well. I wonder from which commit the directory
>>> change was triggered in the last week.
>>>
>>> Care to send a git formatted patch with PR bump I could apply? As you did
>>> the
>>> work you should get the credits for it. :)
>>>
>>> regards
>>> Stefan Schmidt
>>
>> I don't mind if you commit it. You can put me in signed off by.
>> Should the maintainer (MAINTAINERS file) verify it ?
>
> what would be your sign off? your email does not reveal your full name :)
No need to include me in the sign off.
I believe I've corrected my full name now.
>
>>
>>
>> _______________________________________________
>> Openembedded-devel mailing list
>> Openembedded-devel@lists.openembedded.org
>> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-devel
>>
>
> _______________________________________________
> Openembedded-devel mailing list
> Openembedded-devel@lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-devel
^ permalink raw reply
* [PATCH] Prio_heap: heap_remove(), heap_maximum(), heap_replace() and heap_cherrypick()
From: Mathieu Desnoyers @ 2010-10-07 19:03 UTC (permalink / raw)
To: Steven Rostedt, LKML
Cc: Linus Torvalds, Andrew Morton, Peter Zijlstra, Ingo Molnar,
Frederic Weisbecker, Thomas Gleixner, Christoph Hellwig,
Mathieu Desnoyers, Li Zefan, Lai Jiangshan, Johannes Berg,
Masami Hiramatsu, Arnaldo Carvalho de Melo, Tom Zanussi,
KOSAKI Motohiro, Andi Kleen, Paul E. McKenney, Paul Menage,
David Rientjes, Nick Piggin, Balbir Singh, Cedric Le Goater,
Eric W. Biederman
These added interfaces lets prio_heap users lookup the top of heap item without
performing any insertion, perform removal of the topmost heap entry, and also
replacement of topmost heap entry. This is useful if one need to use the result
of the lookup to determine if the current maximum should simply be removed or if
it should be replaced.
This is used by the Generic Ring Buffer to perform timestamp-based fusion-merge
of per-cpu buffer records into a single stream.
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Acked-by: Balbir Singh <balbir@in.ibm.com>
Cc: Paul Menage <menage@google.com>
Cc: David Rientjes <rientjes@google.com>
Cc: Cedric Le Goater <clg@fr.ibm.com>
Cc: "Eric W. Biederman" <ebiederm@xmission.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
---
include/linux/prio_heap.h | 44 ++++++++++++++++++++++
lib/prio_heap.c | 91 ++++++++++++++++++++++++++++++++++++----------
2 files changed, 116 insertions(+), 19 deletions(-)
Index: linux.trees.git/include/linux/prio_heap.h
===================================================================
--- linux.trees.git.orig/include/linux/prio_heap.h 2010-07-06 14:25:29.000000000 -0400
+++ linux.trees.git/include/linux/prio_heap.h 2010-07-07 10:04:33.000000000 -0400
@@ -23,6 +23,18 @@ struct ptr_heap {
};
/**
+ * heap_maximum - return the largest element in the heap
+ * @heap: the heap to be operated on
+ *
+ * Returns the largest element in the heap, without performing any modification
+ * to the heap structure. Returns NULL if the heap is empty.
+ */
+static inline void *heap_maximum(const struct ptr_heap *heap)
+{
+ return heap->size ? heap->ptrs[0] : NULL;
+}
+
+/**
* heap_init - initialize an empty heap with a given memory size
* @heap: the heap structure to be initialized
* @size: amount of memory to use in bytes
@@ -53,6 +65,38 @@ void heap_free(struct ptr_heap *heap);
*/
extern void *heap_insert(struct ptr_heap *heap, void *p);
+/**
+ * heap_remove - remove the largest element from the heap
+ * @heap: the heap to be operated on
+ *
+ * Returns the largest element in the heap. It removes this element from the
+ * heap. Returns NULL if the heap is empty.
+ */
+extern void *heap_remove(struct ptr_heap *heap);
+/**
+ * heap_cherrypick - remove a given element from the heap
+ * @heap: the heap to be operated on
+ * @p: the element
+ *
+ * Remove the given element from the heap. Return the element if present, else
+ * return NULL. This algorithm has a complexity of O(n), which is higher than
+ * O(log(n)) provided by the rest of this API.
+ */
+extern void *heap_cherrypick(struct ptr_heap *heap, void *p);
+
+/**
+ * heap_replace_max - replace the the largest element from the heap
+ * @heap: the heap to be operated on
+ * @p: the pointer to be inserted as topmost element replacement
+ *
+ * Returns the largest element in the heap. It removes this element from the
+ * heap. The heap is rebalanced only once after the insertion. Returns NULL if
+ * the heap is empty.
+ *
+ * This is the equivalent of calling heap_remove() and then heap_insert(), but
+ * it only rebalances the heap once.
+ */
+extern void *heap_replace_max(struct ptr_heap *heap, void *p);
#endif /* _LINUX_PRIO_HEAP_H */
Index: linux.trees.git/lib/prio_heap.c
===================================================================
--- linux.trees.git.orig/lib/prio_heap.c 2010-07-06 14:25:29.000000000 -0400
+++ linux.trees.git/lib/prio_heap.c 2010-07-07 10:18:32.000000000 -0400
@@ -23,12 +23,49 @@ void heap_free(struct ptr_heap *heap)
kfree(heap->ptrs);
}
-void *heap_insert(struct ptr_heap *heap, void *p)
+static void heapify(struct ptr_heap *heap, void **ptrs, void *p, int pos)
+{
+ while (1) {
+ int left = 2 * pos + 1;
+ int right = 2 * pos + 2;
+ int largest = pos;
+ if (left < heap->size && heap->gt(ptrs[left], p))
+ largest = left;
+ if (right < heap->size && heap->gt(ptrs[right], ptrs[largest]))
+ largest = right;
+ if (largest == pos)
+ break;
+ /* Push p down the heap one level and bump one up */
+ ptrs[pos] = ptrs[largest];
+ ptrs[largest] = p;
+ pos = largest;
+ }
+}
+
+void *heap_replace_max(struct ptr_heap *heap, void *p)
{
void *res;
void **ptrs = heap->ptrs;
int pos;
+ if (!heap->size) {
+ ptrs[heap->size++] = p;
+ return NULL;
+ }
+
+ /* Replace the current max and heapify */
+ res = ptrs[0];
+ ptrs[0] = p;
+ pos = 0;
+ heapify(heap, ptrs, p, pos);
+ return res;
+}
+
+void *heap_insert(struct ptr_heap *heap, void *p)
+{
+ void **ptrs = heap->ptrs;
+ int pos;
+
if (heap->size < heap->max) {
/* Heap insertion */
pos = heap->size++;
@@ -47,24 +84,40 @@ void *heap_insert(struct ptr_heap *heap,
return p;
/* Replace the current max and heapify */
- res = ptrs[0];
- ptrs[0] = p;
- pos = 0;
+ return heap_replace_max(heap, p);
+}
- while (1) {
- int left = 2 * pos + 1;
- int right = 2 * pos + 2;
- int largest = pos;
- if (left < heap->size && heap->gt(ptrs[left], p))
- largest = left;
- if (right < heap->size && heap->gt(ptrs[right], ptrs[largest]))
- largest = right;
- if (largest == pos)
- break;
- /* Push p down the heap one level and bump one up */
- ptrs[pos] = ptrs[largest];
- ptrs[largest] = p;
- pos = largest;
+void *heap_remove(struct ptr_heap *heap)
+{
+ void **ptrs = heap->ptrs;
+
+ switch (heap->size) {
+ case 0:
+ return NULL;
+ case 1:
+ return ptrs[--heap->size];
}
- return res;
+
+ /* Shrink, replace the current max by previous last entry and heapify */
+ return heap_replace_max(heap, ptrs[--heap->size]);
+}
+
+void *heap_cherrypick(struct ptr_heap *heap, void *p)
+{
+ void **ptrs = heap->ptrs;
+ size_t pos, size = heap->size;
+
+ for (pos = 0; pos < size; pos++)
+ if (ptrs[pos] == p)
+ goto found;
+ return NULL;
+found:
+ if (heap->size == 1)
+ return ptrs[--heap->size];
+ /*
+ * Replace p with previous last entry and heapify.
+ */
+ ptrs[pos] = ptrs[--heap->size];
+ heapify(heap, ptrs, ptrs[pos], pos);
+ return p;
}
--
Mathieu Desnoyers
Operating System Efficiency R&D Consultant
EfficiOS Inc.
http://www.efficios.com
^ permalink raw reply
* Compat-wireless release for 2010-10-07 is baked
From: Compat-wireless cronjob account @ 2010-10-07 19:03 UTC (permalink / raw)
To: linux-wireless
>From git://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next
7929752..47b280b history -> origin/history
+ 244ae30...b1f2566 master -> origin/master (forced update)
e1d9694..cb655d0 stable -> origin/stable
* [new tag] next-20101007 -> next-20101007
* [new tag] v2.6.36-rc7 -> v2.6.36-rc7
cat: /var/opt/compat/compat-wireless-2.6/compat_version: No such file or directory
cat: compat_base_tree: No such file or directory
cat: compat_base_tree_version: No such file or directory
cat: compat_version: No such file or directory
cat: /var/opt/compat/compat-wireless-2.6/compat_version: No such file or directory
scripts/Makefile.clean:17: /var/opt/compat/compat-wireless-2.6/drivers/net/wireless/hostap/Makefile: No such file or directory
make[4]: *** No rule to make target `/var/opt/compat/compat-wireless-2.6/drivers/net/wireless/hostap/Makefile'. Stop.
make[3]: *** [/var/opt/compat/compat-wireless-2.6/drivers/net/wireless/hostap] Error 2
make[2]: *** [/var/opt/compat/compat-wireless-2.6/drivers/net/wireless] Error 2
make[1]: *** [_clean_/var/opt/compat/compat-wireless-2.6] Error 2
make: *** [clean] Error 2
compat-wireless code metrics
744913 - Total upstream lines of code being pulled
^ permalink raw reply
* Re: Differing results between gitk --follow and git log --follow
From: Joshua Jensen @ 2010-10-07 19:00 UTC (permalink / raw)
To: Jeff King; +Cc: git@vger.kernel.org
In-Reply-To: <20101007181854.GF18518@sigill.intra.peff.net>
----- Original Message -----
From: Jeff King
Date: 10/7/2010 12:18 PM
> On Thu, Oct 07, 2010 at 12:13:04PM -0600, Joshua Jensen wrote:
>
>> Is there a way to convince gitk to show me the same bits as git log
>> --follow?
> Sadly, no, not without major surgery to the follow code. See:
>
> http://article.gmane.org/gmane.comp.version-control.git/147089
Interesting... and way beyond my current capabilities... :(
Thanks for the response.
Josh
^ permalink raw reply
* pull request: wireless-2.6 2010-10-07
From: John W. Linville @ 2010-10-07 18:58 UTC (permalink / raw)
To: davem; +Cc: linux-wireless, netdev, linux-kernel
Dave,
Here are a few more more-or-less-one-liner fixes intended for 2.6.36.
The one from Felix fixes a regression introduced in the 2.6.36 cycle.
The one from Johannes fixes a crash reported by Ben Greear (as
documented in the changelog). The one from me reverts and earlier patch
from me that can result in stuff in dmesg from not calling
netif_receive_skb in the proper context.
Please let me know if there are problems!
Thanks,
John
---
The following changes since commit fb3dbece264a50ab4373f3af0bbbd9175d3ad4d7:
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/padovan/bluetooth-2.6 (2010-10-07 00:59:39 -0700)
are available in the git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6.git master
Felix Fietkau (1):
ath9k_hw: fix regression in ANI listen time calculation
Johannes Berg (1):
mac80211: delete AddBA response timer
John W. Linville (1):
Revert "mac80211: use netif_receive_skb in ieee80211_tx_status callpath"
drivers/net/wireless/ath/ath9k/ani.c | 2 +-
net/mac80211/agg-tx.c | 2 ++
net/mac80211/status.c | 4 ++--
3 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/drivers/net/wireless/ath/ath9k/ani.c b/drivers/net/wireless/ath/ath9k/ani.c
index cc648b6..a3d95cc 100644
--- a/drivers/net/wireless/ath/ath9k/ani.c
+++ b/drivers/net/wireless/ath/ath9k/ani.c
@@ -543,7 +543,7 @@ static u8 ath9k_hw_chan_2_clockrate_mhz(struct ath_hw *ah)
if (conf_is_ht40(conf))
return clockrate * 2;
- return clockrate * 2;
+ return clockrate;
}
static int32_t ath9k_hw_ani_get_listen_time(struct ath_hw *ah)
diff --git a/net/mac80211/agg-tx.c b/net/mac80211/agg-tx.c
index c893f23..8f23401 100644
--- a/net/mac80211/agg-tx.c
+++ b/net/mac80211/agg-tx.c
@@ -175,6 +175,8 @@ int ___ieee80211_stop_tx_ba_session(struct sta_info *sta, u16 tid,
set_bit(HT_AGG_STATE_STOPPING, &tid_tx->state);
+ del_timer_sync(&tid_tx->addba_resp_timer);
+
/*
* After this packets are no longer handed right through
* to the driver but are put onto tid_tx->pending instead,
diff --git a/net/mac80211/status.c b/net/mac80211/status.c
index 10caec5..34da679 100644
--- a/net/mac80211/status.c
+++ b/net/mac80211/status.c
@@ -377,7 +377,7 @@ void ieee80211_tx_status(struct ieee80211_hw *hw, struct sk_buff *skb)
skb2 = skb_clone(skb, GFP_ATOMIC);
if (skb2) {
skb2->dev = prev_dev;
- netif_receive_skb(skb2);
+ netif_rx(skb2);
}
}
@@ -386,7 +386,7 @@ void ieee80211_tx_status(struct ieee80211_hw *hw, struct sk_buff *skb)
}
if (prev_dev) {
skb->dev = prev_dev;
- netif_receive_skb(skb);
+ netif_rx(skb);
skb = NULL;
}
rcu_read_unlock();
--
John W. Linville Someday the world will need a hero, and you
linville@tuxdriver.com might be all we have. Be ready.
^ 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.