linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [GIT PULL] PCI fixes for v4.15
@ 2018-01-23 19:56 Bjorn Helgaas
  2018-01-23 20:49 ` Linus Torvalds
  0 siblings, 1 reply; 14+ messages in thread
From: Bjorn Helgaas @ 2018-01-23 19:56 UTC (permalink / raw)
  To: Linus Torvalds
  Cc: linux-pci, linux-kernel, Lorenzo Pieralisi, Christian König,
	Aaro Koskinen, Andy Shevchenko, Boris Ostrovsky, Juergen Gross,
	Alex Deucher, David Airlie

PCI fixes:

  - fix AMD regression due to not re-enabling the big window on resume
    (Christian König)


The following changes since commit 03a551734cfc2b93f83950a595974e3c9cbd82fd:

  x86/PCI: Move and shrink AMD 64-bit window to avoid conflict (2018-01-11 12:01:58 -0600)

are available in the Git repository at:

  ssh://git@gitolite.kernel.org/pub/scm/linux/kernel/git/helgaas/pci.git tags/pci-v4.15-fixes-3

for you to fetch changes up to 838cda3697073982acd276ac43387b2a0aed04b4:

  x86/PCI: Enable AMD 64-bit window on resume (2018-01-16 11:45:50 -0600)

----------------------------------------------------------------
pci-v4.15-fixes-3

----------------------------------------------------------------
=?UTF-8?q?Christian=20K=C3=B6nig?= (1):
      x86/PCI: Enable AMD 64-bit window on resume

 arch/x86/pci/fixup.c | 32 ++++++++++++++++++++------------
 1 file changed, 20 insertions(+), 12 deletions(-)

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [GIT PULL] PCI fixes for v4.15
  2018-01-23 19:56 [GIT PULL] PCI fixes for v4.15 Bjorn Helgaas
@ 2018-01-23 20:49 ` Linus Torvalds
  2018-01-23 20:53   ` Linus Torvalds
  2018-01-24  0:46   ` Bjorn Helgaas
  0 siblings, 2 replies; 14+ messages in thread
From: Linus Torvalds @ 2018-01-23 20:49 UTC (permalink / raw)
  To: Bjorn Helgaas
  Cc: linux-pci, Linux Kernel Mailing List, Lorenzo Pieralisi,
	Christian König, Aaro Koskinen, Andy Shevchenko,
	Boris Ostrovsky, Juergen Gross, Alex Deucher, David Airlie

On Tue, Jan 23, 2018 at 11:56 AM, Bjorn Helgaas <helgaas@kernel.org> wrote:
>
>   - fix AMD regression due to not re-enabling the big window on resume
>     (Christian König)

Bjorn, I think you need to look at your email habits.

I suspect you're editing your mailbox, or you're using some broken
mailer setup, or something (using some broken "export" function?),
because you're corrupting Christian's name all the time:

> =?UTF-8?q?Christian=20K=C3=B6nig?= (1):
>       x86/PCI: Enable AMD 64-bit window on resume

and I'm pretty sure git gets this right if actually fed a real mbox,
but I suspect that you have some other workflow going on..

            Linus

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [GIT PULL] PCI fixes for v4.15
  2018-01-23 20:49 ` Linus Torvalds
@ 2018-01-23 20:53   ` Linus Torvalds
  2018-01-24  0:46   ` Bjorn Helgaas
  1 sibling, 0 replies; 14+ messages in thread
From: Linus Torvalds @ 2018-01-23 20:53 UTC (permalink / raw)
  To: Bjorn Helgaas
  Cc: linux-pci, Linux Kernel Mailing List, Lorenzo Pieralisi,
	Christian König, Aaro Koskinen, Andy Shevchenko,
	Boris Ostrovsky, Juergen Gross, Alex Deucher, David Airlie

On Tue, Jan 23, 2018 at 12:49 PM, Linus Torvalds
<torvalds@linux-foundation.org> wrote:
>
> Bjorn, I think you need to look at your email habits.

Anyway, it's pulled, but Christian ends up looking odd in the git tree
now. It happened before too, so there's three of them:

  git log --author=ckoenig.leichtzumerken@gmail.com

it's also possible that it's Christian who has some really odd email
setup that triggers this, of course.

This has happened at least once before (we have a

  Author: =?UTF-8?q?Simon=20Sandstr=C3=B6m?= <simon@nikanor.nu>

in there too from a year ago), but I'm pretty sure git gets this right
and it's some other issue here, because we have a ton of _correct_
UTF-8 author names picked up from emails.

             Linus

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [GIT PULL] PCI fixes for v4.15
  2018-01-23 20:49 ` Linus Torvalds
  2018-01-23 20:53   ` Linus Torvalds
@ 2018-01-24  0:46   ` Bjorn Helgaas
  2018-01-24  1:04     ` Linus Torvalds
  1 sibling, 1 reply; 14+ messages in thread
From: Bjorn Helgaas @ 2018-01-24  0:46 UTC (permalink / raw)
  To: Linus Torvalds
  Cc: linux-pci, Linux Kernel Mailing List, Lorenzo Pieralisi,
	Christian König, Aaro Koskinen, Andy Shevchenko,
	Boris Ostrovsky, Juergen Gross, Alex Deucher, David Airlie

On Tue, Jan 23, 2018 at 12:49:22PM -0800, Linus Torvalds wrote:
> On Tue, Jan 23, 2018 at 11:56 AM, Bjorn Helgaas <helgaas@kernel.org> wrote:
> >
> >   - fix AMD regression due to not re-enabling the big window on resume
> >     (Christian König)
> 
> Bjorn, I think you need to look at your email habits.
> 
> I suspect you're editing your mailbox, or you're using some broken
> mailer setup, or something (using some broken "export" function?),
> because you're corrupting Christian's name all the time:
> 
> > =?UTF-8?q?Christian=20K=C3=B6nig?= (1):
> >       x86/PCI: Enable AMD 64-bit window on resume
> 
> and I'm pretty sure git gets this right if actually fed a real mbox,
> but I suspect that you have some other workflow going on..

I'm not editing my mailbox, but I am using stgit.  The "From:" header
uses encoded-word syntax for Christian's name, and I think stgit is
not decoding that when applying the patch.

When I save the patch email message from mutt (or gmail, for that
matter), I see:

  From: "=?UTF-8?q?Christian=20K=C3=B6nig?="  ...

Applying that patch with "git am" results in the correct

  Author: Christian König <ckoenig.leichtzumerken@gmail.com

Applying the identical patch with "stg import -M" results in

  Author: =?UTF-8?q?Christian=20K=C3=B6nig?= <ckoenig.leichtzumerken@gmail.com>

Some of Christian's PCI patches came out OK (8bb705e3e79d,
276b738deb5b, cb21bc9469c4).  I don't remember specifically, but I
suspect I fixed those manually.

I don't know if there's some stg configuration I could do to fix this.
I looked a little bit but haven't found anything yet.

Thanks for pointing this out.  I'll try to fix this one way or another
in the future.

Bjorn

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [GIT PULL] PCI fixes for v4.15
  2018-01-24  0:46   ` Bjorn Helgaas
