[GHC] #10433: Fix load/store barriers in pre-ARMv7 builds
#10433: Fix load/store barriers in pre-ARMv7 builds -------------------------------------+------------------------------------- Reporter: | Owner: simonmar thoughtpolice | Status: new Type: bug | Milestone: 7.12.1 Priority: high | Version: Component: Runtime | Operating System: Unknown/Multiple System | Type of failure: None/Unknown Keywords: | Blocked By: Architecture: arm | Related Tickets: #10244 Test Case: | Blocking: | Differential Revisions: | -------------------------------------+------------------------------------- As pointed out in #10244 and Phab:D894, the fix we committed for this problem isn't 100% correct - from 753b156dc6b0c38b106c390952750fb800bf27e7: {{{ #elif arm_HOST_ARCH && defined(arm_HOST_ARCH_PRE_ARMv7) // TODO FIXME: This case probably isn't totally correct - just because we // use a pre-ARMv7 toolchain (e.g. to target an old Android device), doesn't // mean the binary won't run on a newer ARMv7 system - in which case it // needs a proper barrier. So we should rethink this // - Reid __asm__ __volatile__ ("" : : : "memory"); }}} This is a reminder to fix this. -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/10433> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#10433: Fix load/store barriers in pre-ARMv7 builds -------------------------------------+----------------------------------- Reporter: thoughtpolice | Owner: rwbarton Type: bug | Status: new Priority: high | Milestone: 7.12.1 Component: Runtime System | Version: Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: arm Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: #10244 | Differential Revisions: -------------------------------------+----------------------------------- Changes (by thoughtpolice): * owner: simonmar => rwbarton -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/10433#comment:1> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#10433: Fix load/store barriers in pre-ARMv7 builds -------------------------------------+--------------------------------- Reporter: thoughtpolice | Owner: Type: bug | Status: new Priority: high | Milestone: 7.12.1 Component: Runtime System | Version: Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: arm Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: #10244 | Differential Revisions: -------------------------------------+--------------------------------- Changes (by rwbarton): * owner: rwbarton => Comment: I won't be getting around to fixing this any time soon. The easy, conservative thing to do would be to set NOSMP if arm_HOST_ARCH_PRE_ARMv7 is defined. The fancy way would be to detect at runtime whether we are on a system that supports memory barriers and patch them in if so (like Linux's altinstructions). Probably too fancy... -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/10433#comment:2> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#10433: Fix load/store barriers in pre-ARMv7 builds -------------------------------------+----------------------------- Reporter: thoughtpolice | Owner: Type: bug | Status: new Priority: high | Milestone: 8.0.1 Component: Runtime System | Version: Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: arm Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: #10244 | Differential Rev(s): Wiki Page: | -------------------------------------+----------------------------- Changes (by erikd): * cc: erikd (added) -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/10433#comment:4> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#10433: Fix load/store barriers in pre-ARMv7 builds -------------------------------------+---------------------------------- Reporter: thoughtpolice | Owner: Type: bug | Status: patch Priority: high | Milestone: 8.0.1 Component: Runtime System | Version: Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: arm Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: #10244 | Differential Rev(s): Phab:D1704 Wiki Page: | -------------------------------------+---------------------------------- Changes (by bgamari): * status: new => patch * differential: => Phab:D1704 -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/10433#comment:5> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#10433: Fix load/store barriers in pre-ARMv7 builds -------------------------------------+---------------------------------- Reporter: thoughtpolice | Owner: Type: bug | Status: patch Priority: high | Milestone: 8.0.1 Component: Runtime System | Version: Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: arm Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: #10244 | Differential Rev(s): Phab:D1704 Wiki Page: | -------------------------------------+---------------------------------- Comment (by bgamari): Is there anyone who could test Phab:D1704? -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/10433#comment:6> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#10433: Fix load/store barriers in pre-ARMv7 builds -------------------------------------+---------------------------------- Reporter: thoughtpolice | Owner: Type: bug | Status: infoneeded Priority: high | Milestone: 8.0.1 Component: Runtime System | Version: Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: arm Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: #10244 | Differential Rev(s): Phab:D1704 Wiki Page: | -------------------------------------+---------------------------------- Changes (by bgamari): * status: patch => infoneeded -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/10433#comment:7> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#10433: Fix load/store barriers in pre-ARMv7 builds -------------------------------------+---------------------------------- Reporter: thoughtpolice | Owner: Type: bug | Status: new Priority: high | Milestone: 8.0.1 Component: Runtime System | Version: Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: arm Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: #10244 | Differential Rev(s): Phab:D1704 Wiki Page: | -------------------------------------+---------------------------------- Changes (by bgamari): * status: infoneeded => new Comment: Reid has confirmed that this builds on Phab:D1704 with a cross-compiler for ARMv5. -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/10433#comment:8> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#10433: Fix load/store barriers in pre-ARMv7 builds -------------------------------------+---------------------------------- Reporter: thoughtpolice | Owner: Type: bug | Status: merge Priority: high | Milestone: 8.0.1 Component: Runtime System | Version: Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: arm Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: #10244 | Differential Rev(s): Phab:D1704 Wiki Page: | -------------------------------------+---------------------------------- Changes (by bgamari): * status: new => merge -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/10433#comment:9> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#10433: Fix load/store barriers in pre-ARMv7 builds -------------------------------------+---------------------------------- Reporter: thoughtpolice | Owner: Type: bug | Status: merge Priority: high | Milestone: 8.0.1 Component: Runtime System | Version: Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: arm Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: #10244 | Differential Rev(s): Phab:D1704 Wiki Page: | -------------------------------------+---------------------------------- Comment (by Ben Gamari <ben@…>): In [changeset:"9fe7d20e2e5c60325ce04f476bc89fae06e43208/ghc" 9fe7d20e/ghc]: {{{ #!CommitTicketReference repository="ghc" revision="9fe7d20e2e5c60325ce04f476bc89fae06e43208" Ensure that we don't produce code for pre-ARMv7 without barriers We are unable to produce load/store barriers for pre-ARMv7 targets. Phab:D894 added dummy cases to SMP.h for these barriers to prevent the build from failing under the assumption that there are no SMP-capable devices of this vintage. However, #10433 points out that it is more correct to simply set NOSMP for such targets. Tested By: rwbarton Test Plan: Validate Reviewers: erikd, rwbarton, austin Reviewed By: rwbarton Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D1704 GHC Trac Issues: #10433 }}} -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/10433#comment:10> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#10433: Fix load/store barriers in pre-ARMv7 builds -------------------------------------+---------------------------------- Reporter: thoughtpolice | Owner: Type: bug | Status: closed Priority: high | Milestone: 8.0.1 Component: Runtime System | Version: Resolution: fixed | Keywords: Operating System: Unknown/Multiple | Architecture: arm Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: #10244 | Differential Rev(s): Phab:D1704 Wiki Page: | -------------------------------------+---------------------------------- Changes (by bgamari): * status: merge => closed * resolution: => fixed Comment: Merged to `ghc-8.0` as 761d423ec2723137c67942718b4d6d793716acff. -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/10433#comment:11> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
participants (1)
-
GHC