linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ARM: Implement pgprot_device()
@ 2019-01-14 13:56 Vincent Whitchurch
  2019-01-15 10:24 ` Russell King - ARM Linux admin
  0 siblings, 1 reply; 6+ messages in thread
From: Vincent Whitchurch @ 2019-01-14 13:56 UTC (permalink / raw)
  To: linux; +Cc: Vincent Whitchurch, linux-arm-kernel

This is used when mmapping the PCI resource* files in sys.  Because ARM
currently lacks an implementation of pgprot_device(), it falls back to
pgprot_uncached() (Strongly Ordered), but we should be able to use
Device memory instead.

Doing this speeds up large writes to the resource files by about 40% on
one of my systems.  It also ensures that mmaps on these resources use
the same memory type as ioremap().

Signed-off-by: Vincent Whitchurch <vincent.whitchurch@axis.com>
---
 arch/arm/include/asm/pgtable.h | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/arch/arm/include/asm/pgtable.h b/arch/arm/include/asm/pgtable.h
index a757401129f9..48ce1b19069b 100644
--- a/arch/arm/include/asm/pgtable.h
+++ b/arch/arm/include/asm/pgtable.h
@@ -125,6 +125,9 @@ extern pgprot_t		pgprot_s2_device;
 #define pgprot_stronglyordered(prot) \
 	__pgprot_modify(prot, L_PTE_MT_MASK, L_PTE_MT_UNCACHED)
 
+#define pgprot_device(prot) \
+	__pgprot_modify(prot, L_PTE_MT_MASK, L_PTE_MT_DEV_SHARED | L_PTE_SHARED | L_PTE_DIRTY | L_PTE_XN)
+
 #ifdef CONFIG_ARM_DMA_MEM_BUFFERABLE
 #define pgprot_dmacoherent(prot) \
 	__pgprot_modify(prot, L_PTE_MT_MASK, L_PTE_MT_BUFFERABLE | L_PTE_XN)
-- 
2.20.0


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH] ARM: Implement pgprot_device()
  2019-01-14 13:56 [PATCH] ARM: Implement pgprot_device() Vincent Whitchurch
@ 2019-01-15 10:24 ` Russell King - ARM Linux admin
  2019-01-15 15:08   ` Vincent Whitchurch
  0 siblings, 1 reply; 6+ messages in thread
From: Russell King - ARM Linux admin @ 2019-01-15 10:24 UTC (permalink / raw)
  To: Vincent Whitchurch; +Cc: Vincent Whitchurch, linux-arm-kernel

On Mon, Jan 14, 2019 at 02:56:38PM +0100, Vincent Whitchurch wrote:
> This is used when mmapping the PCI resource* files in sys.  Because ARM
> currently lacks an implementation of pgprot_device(), it falls back to
> pgprot_uncached() (Strongly Ordered), but we should be able to use
> Device memory instead.
> 
> Doing this speeds up large writes to the resource files by about 40% on
> one of my systems.  It also ensures that mmaps on these resources use
> the same memory type as ioremap().
> 
> Signed-off-by: Vincent Whitchurch <vincent.whitchurch@axis.com>

Please drop this into the patch system, thanks.

(Please also note that stuff here has been undergoing a progressive
major reorganisation and renovation, so I hope that still works!  Note
that the website now supports https as of last night!)

-- 
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTC broadband for 0.8mile line in suburbia: sync at 12.1Mbps down 622kbps up
According to speedtest.net: 11.9Mbps down 500kbps up

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH] ARM: Implement pgprot_device()
  2019-01-15 10:24 ` Russell King - ARM Linux admin
@ 2019-01-15 15:08   ` Vincent Whitchurch
  2019-01-15 17:04     ` Russell King - ARM Linux admin
  0 siblings, 1 reply; 6+ messages in thread
From: Vincent Whitchurch @ 2019-01-15 15:08 UTC (permalink / raw)
  To: Russell King - ARM Linux admin; +Cc: linux-arm-kernel

On Tue, Jan 15, 2019 at 10:24:29AM +0000, Russell King - ARM Linux admin wrote:
> Please drop this into the patch system, thanks.
> 
> (Please also note that stuff here has been undergoing a progressive
> major reorganisation and renovation, so I hope that still works!  Note
> that the website now supports https as of last night!)