@ 2018-01-24  1:04     ` Linus Torvalds
  2018-01-24  7:17       ` Andy Shevchenko
                         ` (2 more replies)
  0 siblings, 3 replies; 14+ messages in thread
From: Linus Torvalds @ 2018-01-24  1:04 UTC (permalink / raw)
  To: Bjorn Helgaas, Peter Grayson, Catalin Marinas
  Cc: linux-pci, Linux Kernel Mailing List, Lorenzo Pieralisi,
	Christian König, Aaro Koskinen, Andy Shevchenko,
	Boris Ostrovsky, Juergen Gross, Alex Deucher, David Airlie

On Tue, Jan 23, 2018 at 4:46 PM, Bjorn Helgaas <helgaas@kernel.org> wrote:
> On Tue, Jan 23, 2018 at 12:49:22PM -0800, Linus Torvalds wrote:
>>
>> I suspect you're editing your mailbox, or you're using some broken
>> mailer setup, or something (using some broken "export" function?),
>> because you're corrupting Christian's name all the time:
>
> I'm not editing my mailbox, but I am using stgit.  The "From:" header
> uses encoded-word syntax for Christian's name, and I think stgit is
> not decoding that when applying the patch.

Ahh. Ok, that would explain it.

> When I save the patch email message from mutt (or gmail, for that
> matter), I see:
>
>   From: "=?UTF-8?q?Christian=20K=C3=B6nig?="  ...

Yes. That's the standard locale encoding format for header values
(mainly subject and author), since the

   Content-Type: text/plain; charset=utf-8

only applies to the *body* of the email.

So then the email handling tools have to handle that correctly, and as
you noticed, "git am" does so:

> Applying that patch with "git am" results in the correct
>
>   Author: Christian König <ckoenig.leichtzumerken@gmail.com

But apparently stgit does not:

> Applying the identical patch with "stg import -M" results in
>
>   Author: =?UTF-8?q?Christian=20K=C3=B6nig?= <ckoenig.leichtzumerken@gmail.com>

I'm adding Peter Grayson and Catalin Marinas to the participants,
since they seem to be the main stgit developers.

Presumably there is either a flag for this (which should presumably be
the default). Or if not, maybe stgit can just be fixed?

[ I go off looking at the stgit sources. ]

Oddly, stgit seems to even have a *testcase* for this:

 - t/t1800-import/email-qp:

        From: Inge =?utf-8?q?Str=C3=B6m?= <inge@power.com>

and that test-case harkens back to 2006. I wonder why it doesn't seem
to work for you and Christian.

Bjorn, maybe you can send Catalin an example mbox?

             Linus

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [GIT PULL] PCI fixes for v4.15
  2018-01-24  1:04     ` Linus Torvalds
@ 2018-01-24  7:17       ` Andy Shevchenko
  2018-01-24 16:20       ` Bjorn Helgaas
  2018-01-24 16:45       ` Peter Grayson
  2 siblings, 0 replies; 14+ messages in thread
From: Andy Shevchenko @ 2018-01-24  7:17 UTC (permalink / raw)
  To: Linus Torvalds, Bjorn Helgaas, Peter Grayson, Catalin Marinas
  Cc: linux-pci, Linux Kernel Mailing List, Lorenzo Pieralisi,
	Christian König, Aaro Koskinen, Boris Ostrovsky,
	Juergen Gross, Alex Deucher, David Airlie

On Tue, 2018-01-23 at 17:04 -0800, Linus Torvalds wrote:
> On Tue, Jan 23, 2018 at 4:46 PM, Bjorn Helgaas <helgaas@kernel.org>
> wrote:

> > Applying the identical patch with "stg import -M" results in
> > 
> >   Author: =?UTF-8?q?Christian=20K=C3=B6nig?= <ckoenig.leichtzumerken
> > @gmail.com>

> Oddly, stgit seems to even have a *testcase* for this:
> 
>  - t/t1800-import/email-qp:
> 
>         From: Inge =?utf-8?q?Str=C3=B6m?= <inge@power.com>
> 
> and that test-case harkens back to 2006. I wonder why it doesn't seem
> to work for you and Christian.

I see two subtle differences:
- test case starts with letters followed by quoted-printable encoding
- test case has utf-8 while in example we have UTF-8 (should it matter?)

-- 
Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Intel Finland Oy

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [GIT PULL] PCI fixes for v4.15
  2018-01-24  1:04     ` Linus Torvalds
  2018-01-24  7:17       ` Andy Shevchenko
@ 2018-01-24 16:20       ` Bjorn Helgaas
  2018-01-24 16:40         ` Linus Torvalds
  2018-01-24 16:45       ` Peter Grayson
  2 siblings, 1 reply; 14+ messages in thread
