Changeset b5143bd in mainline for kernel


Ignore:
Timestamp:
2015-06-06T01:50:56Z (11 years ago)
Author:
Jan Vesely <jano.vesely@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
0453261
Parents:
94e46c9 (diff), 87a2f9b (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

mainline changes

Location:
kernel
Files:
22 edited

Legend:

Unmodified
Added
Removed
  • kernel/arch/abs32le/src/abs32le.c

    r94e46c9 rb5143bd  
    6969}
    7070
    71 void arch_post_cpu_init()
     71void arch_post_cpu_init(void)
    7272{
    7373}
  • kernel/arch/amd64/include/arch/asm.h

    r94e46c9 rb5143bd  
    339339 *
    340340 */
    341 NO_TRACE static inline void enable_l_apic_in_msr()
     341NO_TRACE static inline void enable_l_apic_in_msr(void)
    342342{
    343343        asm volatile (
  • kernel/arch/amd64/src/fpu_context.c

    r94e46c9 rb5143bd  
    5454}
    5555
    56 void fpu_init()
     56void fpu_init(void)
    5757{
    5858        /* TODO: Zero all SSE, MMX etc. registers */
  • kernel/arch/arm32/include/arch/cp15.h

    r94e46c9 rb5143bd  
    4747
    4848#define CONTROL_REG_GEN_READ(name, crn, opc1, crm, opc2) \
    49 static inline uint32_t name##_read() \
     49static inline uint32_t name##_read(void) \
    5050{ \
    5151        uint32_t val; \
  • kernel/arch/arm32/include/arch/security_ext.h

    r94e46c9 rb5143bd  
    4646 * older archs.
    4747 */
    48 static inline bool sec_ext_is_implemented()
     48static inline bool sec_ext_is_implemented(void)
    4949{
    5050#ifdef PROCESSOR_ARCH_armv7_a
     
    6060 * mode.
    6161 */
    62 static inline bool sec_ext_is_monitor_mode()
     62static inline bool sec_ext_is_monitor_mode(void)
    6363{
    6464        return (current_status_reg_read() & MODE_MASK) == MONITOR_MODE;
     
    7575 * Look for 'secureworld_exit' in arch/arm/cpu/armv7/omap3/board.c.
    7676 */
    77 static inline bool sec_ext_is_secure()
     77static inline bool sec_ext_is_secure(void)
    7878{
    7979        return sec_ext_is_implemented()
  • kernel/arch/arm32/src/arm32.c

    r94e46c9 rb5143bd  
    158158
    159159/** Reboot. */
    160 void arch_reboot()
     160void arch_reboot(void)
    161161{
    162162        /* not implemented */
  • kernel/arch/arm32/src/fpu_context.c

    r94e46c9 rb5143bd  
    101101        FPSCR_EN_ALL = FPSCR_DENORMAL_EN_FLAG | FPSCR_INEXACT_EN_FLAG | FPSCR_UNDERFLOW_EN_FLAG | FPSCR_OVERFLOW_EN_FLAG | FPSCR_ZERO_DIV_EN_FLAG | FPSCR_INVALID_OP_EN_FLAG,
    102102};
     103
    103104extern uint32_t fpscr_read(void);
    104105extern void fpscr_write(uint32_t);
     
    114115static void (*restore_context)(fpu_context_t *ctx);
    115116
    116 static int fpu_have_coprocessor_access()
    117 {
    118 /* The register containing the information (CPACR) is not available on armv6-
     117static int fpu_have_coprocessor_access(void)
     118{
     119/*
     120 * The register containing the information (CPACR) is not available on armv6-
    119121 * rely on user decision to use CONFIG_FPU.
    120122 */
     
    143145 * @note do we need to call secure monitor here?
    144146 */
    145 static void fpu_enable_coprocessor_access()
    146 {
    147 /* The register containing the information (CPACR) is not available on armv6-
     147static void fpu_enable_coprocessor_access(void)
     148{
     149/*
     150 * The register containing the information (CPACR) is not available on armv6-
    148151 * rely on user decision to use CONFIG_FPU.
    149152 */
  • kernel/arch/ia32/src/fpu_context.c

    r94e46c9 rb5143bd  
    125125
    126126/** Initialize x87 FPU. Mask all exceptions. */
    127 void fpu_init()
     127void fpu_init(void)
    128128{
    129129        uint32_t help0 = 0;
  • kernel/arch/ia64/src/mm/vhpt.c

    r94e46c9 rb5143bd  
    8282}
    8383
    84 void vhpt_invalidate_all()
     84void vhpt_invalidate_all(void)
    8585{
    8686        memsetb(vhpt_base, VHPT_SIZE, 0);
  • kernel/arch/mips32/src/debugger.c

    r94e46c9 rb5143bd  
    288288 *
    289289 */
    290 void debugger_init()
     290void debugger_init(void)
    291291{
    292292        unsigned int i;
  • kernel/arch/mips32/src/fpu_context.c

    r94e46c9 rb5143bd  
    5353}
    5454
    55 void fpu_init()
     55void fpu_init(void)
    5656{
    5757        /* TODO: Zero all registers */
  • kernel/arch/sparc32/src/sparc32.c

    r94e46c9 rb5143bd  
    9696
    9797
    98 void arch_post_cpu_init()
     98void arch_post_cpu_init(void)
    9999{
    100100}
  • kernel/generic/include/lib/memfnc.h

    r94e46c9 rb5143bd  
    4646
    4747extern void *memset(void *, int, size_t)
     48    __attribute__((nonnull(1)))
    4849    ATTRIBUTE_OPTIMIZE("-fno-tree-loop-distribute-patterns") DO_NOT_DISCARD;
    4950extern void *memcpy(void *, const void *, size_t)
     51    __attribute__((nonnull(1, 2)))
    5052    ATTRIBUTE_OPTIMIZE("-fno-tree-loop-distribute-patterns") DO_NOT_DISCARD;
    5153
  • kernel/generic/include/memstr.h

    r94e46c9 rb5143bd  
    4848#define memcpy(dst, src, cnt)  __builtin_memcpy((dst), (src), (cnt))
    4949
    50 extern void memsetb(void *, size_t, uint8_t);
    51 extern void memsetw(void *, size_t, uint16_t);
    52 extern void *memmove(void *, const void *, size_t) DO_NOT_DISCARD;
     50extern void memsetb(void *, size_t, uint8_t)
     51    __attribute__((nonnull(1)));
     52extern void memsetw(void *, size_t, uint16_t)
     53    __attribute__((nonnull(1)));
     54extern void *memmove(void *, const void *, size_t)
     55    __attribute__((nonnull(1, 2))) DO_NOT_DISCARD;
    5356
    5457#endif
  • kernel/generic/include/mm/slab.h

    r94e46c9 rb5143bd  
    142142extern void *malloc(size_t, unsigned int)
    143143    __attribute__((malloc));
    144 extern void *realloc(void *, size_t, unsigned int);
     144extern void *realloc(void *, size_t, unsigned int)
     145    __attribute__((warn_unused_result));
    145146extern void free(void *);
    146147
  • kernel/generic/include/typedefs.h

    r94e46c9 rb5143bd  
    5050} atomic_t;
    5151
    52 typedef void (* function)();
     52typedef void (* function)(void);
    5353
    5454typedef uint32_t container_id_t;
  • kernel/generic/src/ipc/ops/conctmeto.c

    r94e46c9 rb5143bd  
    4444        int newphid = phone_alloc(TASK);
    4545
     46        /* Remember the phoneid or the error. */
     47        call->priv = newphid;
    4648        if (newphid < 0)
    4749                return ELIMIT;
     
    4951        /* Set arg5 for server */
    5052        IPC_SET_ARG5(call->data, (sysarg_t) &TASK->phones[newphid]);
    51         call->priv = newphid;
    5253
    5354        return EOK;
     
    7374static int answer_process(call_t *answer)
    7475{
    75         if (IPC_GET_RETVAL(answer->data))
    76                 phone_dealloc(answer->priv);
    77         else
    78                 IPC_SET_ARG5(answer->data, answer->priv);
     76        int newphid = (int) answer->priv;
     77
     78        if (IPC_GET_RETVAL(answer->data)) {
     79                if (newphid >= 0) {
     80                        /*
     81                         * The phone was indeed allocated and now needs
     82                         * to be deallocated.
     83                         */
     84                        phone_dealloc(newphid);
     85                }
     86        } else {
     87                IPC_SET_ARG5(answer->data, newphid);
     88        }
    7989       
    8090        return EOK;
  • kernel/generic/src/ipc/sysipc.c

    r94e46c9 rb5143bd  
    388388{
    389389        call_t *call = get_call(callid);
    390         phone_t *phone;
    391         bool need_old = answer_need_old(call);
    392         bool after_forward = false;
    393         ipc_data_t old;
    394         int rc;
    395 
    396390        if (!call)
    397391                return ENOENT;
    398 
     392       
     393        ipc_data_t old;
     394        bool need_old = answer_need_old(call);
    399395        if (need_old)
    400396                old = call->data;
     397       
     398        bool after_forward = false;
     399        int rc;
     400        phone_t *phone;
    401401       
    402402        if (phone_get(phoneid, &phone) != EOK) {
     
    409409                goto error;
    410410        }
    411 
     411       
    412412        call->flags |= IPC_CALL_FORWARDED;
    413413       
  • kernel/generic/src/lib/func.c

    r94e46c9 rb5143bd  
    5151 *
    5252 */
    53 void halt()
     53void halt(void)
    5454{
    5555#if (defined(CONFIG_DEBUG)) && (defined(CONFIG_KCONSOLE))
  • kernel/generic/src/mm/as.c

    r94e46c9 rb5143bd  
    834834                        if ((cond = (bool) node->keys)) {
    835835                                uintptr_t ptr = node->key[node->keys - 1];
    836                                 size_t size =
     836                                size_t node_size =
    837837                                    (size_t) node->value[node->keys - 1];
    838838                                size_t i = 0;
    839839                               
    840                                 if (overlaps(ptr, P2SZ(size), area->base,
     840                                if (overlaps(ptr, P2SZ(node_size), area->base,
    841841                                    P2SZ(pages))) {
    842842                                       
    843                                         if (ptr + P2SZ(size) <= start_free) {
     843                                        if (ptr + P2SZ(node_size) <= start_free) {
    844844                                                /*
    845845                                                 * The whole interval fits
     
    860860                                        i = (start_free - ptr) >> PAGE_WIDTH;
    861861                                        if (!used_space_remove(area, start_free,
    862                                             size - i))
     862                                            node_size - i))
    863863                                                panic("Cannot remove used space.");
    864864                                } else {
     
    867867                                         * completely removed.
    868868                                         */
    869                                         if (!used_space_remove(area, ptr, size))
     869                                        if (!used_space_remove(area, ptr, node_size))
    870870                                                panic("Cannot remove used space.");
    871871                                }
     
    887887                                    area->pages - pages);
    888888               
    889                                 for (; i < size; i++) {
     889                                for (; i < node_size; i++) {
    890890                                        pte_t *pte = page_mapping_find(as,
    891891                                            ptr + P2SZ(i), false);
  • kernel/generic/src/mm/slab.c

    r94e46c9 rb5143bd  
    610610    unsigned int kmflag), size_t (*destructor)(void *obj), unsigned int flags)
    611611{
     612        ASSERT(size > 0);
     613       
    612614        memsetb(cache, sizeof(*cache), 0);
    613615        cache->name = name;
     
    888890        /* Initialize magazine cache */
    889891        _slab_cache_create(&mag_cache, "slab_magazine_t",
    890             sizeof(slab_magazine_t) + SLAB_MAG_SIZE * sizeof(void*),
     892            sizeof(slab_magazine_t) + SLAB_MAG_SIZE * sizeof(void *),
    891893            sizeof(uintptr_t), NULL, NULL, SLAB_CACHE_NOMAGAZINE |
    892894            SLAB_CACHE_SLINSIDE);
  • kernel/generic/src/udebug/udebug_ops.c

    r94e46c9 rb5143bd  
    375375        if (TASK->udebug.dt_state != UDEBUG_TS_ACTIVE) {
    376376                mutex_unlock(&TASK->udebug.lock);
     377                free(id_buffer);
    377378                return EINVAL;
    378379        }
     
    456457int udebug_args_read(thread_t *thread, void **buffer)
    457458{
    458         /* Prepare a buffer to hold the arguments. */
    459         sysarg_t *arg_buffer = malloc(6 * sizeof(sysarg_t), 0);
    460        
    461459        /* On success, this will lock t->udebug.lock. */
    462460        int rc = _thread_op_begin(thread, false);
     
    471469        }
    472470       
     471        /* Prepare a buffer to hold the arguments. */
     472        sysarg_t *arg_buffer = malloc(6 * sizeof(sysarg_t), 0);
     473       
    473474        /* Copy to a local buffer before releasing the lock. */
    474475        memcpy(arg_buffer, thread->udebug.syscall_args, 6 * sizeof(sysarg_t));
     
    499500int udebug_regs_read(thread_t *thread, void **buffer)
    500501{
    501         /* Prepare a buffer to hold the data. */
    502         istate_t *state_buf = malloc(sizeof(istate_t), 0);
    503        
    504502        /* On success, this will lock t->udebug.lock */
    505503        int rc = _thread_op_begin(thread, false);
     
    512510                return EBUSY;
    513511        }
     512       
     513        /* Prepare a buffer to hold the data. */
     514        istate_t *state_buf = malloc(sizeof(istate_t), 0);
    514515       
    515516        /* Copy to the allocated buffer */
Note: See TracChangeset for help on using the changeset viewer.