Changeset ae7d03c in mainline for kernel/arch


Ignore:
Timestamp:
2018-05-10T13:39:19Z (8 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
e8975278
Parents:
b277bef
git-author:
Jiri Svoboda <jiri@…> (2018-05-10 07:38:12)
git-committer:
Jiri Svoboda <jiri@…> (2018-05-10 13:39:19)
Message:

Selected ccheck-proposed comment fixes.

Location:
kernel/arch
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • kernel/arch/amd64/src/userspace.c

    rb277bef rae7d03c  
    5555
    5656        asm volatile (
    57                 "pushq %[udata_des]\n"
    58                 "pushq %[stack_top]\n"
    59                 "pushq %[rflags]\n"
    60                 "pushq %[utext_des]\n"
    61                 "pushq %[entry]\n"
    62                 "movq %[uarg], %%rax\n"
     57            "pushq %[udata_des]\n"
     58            "pushq %[stack_top]\n"
     59            "pushq %[rflags]\n"
     60            "pushq %[utext_des]\n"
     61            "pushq %[entry]\n"
     62            "movq %[uarg], %%rax\n"
    6363
    64                 /* %rdi is defined to hold pcb_ptr - set it to 0 */
    65                 "xorq %%rdi, %%rdi\n"
    66                 "iretq\n"
    67                 :: [udata_des] "i" (GDT_SELECTOR(UDATA_DES) | PL_USER),
    68                    [stack_top] "r" ((uint8_t *) kernel_uarg->uspace_stack +
    69                        kernel_uarg->uspace_stack_size),
    70                    [rflags] "r" (rflags),
    71                    [utext_des] "i" (GDT_SELECTOR(UTEXT_DES) | PL_USER),
    72                    [entry] "r" (kernel_uarg->uspace_entry),
    73                    [uarg] "r" (kernel_uarg->uspace_uarg)
    74                 : "rax"
     64            /* %rdi is defined to hold pcb_ptr - set it to 0 */
     65            "xorq %%rdi, %%rdi\n"
     66            "iretq\n"
     67            :: [udata_des] "i" (GDT_SELECTOR(UDATA_DES) | PL_USER),
     68              [stack_top] "r" ((uint8_t *) kernel_uarg->uspace_stack +
     69              kernel_uarg->uspace_stack_size),
     70              [rflags] "r" (rflags),
     71              [utext_des] "i" (GDT_SELECTOR(UTEXT_DES) | PL_USER),
     72              [entry] "r" (kernel_uarg->uspace_entry),
     73              [uarg] "r" (kernel_uarg->uspace_uarg)
     74            : "rax"
    7575        );
    7676
    7777        /* Unreachable */
    78         while (true);
     78        while (true)
     79                ;
    7980}
    8081
  • kernel/arch/arm32/src/cpu/cpu.c

    rb277bef rae7d03c  
    169169#endif
    170170#ifdef PROCESSOR_ARCH_armv7_a
    171          /* ICache coherency is elaborated on in barrier.h.
    172           * VIPT and PIPT caches need maintenance only on code modify,
    173           * so it should be safe for general use.
    174           * Enable branch predictors too as they follow the same rules
    175           * as ICache and they can be flushed together
    176           */
     171        /* ICache coherency is elaborated on in barrier.h.
     172         * VIPT and PIPT caches need maintenance only on code modify,
     173         * so it should be safe for general use.
     174         * Enable branch predictors too as they follow the same rules
     175         * as ICache and they can be flushed together
     176         */
    177177        if ((CTR_read() & CTR_L1I_POLICY_MASK) != CTR_L1I_POLICY_AIVIVT) {
    178178                control_reg |=
  • kernel/arch/arm32/src/exception.c

    rb277bef rae7d03c  
    6868        /* relative address (related to exc. vector) of the word
    6969         * where handler's address is stored
    70         */
     70         */
    7171        volatile uint32_t handler_address_ptr = EXC_VECTORS_SIZE -
    7272            PREFETCH_OFFSET;
  • kernel/arch/arm32/src/mach/beagleboardxm/beagleboardxm.c

    rb277bef rae7d03c  
    8888        amdm37x_gpt_irq_ack(&beagleboard.timer);
    8989
    90         /*
    91         * We are holding a lock which prevents preemption.
    92         * Release the lock, call clock() and reacquire the lock again.
    93         */
     90        /*
     91        * We are holding a lock which prevents preemption.
     92        * Release the lock, call clock() and reacquire the lock again.
     93        */
    9494        spinlock_unlock(&irq->lock);
    9595        clock();
  • kernel/arch/arm32/src/mach/integratorcp/integratorcp.c

    rb277bef rae7d03c  
    193193{
    194194        /*
    195         * We are holding a lock which prevents preemption.
    196         * Release the lock, call clock() and reacquire the lock again.
    197         */
     195         * We are holding a lock which prevents preemption.
     196         * Release the lock, call clock() and reacquire the lock again.
     197         */
    198198
    199199        spinlock_unlock(&irq->lock);
  • kernel/arch/ia32/src/userspace.c

    rb277bef rae7d03c  
    5353
    5454        asm volatile (
    55                 /* Set up GS register (virtual register segment) */
    56                 "movl %[vreg_des], %%gs\n"
     55            /* Set up GS register (virtual register segment) */
     56            "movl %[vreg_des], %%gs\n"
    5757
    58                 "pushl %[udata_des]\n"
    59                 "pushl %[stack_top]\n"
    60                 "pushl %[eflags]\n"
    61                 "pushl %[utext_des]\n"
    62                 "pushl %[entry]\n"
    63                 "movl %[uarg], %%eax\n"
     58            "pushl %[udata_des]\n"
     59            "pushl %[stack_top]\n"
     60            "pushl %[eflags]\n"
     61            "pushl %[utext_des]\n"
     62            "pushl %[entry]\n"
     63            "movl %[uarg], %%eax\n"
    6464
    65                 /* %edi is defined to hold pcb_ptr - set it to 0 */
    66                 "xorl %%edi, %%edi\n"
     65            /* %edi is defined to hold pcb_ptr - set it to 0 */
     66            "xorl %%edi, %%edi\n"
    6767
    68                 "iret\n"
    69                 :
    70                 : [eflags_mask] "i" (~EFLAGS_NT),
    71                   [udata_des] "i" (GDT_SELECTOR(UDATA_DES) | PL_USER),
    72                   [stack_top] "r" ((uint8_t *) kernel_uarg->uspace_stack +
    73                       kernel_uarg->uspace_stack_size),
    74                   [eflags] "r" ((eflags & ~(EFLAGS_NT)) | EFLAGS_IF),
    75                   [utext_des] "i" (GDT_SELECTOR(UTEXT_DES) | PL_USER),
    76                   [entry] "r" (kernel_uarg->uspace_entry),
    77                   [uarg] "r" (kernel_uarg->uspace_uarg),
    78                   [vreg_des] "r" (GDT_SELECTOR(VREG_DES))
    79                 : "eax");
     68            "iret\n"
     69            :
     70            : [eflags_mask] "i" (~EFLAGS_NT),
     71              [udata_des] "i" (GDT_SELECTOR(UDATA_DES) | PL_USER),
     72              [stack_top] "r" ((uint8_t *) kernel_uarg->uspace_stack +
     73              kernel_uarg->uspace_stack_size),
     74              [eflags] "r" ((eflags & ~(EFLAGS_NT)) | EFLAGS_IF),
     75              [utext_des] "i" (GDT_SELECTOR(UTEXT_DES) | PL_USER),
     76              [entry] "r" (kernel_uarg->uspace_entry),
     77              [uarg] "r" (kernel_uarg->uspace_uarg),
     78              [vreg_des] "r" (GDT_SELECTOR(VREG_DES))
     79            : "eax");
    8080
    8181        /* Unreachable */
    82         while (true);
     82        while (true)
     83                ;
    8384}
    8485
  • kernel/arch/ia64/include/arch/mm/vhpt.h

    rb277bef rae7d03c  
    3131 */
    3232/** @file
    33 */
     33 */
    3434
    3535#ifndef KERN_ia64_VHPT_H_
  • kernel/arch/ia64/src/mm/vhpt.c

    rb277bef rae7d03c  
    11/*
    2 * Copyright (c) 2006 Jakub Vana
    3 * All rights reserved.
    4 *
    5 * Redistribution and use in source and binary forms, with or without
    6 * modification, are permitted provided that the following conditions
    7 * are met:
    8 *
    9 * - Redistributions of source code must retain the above copyright
    10 *   notice, this list of conditions and the following disclaimer.
    11 * - Redistributions in binary form must reproduce the above copyright
    12 *   notice, this list of conditions and the following disclaimer in the
    13 *   documentation and/or other materials provided with the distribution.
    14 * - The name of the author may not be used to endorse or promote products
    15 *   derived from this software without specific prior written permission.
    16 *
    17 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
    18 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
    19 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
    20 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
    21 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
    22 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
    23 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
    24 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
    25 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
    26 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
     2 * Copyright (c) 2006 Jakub Vana
     3 * All rights reserved.
     4 *
     5 * Redistribution and use in source and binary forms, with or without
     6 * modification, are permitted provided that the following conditions
     7 * are met:
     8 *
     9 * - Redistributions of source code must retain the above copyright
     10 *   notice, this list of conditions and the following disclaimer.
     11 * - Redistributions in binary form must reproduce the above copyright
     12 *   notice, this list of conditions and the following disclaimer in the
     13 *   documentation and/or other materials provided with the distribution.
     14 * - The name of the author may not be used to endorse or promote products
     15 *   derived from this software without specific prior written permission.
     16 *
     17 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
     18 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
     19 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
     20 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
     21 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
     22 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
     23 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
     24 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
     25 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
     26 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
    2727 */
    2828
     
    3131 */
    3232/** @file
    33 */
     33 */
    3434
    3535#include <mem.h>
Note: See TracChangeset for help on using the changeset viewer.