From: Bjorn Helgaas @ 2018-01-24 16:20 UTC (permalink / raw)
  To: Linus Torvalds
  Cc: Peter Grayson, Catalin Marinas, linux-pci,
	Linux Kernel Mailing List, Lorenzo Pieralisi,
	Christian König, Aaro Koskinen, Andy Shevchenko,
	Boris Ostrovsky, Juergen Gross, Alex Deucher, David Airlie

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

On Tue, Jan 23, 2018 at 05:04:22PM -0800, Linus Torvalds wrote:
> On Tue, Jan 23, 2018 at 4:46 PM, Bjorn Helgaas <helgaas@kernel.org> wrote:
> > On Tue, Jan 23, 2018 at 12:49:22PM -0800, Linus Torvalds wrote:
> >>
> >> I suspect you're editing your mailbox, or you're using some broken
> >> mailer setup, or something (using some broken "export" function?),
> >> because you're corrupting Christian's name all the time:
> >
> > I'm not editing my mailbox, but I am using stgit.  The "From:" header
> > uses encoded-word syntax for Christian's name, and I think stgit is
> > not decoding that when applying the patch.
> 
> Ahh. Ok, that would explain it.
> 
> > When I save the patch email message from mutt (or gmail, for that
> > matter), I see:
> >
> >   From: "=?UTF-8?q?Christian=20K=C3=B6nig?="  ...
> 
> Yes. That's the standard locale encoding format for header values
> (mainly subject and author), since the
> 
>    Content-Type: text/plain; charset=utf-8
> 
> only applies to the *body* of the email.
> 
> So then the email handling tools have to handle that correctly, and as
> you noticed, "git am" does so:
> 
> > Applying that patch with "git am" results in the correct
> >
> >   Author: Christian König <ckoenig.leichtzumerken@gmail.com
> 
> But apparently stgit does not:
> 
> > Applying the identical patch with "stg import -M" results in
> >
> >   Author: =?UTF-8?q?Christian=20K=C3=B6nig?= <ckoenig.leichtzumerken@gmail.com>
> 
> I'm adding Peter Grayson and Catalin Marinas to the participants,
> since they seem to be the main stgit developers.
> 
> Presumably there is either a flag for this (which should presumably be
> the default). Or if not, maybe stgit can just be fixed?
> 
> [ I go off looking at the stgit sources. ]
> 
> Oddly, stgit seems to even have a *testcase* for this:
> 
>  - t/t1800-import/email-qp:
> 
>         From: Inge =?utf-8?q?Str=C3=B6m?= <inge@power.com>
> 
> and that test-case harkens back to 2006. I wonder why it doesn't seem
> to work for you and Christian.
> 
> Bjorn, maybe you can send Catalin an example mbox?

Attaching the one I used above.