The login page in the patch system doesn't seem to work if I go to it
from the https://www.armlinux.org.uk/developer/ page.  I always get the
"Error: The server detected that the session cookie was not retained by
your browser, or returned to the server..." message.  It only works if I
go to the login page
(https://www.armlinux.org.uk/utils/login.php?url=/developer/) directly
in a new incognito browser session.

I've tried several different browsers from two different networks so it
seems unlikely that the problem is on the client side.

Attempting to log in (from the incognito session) results in:

 Could not get user id: SQLSTATE[42000]: Syntax error or access
 violation: 1064 You have an error in your SQL syntax; check the manual
 that corresponds to your MySQL server version for the right syntax to
 use near 'foo@bar.com'' and password=PASSWORD(''foo'')' at line 1

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH] ARM: Implement pgprot_device()
  2019-01-15 15:08   ` Vincent Whitchurch
@ 2019-01-15 17:04     ` Russell King - ARM Linux admin
  2019-01-16 10:22       ` Vincent Whitchurch
  0 siblings, 1 reply; 6+ messages in thread
From: Russell King - ARM Linux admin @ 2019-01-15 17:04 UTC (permalink / raw)
  To: Vincent Whitchurch; +Cc: linux-arm-kernel

On Tue, Jan 15, 2019 at 04:08:16PM +0100, Vincent Whitchurch wrote:
> The login page in the patch system doesn't seem to work if I go to it
> from the https://www.armlinux.org.uk/developer/ page.  I always get the
> "Error: The server detected that the session cookie was not retained by
> your browser, or returned to the server..." message.  It only works if I
> go to the login page
> (https://www.armlinux.org.uk/utils/login.php?url=/developer/) directly
> in a new incognito browser session.
> 
> I've tried several different browsers from two different networks so it
> seems unlikely that the problem is on the client side.
> 
> Attempting to log in (from the incognito session) results in:
> 
>  Could not get user id: SQLSTATE[42000]: Syntax error or access
>  violation: 1064 You have an error in your SQL syntax; check the manual
>  that corresponds to your MySQL server version for the right syntax to
>  use near 'foo@bar.com'' and password=PASSWORD(''foo'')' at line 1

Argh, soo many problems!  Okay, should be resolved, and I hope I got
all the places where <unprintable> PHP has changed. ;)  Sorry about
that.

-- 
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTC broadband for 0.8mile line in suburbia: sync at 12.1Mbps down 622kbps up
According to speedtest.net: 11.9Mbps down 500kbps up

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH] ARM: Implement pgprot_device()
  2019-01-15 17:04     ` Russell King - ARM Linux admin
@ 2019-01-16 10:22       ` Vincent Whitchurch
  2019-01-16 12:23         ` Russell King - ARM Linux admin
  0 siblings, 1 reply; 6+ messages in thread
From: Vincent Whitchurch @ 2019-01-16 10:22 UTC (permalink / raw)
  To: Russell King - ARM Linux admin; +Cc: linux-arm-kernel

On Tue, Jan 15, 2019 at 05:04:15PM +0000, Russell King - ARM Linux admin wrote:
> Argh, soo many problems!  Okay, should be resolved, and I hope I got
> all the places where <unprintable> PHP has changed. ;)  Sorry about
> that.

Thanks, the website now works, but the mail server seems to always fail
to deliver email to patches@armlinux.org.uk.  I'm using the same setup
which I've successfully used to send patches to the patch system before.

 From: Mail Delivery System <Mailer-Daemon@armlinux.org.uk>
 Subject: Mail delivery failed: returning message to sender
 
 [-- Attachment #1 --]
 [-- Type: text/plain, Encoding: 7bit, Size: 0.3K --]
 
 This message was created automatically by mail delivery software.
 
 A message that you sent could not be delivered to one or more of its
 recipients. This is a permanent error. The following address(es) failed:
 
   patches@mail.armlinux.org.uk
     local delivery failed
 
 [-- Attachment #2 --]
 [-- Type: message/delivery-status, Encoding: 7bit, Size: 0.1K --]
 
 Reporting-MTA: dns; mail.armlinux.org.uk
 
 Action: failed
 Final-Recipient: rfc822;patches@mail.armlinux.org.uk
 Status: 5.0.0

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH] ARM: Implement pgprot_device()
  2019-01-16 10:22       ` Vincent Whitchurch
@ 2019-01-16 12:23         ` Russell King - ARM Linux admin
  0 siblings, 0 replies; 6+ messages in thread
From: Russell King - ARM Linux admin @ 2019-01-16 12:23 UTC (permalink / raw)
  To: Vincent Whitchurch; +Cc: linux-arm-kernel

On Wed, Jan 16, 2019 at 11:22:23AM +0100, Vincent Whitchurch wrote:
> On Tue, Jan 15, 2019 at 05:04:15PM +0000, Russell King - ARM Linux admin wrote:
> > Argh, soo many problems!  Okay, should be resolved, and I hope I got
> > all the places where <unprintable> PHP has changed. ;)  Sorry about
> > that.
> 
> Thanks, the website now works, but the mail server seems to always fail
> to deliver email to patches@armlinux.org.uk.  I'm using the same setup
> which I've successfully used to send patches to the patch system before.

Thanks for persisting and sorry for the ongoing hassle.  Looks like a
typo in the SQL grant tables for the new host name, which caused the
script to error out.  That should now be fixed.

-- 
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTC broadband for 0.8mile line in suburbia: sync at 12.1Mbps down 622kbps up
According to speedtest.net: 11.9Mbps down 500kbps up

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

end of thread, other threads:[~2019-01-16 12:26 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-01-14 13:56 [PATCH] ARM: Implement pgprot_device() Vincent Whitchurch
2019-01-15 10:24 ` Russell King - ARM Linux admin
2019-01-15 15:08   ` Vincent Whitchurch
2019-01-15 17:04     ` Russell King - ARM Linux admin
2019-01-16 10:22       ` Vincent Whitchurch
2019-01-16 12:23         ` Russell King - ARM Linux admin

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).