GitHub PullRequestReviewCommentEvent at 2014-09-05 12:59:30
Repository: optee_os
Actor: jbech-linaro
Payload: {"action":"created","comment":{"url":"https://api.github.com/repos/OP-TEE/optee_os/pulls/comments/17170737","id":17170737,"diff_hunk":"@@ -45,28 +46,22 @@\n          */\n         .func tee_mmu_switch\n tee_mmu_switch:\n+        mrs     r3, cpsr        /* Save CPSR for later use */\n+        cpsid   if              /* Disable both IRQ and FIQ */\n \n-        /* save/mask IRQs/FIQs */\n-        mrs     r2, cpsr\n-        and     r3, r2, #CPSR_FIQ_IRQ_MASK\n-        orr     r2, r2, #CPSR_FIQ_IRQ_MASK\n-        msr     cpsr_cxsf, r2\n-        /* set reserved context id */\n+        /* Update the reserved Context ID and TTBR0 in CP15 */\n         dsb                     /* ARM erratum 754322 */\n         mov     r2, #0\n-        mcr     p15, 0, r2, c13, c0, 1\n+        write_context_id r2     /* Clear the CONTEXTIDR register */","path":"core/arch/arm32/mm/tee_mmu_unpg_asm.S","position":25,"original_position":25,"commit_id":"ff9cac0147f026379adf317afe5b69011b98e32a","original_commit_id":"ff9cac0147f026379adf317afe5b69011b98e32a","user":{"login":"jbech-linaro","id":6168937,"avatar_url":"https://avatars.githubusercontent.com/u/6168937?v=2","gravatar_id":"9955732ba77e9fad4a2cda92798ecb26","url":"https://api.github.com/users/jbech-linaro","html_url":"https://github.com/jbech-linaro","followers_url":"https://api.github.com/users/jbech-linaro/followers","following_url":"https://api.github.com/users/jbech-linaro/following{/other_user}","gists_url":"https://api.github.com/users/jbech-linaro/gists{/gist_id}","starred_url":"https://api.github.com/users/jbech-linaro/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jbech-linaro/subscriptions","organizations_url":"https://api.github.com/users/jbech-linaro/orgs","repos_url":"https://api.github.com/users/jbech-linaro/repos","events_url":"https://api.github.com/users/jbech-linaro/events{/privacy}","received_events_url":"https://api.github.com/users/jbech-linaro/received_events","type":"User","site_admin":false},"body":"I have no clue why we need to write a zero to the context id, when we're just a few lines below writing again, but with the value from the function arguments. I talked briefly about this with Jens, who said that that might be a necessary step when doing the switch. I have tried to find information about it, but failed to find anything. If anyone of you know if and why that is needed, please let me know.","created_at":"2014-09-05T12:59:30Z","updated_at":"2014-09-05T12:59:30Z","html_url":"https://github.com/OP-TEE/optee_os/pull/40#discussion_r17170737","pull_request_url":"https://api.github.com/repos/OP-TEE/optee_os/pulls/40","_links":{"self":{"href":"https://api.github.com/repos/OP-TEE/optee_os/pulls/comments/17170737"},"html":{"href":"https://github.com/OP-TEE/optee_os/pull/40#discussion_r17170737"},"pull_request":{"href":"https://api.github.com/repos/OP-TEE/optee_os/pulls/40"}}},"pull_request":{"url":"https://api.github.com/repos/OP-TEE/optee_os/pulls/40","id":20805964,"html_url":"https://github.com/OP-TEE/optee_os/pull/40","diff_url":"https://github.com/OP-TEE/optee_os/pull/40.diff","patch_url":"https://github.com/OP-TEE/optee_os/pull/40.patch","issue_url":"https://api.github.com/repos/OP-TEE/optee_os/issues/40","number":40,"state":"open","locked":false,"title":"MMU: Simplify tee_mmu_switch function","user":{"login":"jbech-linaro","id":6168937,"avatar_url":"https://avatars.githubusercontent.com/u/6168937?v=2","gravatar_id":"9955732ba77e9fad4a2cda92798ecb26","url":"https://api.github.com/users/jbech-linaro","html_url":"https://github.com/jbech-linaro","followers_url":"https://api.github.com/users/jbech-linaro/followers","following_url":"https://api.github.com/users/jbech-linaro/following{/other_user}","gists_url":"https://api.github.com/users/jbech-linaro/gists{/gist_id}","starred_url":"https://api.github.com/users/jbech-linaro/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jbech-linaro/subscriptions","organizations_url":"https://api.github.com/users/jbech-linaro/orgs","repos_url":"https://api.github.com/users/jbech-linaro/repos","events_url":"https://api.github.com/users/jbech-linaro/events{/privacy}","received_events_url":"https://api.github.com/users/jbech-linaro/received_events","type":"User","site_admin":false},"body":"Replaced direct CP15 instructions with macros instead and removed some\r\nunnecessary code.","created_at":"2014-09-05T12:56:09Z","updated_at":"2014-09-05T12:59:30Z","closed_at":null,"merged_at":null,"merge_commit_sha":"02e4a131e5b62b5c042cfebb20aafdb1f1b36b51","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/OP-TEE/optee_os/pulls/40/commits","review_comments_url":"https://api.github.com/repos/OP-TEE/optee_os/pulls/40/comments","review_comment_url":"https://api.github.com/repos/OP-TEE/optee_os/pulls/comments/{number}","comments_url":"https://api.github.com/repos/OP-TEE/optee_os/issues/40/comments","statuses_url":"https://api.github.com/repos/OP-TEE/optee_os/statuses/ff9cac0147f026379adf317afe5b69011b98e32a","head":{"label":"jbech-linaro:tee_mmu_switch","ref":"tee_mmu_switch","sha":"ff9cac0147f026379adf317afe5b69011b98e32a","user":{"login":"jbech-linaro","id":6168937,"avatar_url":"https://avatars.githubusercontent.com/u/6168937?v=2","gravatar_id":"9955732ba77e9fad4a2cda92798ecb26","url":"https://api.github.com/users/jbech-linaro","html_url":"https://github.com/jbech-linaro","followers_url":"https://api.github.com/users/jbech-linaro/followers","following_url":"https://api.github.com/users/jbech-linaro/following{/other_user}","gists_url":"https://api.github.com/users/jbech-linaro/gists{/gist_id}","starred_url":"https://api.github.com/users/jbech-linaro/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jbech-linaro/subscriptions","organizations_url":"https://api.github.com/users/jbech-linaro/orgs","repos_url":"https://api.github.com/users/jbech-linaro/repos","events_url":"https://api.github.com/users/jbech-linaro/events{/privacy}","received_events_url":"https://api.github.com/users/jbech-linaro/received_events","type":"User","site_admin":false},"repo":{"id":20800659,"name":"optee_os","full_name":"jbech-linaro/optee_os","owner":{"login":"jbech-linaro","id":6168937,"avatar_url":"https://avatars.githubusercontent.com/u/6168937?v=2","gravatar_id":"9955732ba77e9fad4a2cda92798ecb26","url":"https://api.github.com/users/jbech-linaro","html_url":"https://github.com/jbech-linaro","followers_url":"https://api.github.com/users/jbech-linaro/followers","following_url":"https://api.github.com/users/jbech-linaro/following{/other_user}","gists_url":"https://api.github.com/users/jbech-linaro/gists{/gist_id}","starred_url":"https://api.github.com/users/jbech-linaro/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jbech-linaro/subscriptions","organizations_url":"https://api.github.com/users/jbech-linaro/orgs","repos_url":"https://api.github.com/users/jbech-linaro/repos","events_url":"https://api.github.com/users/jbech-linaro/events{/privacy}","received_events_url":"https://api.github.com/users/jbech-linaro/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jbech-linaro/optee_os","description":"Trusted side of the TEE","fork":true,"url":"https://api.github.com/repos/jbech-linaro/optee_os","forks_url":"https://api.github.com/repos/jbech-linaro/optee_os/forks","keys_url":"https://api.github.com/repos/jbech-linaro/optee_os/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jbech-linaro/optee_os/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jbech-linaro/optee_os/teams","hooks_url":"https://api.github.com/repos/jbech-linaro/optee_os/hooks","issue_events_url":"https://api.github.com/repos/jbech-linaro/optee_os/issues/events{/number}","events_url":"https://api.github.com/repos/jbech-linaro/optee_os/events","assignees_url":"https://api.github.com/repos/jbech-linaro/optee_os/assignees{/user}","branches_url":"https://api.github.com/repos/jbech-linaro/optee_os/branches{/branch}","tags_url":"https://api.github.com/repos/jbech-linaro/optee_os/tags","blobs_url":"https://api.github.com/repos/jbech-linaro/optee_os/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jbech-linaro/optee_os/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jbech-linaro/optee_os/git/refs{/sha}","trees_url":"https://api.github.com/repos/jbech-linaro/optee_os/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jbech-linaro/optee_os/statuses/{sha}","languages_url":"https://api.github.com/repos/jbech-linaro/optee_os/languages","stargazers_url":"https://api.github.com/repos/jbech-linaro/optee_os/stargazers","contributors_url":"https://api.github.com/repos/jbech-linaro/optee_os/contributors","subscribers_url":"https://api.github.com/repos/jbech-linaro/optee_os/subscribers","subscription_url":"https://api.github.com/repos/jbech-linaro/optee_os/subscription","commits_url":"https://api.github.com/repos/jbech-linaro/optee_os/commits{/sha}","git_commits_url":"https://api.github.com/repos/jbech-linaro/optee_os/git/commits{/sha}","comments_url":"https://api.github.com/repos/jbech-linaro/optee_os/comments{/number}","issue_comment_url":"https://api.github.com/repos/jbech-linaro/optee_os/issues/comments/{number}","contents_url":"https://api.github.com/repos/jbech-linaro/optee_os/contents/{+path}","compare_url":"https://api.github.com/repos/jbech-linaro/optee_os/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jbech-linaro/optee_os/merges","archive_url":"https://api.github.com/repos/jbech-linaro/optee_os/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jbech-linaro/optee_os/downloads","issues_url":"https://api.github.com/repos/jbech-linaro/optee_os/issues{/number}","pulls_url":"https://api.github.com/repos/jbech-linaro/optee_os/pulls{/number}","milestones_url":"https://api.github.com/repos/jbech-linaro/optee_os/milestones{/number}","notifications_url":"https://api.github.com/repos/jbech-linaro/optee_os/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jbech-linaro/optee_os/labels{/name}","releases_url":"https://api.github.com/repos/jbech-linaro/optee_os/releases{/id}","created_at":"2014-06-13T10:24:23Z","updated_at":"2014-07-04T14:51:48Z","pushed_at":"2014-09-05T12:55:03Z","git_url":"git://github.com/jbech-linaro/optee_os.git","ssh_url":"git@github.com:jbech-linaro/optee_os.git","clone_url":"https://github.com/jbech-linaro/optee_os.git","svn_url":"https://github.com/jbech-linaro/optee_os","homepage":null,"size":1488,"stargazers_count":0,"watchers_count":0,"language":"C","has_issues":false,"has_downloads":true,"has_wiki":true,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"OP-TEE:master","ref":"master","sha":"f32550ee7ad262470e9ef65f76e9d41bc61fa3f9","user":{"login":"OP-TEE","id":7488961,"avatar_url":"https://avatars.githubusercontent.com/u/7488961?v=2","gravatar_id":null,"url":"https://api.github.com/users/OP-TEE","html_url":"https://github.com/OP-TEE","followers_url":"https://api.github.com/users/OP-TEE/followers","following_url":"https://api.github.com/users/OP-TEE/following{/other_user}","gists_url":"https://api.github.com/users/OP-TEE/gists{/gist_id}","starred_url":"https://api.github.com/users/OP-TEE/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/OP-TEE/subscriptions","organizations_url":"https://api.github.com/users/OP-TEE/orgs","repos_url":"https://api.github.com/users/OP-TEE/repos","events_url":"https://api.github.com/users/OP-TEE/events{/privacy}","received_events_url":"https://api.github.com/users/OP-TEE/received_events","type":"Organization","site_admin":false},"repo":{"id":20193261,"name":"optee_os","full_name":"OP-TEE/optee_os","owner":{"login":"OP-TEE","id":7488961,"avatar_url":"https://avatars.githubusercontent.com/u/7488961?v=2","gravatar_id":null,"url":"https://api.github.com/users/OP-TEE","html_url":"https://github.com/OP-TEE","followers_url":"https://api.github.com/users/OP-TEE/followers","following_url":"https://api.github.com/users/OP-TEE/following{/other_user}","gists_url":"https://api.github.com/users/OP-TEE/gists{/gist_id}","starred_url":"https://api.github.com/users/OP-TEE/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/OP-TEE/subscriptions","organizations_url":"https://api.github.com/users/OP-TEE/orgs","repos_url":"https://api.github.com/users/OP-TEE/repos","events_url":"https://api.github.com/users/OP-TEE/events{/privacy}","received_events_url":"https://api.github.com/users/OP-TEE/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/OP-TEE/optee_os","description":"Trusted side of the TEE","fork":false,"url":"https://api.github.com/repos/OP-TEE/optee_os","forks_url":"https://api.github.com/repos/OP-TEE/optee_os/forks","keys_url":"https://api.github.com/repos/OP-TEE/optee_os/keys{/key_id}","collaborators_url":"https://api.github.com/repos/OP-TEE/optee_os/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/OP-TEE/optee_os/teams","hooks_url":"https://api.github.com/repos/OP-TEE/optee_os/hooks","issue_events_url":"https://api.github.com/repos/OP-TEE/optee_os/issues/events{/number}","events_url":"https://api.github.com/repos/OP-TEE/optee_os/events","assignees_url":"https://api.github.com/repos/OP-TEE/optee_os/assignees{/user}","branches_url":"https://api.github.com/repos/OP-TEE/optee_os/branches{/branch}","tags_url":"https://api.github.com/repos/OP-TEE/optee_os/tags","blobs_url":"https://api.github.com/repos/OP-TEE/optee_os/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/OP-TEE/optee_os/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/OP-TEE/optee_os/git/refs{/sha}","trees_url":"https://api.github.com/repos/OP-TEE/optee_os/git/trees{/sha}","statuses_url":"https://api.github.com/repos/OP-TEE/optee_os/statuses/{sha}","languages_url":"https://api.github.com/repos/OP-TEE/optee_os/languages","stargazers_url":"https://api.github.com/repos/OP-TEE/optee_os/stargazers","contributors_url":"https://api.github.com/repos/OP-TEE/optee_os/contributors","subscribers_url":"https://api.github.com/repos/OP-TEE/optee_os/subscribers","subscription_url":"https://api.github.com/repos/OP-TEE/optee_os/subscription","commits_url":"https://api.github.com/repos/OP-TEE/optee_os/commits{/sha}","git_commits_url":"https://api.github.com/repos/OP-TEE/optee_os/git/commits{/sha}","comments_url":"https://api.github.com/repos/OP-TEE/optee_os/comments{/number}","issue_comment_url":"https://api.github.com/repos/OP-TEE/optee_os/issues/comments/{number}","contents_url":"https://api.github.com/repos/OP-TEE/optee_os/contents/{+path}","compare_url":"https://api.github.com/repos/OP-TEE/optee_os/compare/{base}...{head}","merges_url":"https://api.github.com/repos/OP-TEE/optee_os/merges","archive_url":"https://api.github.com/repos/OP-TEE/optee_os/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/OP-TEE/optee_os/downloads","issues_url":"https://api.github.com/repos/OP-TEE/optee_os/issues{/number}","pulls_url":"https://api.github.com/repos/OP-TEE/optee_os/pulls{/number}","milestones_url":"https://api.github.com/repos/OP-TEE/optee_os/milestones{/number}","notifications_url":"https://api.github.com/repos/OP-TEE/optee_os/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/OP-TEE/optee_os/labels{/name}","releases_url":"https://api.github.com/repos/OP-TEE/optee_os/releases{/id}","created_at":"2014-05-26T17:18:57Z","updated_at":"2014-09-02T07:45:21Z","pushed_at":"2014-09-05T08:31:14Z","git_url":"git://github.com/OP-TEE/optee_os.git","ssh_url":"git@github.com:OP-TEE/optee_os.git","clone_url":"https://github.com/OP-TEE/optee_os.git","svn_url":"https://github.com/OP-TEE/optee_os","homepage":null,"size":2047,"stargazers_count":8,"watchers_count":8,"language":"C","has_issues":true,"has_downloads":true,"has_wiki":true,"forks_count":11,"mirror_url":null,"open_issues_count":6,"forks":11,"open_issues":6,"watchers":8,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/OP-TEE/optee_os/pulls/40"},"html":{"href":"https://github.com/OP-TEE/optee_os/pull/40"},"issue":{"href":"https://api.github.com/repos/OP-TEE/optee_os/issues/40"},"comments":{"href":"https://api.github.com/repos/OP-TEE/optee_os/issues/40/comments"},"review_comments":{"href":"https://api.github.com/repos/OP-TEE/optee_os/pulls/40/comments"},"review_comment":{"href":"https://api.github.com/repos/OP-TEE/optee_os/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/OP-TEE/optee_os/pulls/40/commits"},"statuses":{"href":"https://api.github.com/repos/OP-TEE/optee_os/statuses/ff9cac0147f026379adf317afe5b69011b98e32a"}}}}