[-- Attachment #2: ck2 --]
[-- Type: text/plain, Size: 12213 bytes --]

>From SRS0=1ozF=EL=gmail.com=ckoenig.leichtzumerken@kernel.org Tue Jan 16 03:43:23 2018
Delivered-To: bjorn.helgaas@gmail.com
Received: by 10.2.145.8 with SMTP id a8csp3917165jag;
        Tue, 16 Jan 2018 01:43:23 -0800 (PST)
X-Received: by 10.107.129.18 with SMTP id c18mr14204946iod.141.1516095803705;
        Tue, 16 Jan 2018 01:43:23 -0800 (PST)
ARC-Seal: i=2; a=rsa-sha256; t=1516095803; cv=pass;
        d=google.com; s=arc-20160816;
        b=x22orsv5y3vszhrcds8AK7VOOTlsx3MVqTKqhl5DXbQC270ezFErz2KNCR2ZdGB7sK
         UNB9NdkG2XPi4//fihxgxNoZq1csjFg4u2fCbKOyetzf2e3dfWVP0m3Cerhwe8DG9GyI
         4Znm/icDQH48HbWnKtYH9GfHw5WySs1GG5afIuvhPSmF3h4hNhK+CDyRC+pM0PyW1tdl
         jdfUalNY2KUr5fU9v0Y2PRbFtCGc9eij1ttcdq/DIAFg/iC60aA4n3ioq7NfMSykCTNE
         UhD8Mei+hRaxPK9s6dmssSeyCZwxMHWYMGxIdgRya4FHihlZ8vhBWsjUKgkUJPwohzU/
         BMIQ==
ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816;
        h=content-transfer-encoding:mime-version:message-id:date:subject:to
         :from:dkim-signature:dmarc-filter:delivered-to
         :arc-authentication-results:arc-message-signature
         :arc-authentication-results;
        bh=hzppptlGn4tFqrDkRYJ7RoxFLJJVXjwSj9hteosYOpE=;
        b=pAJK7j3jKZcnquC4TRVM8zByreMsBRG7Fq4JR573JLFYdECcT3sJrnn1fFUkuvPJId
         PvEdfp3vnHcVYU1Zs1TEbZA+cgl9mI3ut8z/vAjmNrs8D2Q2HLp78XL+p1Vv/4scU6gX
         LZsrZm0KhiR039Lo/WE2UwaCqJVTF7Jtk0JxNtpwAuwmOqxwUrHHY/x2+0rgq82Zwllf
         9X4daGuQnqGpVmwDpqhQsqgK1fpIruMuy2T2O7ZWkRWpVmHMWVtDqkx2u46M2EtpS/3T
         mOGD7zGJecazn9ojxZAyp+AM9FfkEXQ+D+bhQ5AEcHU2gdVujeCozJpt/q6UGRxaXSm1
         svsQ==
ARC-Authentication-Results: i=2; mx.google.com;
       dkim=pass header.i=@gmail.com header.s=20161025 header.b=GVGDOSc+;
       arc=pass (i=1 spf=pass spfdomain=kernel.org dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com);
       spf=neutral (google.com: 209.85.220.41 is neither permitted nor denied by best guess record for domain of srs0=1ozf=el=gmail.com=ckoenig.leichtzumerken@kernel.org) smtp.mailfrom=SRS0=1ozF=EL=gmail.com=ckoenig.leichtzumerken@kernel.org;
       dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gmail.com
Return-Path: <SRS0=1ozF=EL=gmail.com=ckoenig.leichtzumerken@kernel.org>
Received: from mail-sor-f41.google.com (mail-sor-f41.google.com. [209.85.220.41])
        by mx.google.com with SMTPS id a7sor1156605itg.143.2018.01.16.01.43.23
        for <bjorn.helgaas@gmail.com>
        (Google Transport Security);
        Tue, 16 Jan 2018 01:43:23 -0800 (PST)
Received-SPF: neutral (google.com: 209.85.220.41 is neither permitted nor denied by best guess record for domain of srs0=1ozf=el=gmail.com=ckoenig.leichtzumerken@kernel.org) client-ip=209.85.220.41;
Authentication-Results: mx.google.com;
       dkim=pass header.i=@gmail.com header.s=20161025 header.b=GVGDOSc+;
       arc=pass (i=1 spf=pass spfdomain=kernel.org dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com);
       spf=neutral (google.com: 209.85.220.41 is neither permitted nor denied by best guess record for domain of srs0=1ozf=el=gmail.com=ckoenig.leichtzumerken@kernel.org) smtp.mailfrom=SRS0=1ozF=EL=gmail.com=ckoenig.leichtzumerken@kernel.org;
       dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gmail.com
Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=ckoenig.leichtzumerken@gmail.com
Authentication-Results: mail.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20161025;
        h=x-gm-message-state:delivered-to:dmarc-filter:dkim-signature:from:to
         :subject:date:message-id:mime-version:content-transfer-encoding;
        bh=hzppptlGn4tFqrDkRYJ7RoxFLJJVXjwSj9hteosYOpE=;
        b=Bs9h2f70F47oCiI+iv48OeC4uEe1quiaK9Nx/T/5vcUKXQ7mjg9o57yBZxipAEFV9t
         RC9wamylrWT1hhK2ISnY6Q/iS+T2ac9Y5eXbu3u2t5SBQizYS7H9JSGN/q1UQXvW7tYq
         VsK9T8KvKCF2uag0k8LDFqOAM3ho7t6XDdR/Sb9D3UjCdcyDyTG98DDS5EbLtP2NrCLv
         5lGo0BNHrma4Hk2RGjyhGYq26ATHYYdNfWbJg/8rV7D/gtLz9HBpq/XaVtsFvLnAdqjx
         jFoqt50JdG53s1euO3fjax79uoWr4vl7WUrVYt4xbG7WUSIoPimzaDI/FrddVR5P3KAn
         Hw3w==
X-Gm-Message-State: AKwxyteYJ2Z+Ow322Ogwkyq5qGDGgV+vbu8YLoAlQrsI6vlyOBhlLQYu
	9+5tTxgt9bUrzJg3nL5JYTTXNyfSIb8IqPlXfg==
X-Google-Smtp-Source: ACJfBosaHkdDfIZtrAWo3wXjDwvO4u3C009rm5TWu8xQxRC+IWGHj57ByWfJW/qqUcHPYa29+4zDg6JM8aK/rUBk6vir8hQjvy4=
X-Received: by 10.36.108.147 with SMTP id w141mr11899134itb.47.1516095803597;
        Tue, 16 Jan 2018 01:43:23 -0800 (PST)
ARC-Seal: i=1; a=rsa-sha256; t=1516095803; cv=none;
        d=google.com; s=arc-20160816;
        b=Y4IQHrG1wJ+gAAjwDzu0WUolh+pio+pTJWQFZhVuNH+hWFlIhYpczUlIVunRtE+eax
         ONCuSUPPZSOF3r4qXlpU8/PgIMGSIYmXFgPJmLDJUkEGFLd5jnkTFji1BUFIdvckkCjd
         UtaGY5lCBBftE2xH481IBy24B4xdrdHKcEvDqm96r8BodA5mHSHbmkIr917uXk00hlts
         jnNqSno5WajmBCbecG1qB48sQ0GI/uIDdVsDyTVPicpp5jyFeQkquD+7bJXuwWNd0Fa4
         JQXjejcDLcPD7+MA50fSn4tDJ+eMKjTAdYZEnWaOaodFpFOKP84Vm1xYI5nEnTMcDDii
         8hFw==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816;
        h=content-transfer-encoding:mime-version:message-id:date:subject:to
         :from:dkim-signature:dmarc-filter:delivered-to
         :arc-authentication-results;
        bh=hzppptlGn4tFqrDkRYJ7RoxFLJJVXjwSj9hteosYOpE=;
        b=iOzjMaTQo7d/R/B9pU30XyYjyhlkUEzHoG4m5x9Sgd3eXymuiHlGm6L0Iea0Mf6xjf
         bdk52kRVU5XnOzbA78mqeamGIf3E0AI7ogedzETv7iyKmWhxVQFJecTyC/NnZhyUgmUz
         UX9ZdEcmueIZr/UuD7KmfmAzP0hSGv4WGN2hXPcc3a0hU8f1Qs+L913KJz5ufPOZtUbN
         MUkFK7HNYzUMjPZfjRP4FyQRr+NV5rGqSKU/Srm22YtAcYBb9wnI4o3/7xJxrHKJkPzP
         YUljrauQmVQDOBMUL7zFNywYIU4TrPFlkdnq2YuElE4Zh71sK2GYaRnzHAZMjrs6jHuB
         5Gqg==
ARC-Authentication-Results: i=1; gmr-mx.google.com;
       dkim=pass header.i=@gmail.com header.s=20161025 header.b=GVGDOSc+;
       spf=pass (google.com: best guess record for domain of srs0=1ozf=el=gmail.com=ckoenig.leichtzumerken@kernel.org designates 198.145.29.99 as permitted sender) smtp.mailfrom=SRS0=1ozF=EL=gmail.com=ckoenig.leichtzumerken@kernel.org;
       dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gmail.com
Return-Path: <SRS0=1ozF=EL=gmail.com=ckoenig.leichtzumerken@kernel.org>
Received: from mail.kernel.org (mail.kernel.org. [198.145.29.99])
        by gmr-mx.google.com with ESMTPS id q187si111650iof.3.2018.01.16.01.43.23
        for <bjorn.helgaas@gmail.com>
        (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
        Tue, 16 Jan 2018 01:43:23 -0800 (PST)
Received-SPF: pass (google.com: best guess record for domain of srs0=1ozf=el=gmail.com=ckoenig.leichtzumerken@kernel.org designates 198.145.29.99 as permitted sender) client-ip=198.145.29.99;
Received: by mail.kernel.org (Postfix)
	id F3EEC2175A; Tue, 16 Jan 2018 09:43:22 +0000 (UTC)
Delivered-To: helgaas@kernel.org
Received: from mail-wr0-f195.google.com (mail-wr0-f195.google.com [209.85.128.195])
	(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
	(No client certificate requested)
	by mail.kernel.org (Postfix) with ESMTPS id A20A321721
	for <helgaas@kernel.org>; Tue, 16 Jan 2018 09:43:22 +0000 (UTC)
DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A20A321721
Received: by mail-wr0-f195.google.com with SMTP id x1so10325307wrb.5
        for <helgaas@kernel.org>; Tue, 16 Jan 2018 01:43:22 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=20161025;
        h=from:to:subject:date:message-id:mime-version
         :content-transfer-encoding;
        bh=hzppptlGn4tFqrDkRYJ7RoxFLJJVXjwSj9hteosYOpE=;
        b=GVGDOSc+JQLxWxVzoyB0Erz0hb/roWLx03Ux9WXjwcMH6aBMxJFMKYlaSpV9dtGyON
         ffvNQQ6QQzg98Hb+ECLtVQSP/Q1VsVd6x0+rYBZSPRch7/J9/vhIj13r6Mpda7wEG9aZ
         ze7oBWbOtE1NzjuEoz4KOiRXJGBHbpbcJWhQDsrUg+m93nrAg5tKcHQr5AxX50Ju18dq
         G2XtVFvCuqGgX6NIDO5K+gVm/dQes3TnggIDosk9JQnOM5kqJOzB78ma3nKu6JJz7lax
         xgE941l4+nUj0Hul8t7nGLKLkkEMxJhHJoV1g77u5Nb7AU8zkZ5qIvnm4Xc/vX+vgdoy
         nCXw==
X-Received: by 10.223.130.196 with SMTP id 62mr21743248wrc.145.1516095800635;
        Tue, 16 Jan 2018 01:43:20 -0800 (PST)
Received: from localhost.localdomain ([2a02:908:1251:8fc0:4055:4d34:fc66:f7ad])
        by smtp.gmail.com with ESMTPSA id r5sm2315057wrr.1.2018.01.16.01.43.19
        (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
        Tue, 16 Jan 2018 01:43:20 -0800 (PST)
From: "=?UTF-8?q?Christian=20K=C3=B6nig?=" <ckoenig.leichtzumerken@gmail.com>
X-Google-Original-From: =?UTF-8?q?Christian=20K=C3=B6nig?= <christian.koenig@amd.com>
To: helgaas@kernel.org,
	bhelgaas@google.com,
	linux-kernel@vger.kernel.org,
	linux-pci@vger.kernel.org
Subject: [PATCH] x86/PCI: apply the AMD window fixup on resume as well
Date: Tue, 16 Jan 2018 10:43:17 +0100
Message-Id: <20180116094317.1603-1-christian.koenig@amd.com>
X-Mailer: git-send-email 2.11.0
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-TUID: 0n+tVh75drLh
Status: RO
X-Status: A
Content-Length: 3157

We need to reprogram the register content during resume.

Signed-off-by: Christian König <christian.koenig@amd.com>
Reported-by: Tom St Denis <tom.stdenis@amd.com>
---
 arch/x86/pci/fixup.c | 32 ++++++++++++++++++++------------
 1 file changed, 20 insertions(+), 12 deletions(-)

diff --git a/arch/x86/pci/fixup.c b/arch/x86/pci/fixup.c
index f6a26e3cb476..8f3b1a6278e6 100644
--- a/arch/x86/pci/fixup.c
+++ b/arch/x86/pci/fixup.c
@@ -662,11 +662,11 @@ DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_INTEL, 0x2033, quirk_no_aersid);
  */
 static void pci_amd_enable_64bit_bar(struct pci_dev *dev)
 {
+	static const char *name = "PCI Bus 0000:00";
+	struct resource *res, *conflict;
 	u32 base, limit, high;
 	struct pci_dev *other;
-	struct resource *res;
 	unsigned i;
-	int r;
 
 	if (!(pci_probe & PCI_BIG_ROOT_WINDOW))
 		return;
@@ -707,21 +707,26 @@ static void pci_amd_enable_64bit_bar(struct pci_dev *dev)
 	 * Allocate a 256GB window directly below the 0xfd00000000 hardware
 	 * limit (see AMD Family 15h Models 30h-3Fh BKDG, sec 2.4.6).
 	 */
-	res->name = "PCI Bus 0000:00";
+	res->name = name;
 	res->flags = IORESOURCE_PREFETCH | IORESOURCE_MEM |
 		IORESOURCE_MEM_64 | IORESOURCE_WINDOW;
 	res->start = 0xbd00000000ull;
 	res->end = 0xfd00000000ull - 1;
 
-	r = request_resource(&iomem_resource, res);
-	if (r) {
+	conflict = request_resource_conflict(&iomem_resource, res);
+	if (conflict) {
 		kfree(res);
-		return;
-	}
+		if (conflict->name != name)
+			return;
 
-	dev_info(&dev->dev, "adding root bus resource %pR (tainting kernel)\n",
-		 res);
-	add_taint(TAINT_FIRMWARE_WORKAROUND, LOCKDEP_STILL_OK);
+		/* We are resuming from suspend, just reprogram the regs. */
+		res = conflict;
+	} else {
+		dev_info(&dev->dev, "adding root bus resource %pR (tainting kernel)\n",
+			 res);
+		add_taint(TAINT_FIRMWARE_WORKAROUND, LOCKDEP_STILL_OK);
+		pci_bus_add_resource(dev->bus, res, 0);
+	}
 
 	base = ((res->start >> 8) & AMD_141b_MMIO_BASE_MMIOBASE_MASK) |
 		AMD_141b_MMIO_BASE_RE_MASK | AMD_141b_MMIO_BASE_WE_MASK;
@@ -733,13 +738,16 @@ static void pci_amd_enable_64bit_bar(struct pci_dev *dev)
 	pci_write_config_dword(dev, AMD_141b_MMIO_HIGH(i), high);
 	pci_write_config_dword(dev, AMD_141b_MMIO_LIMIT(i), limit);
 	pci_write_config_dword(dev, AMD_141b_MMIO_BASE(i), base);
-
-	pci_bus_add_resource(dev->bus, res, 0);
 }
 DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_AMD, 0x1401, pci_amd_enable_64bit_bar);
 DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_AMD, 0x141b, pci_amd_enable_64bit_bar);
 DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_AMD, 0x1571, pci_amd_enable_64bit_bar);
 DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_AMD, 0x15b1, pci_amd_enable_64bit_bar);
 DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_AMD, 0x1601, pci_amd_enable_64bit_bar);
+DECLARE_PCI_FIXUP_RESUME(PCI_VENDOR_ID_AMD, 0x1401, pci_amd_enable_64bit_bar);
+DECLARE_PCI_FIXUP_RESUME(PCI_VENDOR_ID_AMD, 0x141b, pci_amd_enable_64bit_bar);
+DECLARE_PCI_FIXUP_RESUME(PCI_VENDOR_ID_AMD, 0x1571, pci_amd_enable_64bit_bar);
+DECLARE_PCI_FIXUP_RESUME(PCI_VENDOR_ID_AMD, 0x15b1, pci_amd_enable_64bit_bar);
+DECLARE_PCI_FIXUP_RESUME(PCI_VENDOR_ID_AMD, 0x1601, pci_amd_enable_64bit_bar);
 
 #endif
-- 
2.11.0



^ permalink raw reply related	[flat|nested] 14+ messages in thread

* Re: [GIT PULL] PCI fixes for v4.15
  2018-01-24 16:20       ` Bjorn Helgaas
@ 2018-01-24 16:40         ` Linus Torvalds
  2018-01-24 17:27           ` Christian König
  2018-01-24 20:25           ` Peter Grayson
  0 siblings, 2 replies; 14+ messages in thread
From: Linus Torvalds @ 2018-01-24 16:40 UTC (permalink / raw)
  To: Bjorn Helgaas
  Cc: Peter Grayson, Catalin Marinas, linux-pci,
	Linux Kernel Mailing List, Lorenzo Pieralisi,
	Christian König, Aaro Koskinen, Andy Shevchenko,
	Boris Ostrovsky, Juergen Gross, Alex Deucher, David Airlie

On Wed, Jan 24, 2018 at 8:20 AM, Bjorn Helgaas <helgaas@kernel.org> wrote:
>> Bjorn, maybe you can send Catalin an example mbox?
>
> Attaching the one I used above.

Heh. That's a mess. It has

    Content-Type: text/plain; charset=UTF-8

but then the name in the body is actually Latin1-encoded if I read it correctly.

Git will auto-convert invalid utf-8 by assuming it is latin1, so it
all ends up working, but Christian did something wrong in his mailer
too.

I suspect that the reason stgit screws up is the quoting of the name:

   From: "=?UTF-8?q?Christian=20K=C3=B6nig?=" <ckoenig.leichtzumerken@gmail.com>

maybe stgit thinks that quoting means "no charset translation".

But I'll leave it to Catalin & co to figure out. The last stgit commit
was just a few days ago, so it seems to be maintained.

Bjorn: it might be worth it trying to the very latest stgit:

    git://repo.or.cz/stgit.git

because there are _some_ locale changes in there.

                 Linus

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [GIT PULL] PCI fixes for v4.15
  2018-01-24  1:04     ` Linus Torvalds
  2018-01-24  7:17       ` Andy Shevchenko
  2018-01-24 16:20       ` Bjorn Helgaas
@ 2018-01-24 16:45       ` Peter Grayson
  2 siblings, 0 replies; 14+ messages in thread
From: Peter Grayson @ 2018-01-24 16:45 UTC (permalink / raw)
  To: Bjorn Helgaas
  Cc: Linus Torvalds, Peter Grayson, Catalin Marinas, linux-pci,
	Linux Kernel Mailing List, Lorenzo Pieralisi,
	Christian König, Aaro Koskinen, Andy Shevchenko,
	Boris Ostrovsky, Juergen Gross, Alex Deucher, David Airlie

On Tue, Jan 23, 2018 at 05:04:22PM -0800, Linus Torvalds wrote:
> On Tue, Jan 23, 2018 at 4:46 PM, Bjorn Helgaas <helgaas@kernel.org> wrote:
> > On Tue, Jan 23, 2018 at 12:49:22PM -0800, Linus Torvalds wrote:
> 
> > Applying that patch with "git am" results in the correct
> >
> >   Author: Christian König <ckoenig.leichtzumerken@gmail.com
> 
> But apparently stgit does not:
> 
> > Applying the identical patch with "stg import -M" results in
> >
> >   Author: =?UTF-8?q?Christian=20K=C3=B6nig?= <ckoenig.leichtzumerken@gmail.com>
> 
> I'm adding Peter Grayson and Catalin Marinas to the participants,
> since they seem to be the main stgit developers.

It it probable that I caused this stgit regression with changes to make
stgit compatible with Python 3. Mea culpa.

The issue is possibly already repaired. Catalin recently (a few days
ago) merged repairs for several related email encoding regressions.

> Bjorn, maybe you can send Catalin an example mbox?

An example mbox or even just forwarding the email with the patch in
question would be helpful.

Also helpful would be the versions of stgit and python being used along
with the LC_ALL and LANG environment variables used when running `stg
import`.

Thanks,
Pete

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [GIT PULL] PCI fixes for v4.15
  2018-01-24 16:40         ` Linus Torvalds
@ 2018-01-24 17:27           ` Christian König
  2018-01-24 20:25           ` Peter Grayson
  1 sibling, 0 replies; 14+ messages in thread
From: Christian König @ 2018-01-24 17:27 UTC (permalink / raw)
  To: Linus Torvalds, Bjorn Helgaas
  Cc: Peter Grayson, Catalin Marinas, linux-pci,
	Linux Kernel Mailing List, Lorenzo Pieralisi, Aaro Koskinen,
	Andy Shevchenko, Boris Ostrovsky, Juergen Gross, Alex Deucher,
	David Airlie

Am 24.01.2018 um 17:40 schrieb Linus Torvalds:
> On Wed, Jan 24, 2018 at 8:20 AM, Bjorn Helgaas <helgaas@kernel.org> wrote:
>>> Bjorn, maybe you can send Catalin an example mbox?
>> Attaching the one I used above.
> Heh. That's a mess. It has
>
>      Content-Type: text/plain; charset=UTF-8
>
> but then the name in the body is actually Latin1-encoded if I read it correctly.

Yes, looks like it.

> Git will auto-convert invalid utf-8 by assuming it is latin1, so it
> all ends up working, but Christian did something wrong in his mailer
> too.

The mailer I used was just "git send-email" and I just confirmed with 
hexdump that my .gitconfig contains the name in utf-8.

And when I use "git format-patch" the resulting file contains the name 
in utf-8 as well.

So, no idea when that got translated to latin1.

Regards,
Christian.

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [GIT PULL] PCI fixes for v4.15
  2018-01-24 16:40         ` Linus Torvalds
  2018-01-24 17:27           ` Christian König
@ 2018-01-24 20:25           ` Peter Grayson
  2018-01-24 20:48             ` Linus Torvalds
  1 sibling, 1 reply; 14+ messages in thread
From: Peter Grayson @ 2018-01-24 20:25 UTC (permalink / raw)
  To: Linus Torvalds
  Cc: Bjorn Helgaas, Catalin Marinas, linux-pci,
	Linux Kernel Mailing List, Lorenzo Pieralisi,
	Christian König, Aaro Koskinen, Andy Shevchenko,
	Boris Ostrovsky, Juergen Gross, Alex Deucher, David Airlie

On Wed, Jan 24, 2018 at 08:40:50AM -0800, Linus Torvalds wrote:
> On Wed, Jan 24, 2018 at 8:20 AM, Bjorn Helgaas <helgaas@kernel.org> wrote:
> >> Bjorn, maybe you can send Catalin an example mbox?
> >
> > Attaching the one I used above.
> 
> Heh. That's a mess. It has
> 
>     Content-Type: text/plain; charset=UTF-8
> 
> but then the name in the body is actually Latin1-encoded if I read it correctly.
> 
> Git will auto-convert invalid utf-8 by assuming it is latin1, so it
> all ends up working, but Christian did something wrong in his mailer
> too.

The latest stgit release (v0.18) ignores any mis-encoding of the email
body. However, stgit master now decodes email bodies and is thus exposed
to this kind of stray latin-1 character in a UTF-8 body.

I believe stgit's goal should be to identify and repair this kind of
issue as git does. I will be working on that.

> I suspect that the reason stgit screws up is the quoting of the name:
> 
>    From: "=?UTF-8?q?Christian=20K=C3=B6nig?=" <ckoenig.leichtzumerken@gmail.com>
> 
> maybe stgit thinks that quoting means "no charset translation".

Thank you for pointing-out this quoting. You are correct that it is part
of the problem for stgit.

The Python2 email module seems to treat the encoded words within the
quotes literally, which leads to the problem at-hand where the encoded
words are being mapped to the Author field of the git commit.

> But I'll leave it to Catalin & co to figure out. The last stgit commit
> was just a few days ago, so it seems to be maintained.
> 
> Bjorn: it might be worth it trying to the very latest stgit:
> 
>     git://repo.or.cz/stgit.git
> 
> because there are _some_ locale changes in there.

Unfortunately, the head of stgit master does not yet solve this issue. I
am working to remedy that.

Pete

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [GIT PULL] PCI fixes for v4.15
  2018-01-24 20:25           ` Peter Grayson
@ 2018-01-24 20:48             ` Linus Torvalds
  0 siblings, 0 replies; 14+ messages in thread
From: Linus Torvalds @ 2018-01-24 20:48 UTC (permalink / raw)
  To: Peter Grayson
  Cc: Bjorn Helgaas, Catalin Marinas, linux-pci,
	Linux Kernel Mailing List, Lorenzo Pieralisi,
	Christian König, Aaro Koskinen, Andy Shevchenko,
	Boris Ostrovsky, Juergen Gross, Alex Deucher, David Airlie

On Wed, Jan 24, 2018 at 12:25 PM, Peter Grayson <jpgrayson@gmail.com> wrote:
>
> The latest stgit release (v0.18) ignores any mis-encoding of the email
> body. However, stgit master now decodes email bodies and is thus exposed
> to this kind of stray latin-1 character in a UTF-8 body.
>
> I believe stgit's goal should be to identify and repair this kind of
> issue as git does. I will be working on that.

Yes, good. The "latin1 vs utf-8" confusion is sadly still somewhat
common in Western Europe, from personal experience. People just got
used to Latin1 working almost by accident without any explicit
encoding, possibly _because_ it also acts as the first 256 bytes of
unicode.

I suspect the old 8-bit DOS character set (aka "code page 437") is
perhaps even more commonly seen in some situations, just not in unix
development contexts.. And it lacks a number of the (admittedly rarer)
European accented characters anyway.

So git basically first does a conversion according to the stated
encoding, but after that conversion it will then do another pass to
actually verify that the end result is valid utf-8, and if not, do the
(trivial) latin1 -> utf-8 conversion.

And part of the reason for that latin1 special case is very much the
whole "it's trivial" part. So it's not _just_ about "common error in
western emails", it's also simply that Latin1 really is special in the
Unicode domain.

No other character set has that trivial conversion into utf-8.

See verify_utf8() in commit.c in the git code.

> Unfortunately, the head of stgit master does not yet solve this issue. I
> am working to remedy that.

Thanks. We used to be *horrible* about getting "complex" names right
in the kernel logs, but I've tried to make sure that we actually get
this right and have proper names for the last many years.

              Linus

^ permalink raw reply	[flat|nested] 14+ messages in thread

* [GIT PULL] PCI fixes for v4.15
@ 2018-01-12 20:22 Bjorn Helgaas
  0 siblings, 0 replies; 14+ messages in thread
From: Bjorn Helgaas @ 2018-01-12 20:22 UTC (permalink / raw)
  To: Linus Torvalds
  Cc: linux-pci, linux-kernel, Lorenzo Pieralisi, Christian König,
	Aaro Koskinen, Andy Shevchenko, Boris Ostrovsky, Juergen Gross,
	Alex Deucher, David Airlie

PCI fixes:

  - fix AMD boot regression due to 64-bit window conflicting with system
    memory (Christian König)


The following changes since commit 1291a0d5049dbc06baaaf66a9ff3f53db493b19b:

  Linux 4.15-rc4 (2017-12-17 18:59:59 -0800)

are available in the Git repository at:

  ssh://git@gitolite.kernel.org/pub/scm/linux/kernel/git/helgaas/pci.git tags/pci-v4.15-fixes-2

for you to fetch changes up to 03a551734cfc2b93f83950a595974e3c9cbd82fd:

  x86/PCI: Move and shrink AMD 64-bit window to avoid conflict (2018-01-11 12:01:58 -0600)

----------------------------------------------------------------
pci-v4.15-fixes-2

----------------------------------------------------------------
Christian König (2):
      x86/PCI: Add "pci=big_root_window" option for AMD 64-bit windows
      x86/PCI: Move and shrink AMD 64-bit window to avoid conflict

 Documentation/admin-guide/kernel-parameters.txt |  6 +++++
 arch/x86/include/asm/pci_x86.h                  |  1 +
 arch/x86/pci/common.c                           |  5 +++++
 arch/x86/pci/fixup.c                            | 29 +++++++++++++++----------
 4 files changed, 30 insertions(+), 11 deletions(-)

^ permalink raw reply	[flat|nested] 14+ messages in thread

* [GIT PULL] PCI fixes for v4.15
@ 2017-12-14 23:34 Bjorn Helgaas
  0 siblings, 0 replies; 14+ messages in thread
From: Bjorn Helgaas @ 2017-12-14 23:34 UTC (permalink / raw)
  To: Linus Torvalds
  Cc: linux-pci, linux-kernel, Lorenzo Pieralisi, Geert Uytterhoeven,
	Simon Horman, Christian König, Randy Dunlap, Arnd Bergmann,
	Guenter Roeck, Ingo Molnar

PCI fixes:

  - add a pci_get_domain_bus_and_slot() stub for the CONFIG_PCI=n case to
    avoid build breakage in the v4.16 merge window if a
    pci_get_bus_and_slot() -> pci_get_domain_bus_and_slot() patch gets
    merged before the PCI tree (Randy Dunlap)

  - fix an AMD boot regression in the 64bit BAR support added in v4.15
    (Christian König)

  - fix an R-Car use-after-free that causes a crash if no PCIe card is
    present (Geert Uytterhoeven)


The following changes since commit 4fbd8d194f06c8a3fd2af1ce560ddb31f7ec8323:

  Linux 4.15-rc1 (2017-11-26 16:01:47 -0800)

are available in the Git repository at:

  ssh://git@gitolite.kernel.org/pub/scm/linux/kernel/git/helgaas/pci.git tags/pci-v4.15-fixes-1

for you to fetch changes up to 0c31f1d7be1b5c4858b1d714dcefa25f41428cab:

  PCI: rcar: Fix use-after-free in probe error path (2017-12-12 11:01:47 -0600)

----------------------------------------------------------------
pci-v4.15-fixes-1

----------------------------------------------------------------
Christian König (2):
      x86/PCI: Fix infinite loop in search for 64bit BAR placement
      x86/PCI: Only enable a 64bit BAR on single-socket AMD Family 15h

Geert Uytterhoeven (1):
      PCI: rcar: Fix use-after-free in probe error path

Randy Dunlap (1):
      PCI: Add pci_get_domain_bus_and_slot() stub

 arch/x86/pci/fixup.c         | 27 +++++++++++++++++++++------
 drivers/pci/host/pcie-rcar.c |  8 ++++----
 include/linux/pci.h          |  3 +++
 3 files changed, 28 insertions(+), 10 deletions(-)

^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2018-01-24 20:48 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-01-23 19:56 [GIT PULL] PCI fixes for v4.15 Bjorn Helgaas
2018-01-23 20:49 ` Linus Torvalds
2018-01-23 20:53   ` Linus Torvalds
2018-01-24  0:46   ` Bjorn Helgaas
2018-01-24  1:04     ` Linus Torvalds
2018-01-24  7:17       ` Andy Shevchenko
2018-01-24 16:20       ` Bjorn Helgaas
2018-01-24 16:40         ` Linus Torvalds
2018-01-24 17:27           ` Christian König
2018-01-24 20:25           ` Peter Grayson
2018-01-24 20:48             ` Linus Torvalds
2018-01-24 16:45       ` Peter Grayson
  -- strict thread matches above, loose matches on Subject: below --
2018-01-12 20:22 Bjorn Helgaas
2017-12-14 23:34 Bjorn Helgaas

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).