Changeset 8565a42 in mainline for kernel/arch/sparc64/src/smp


Ignore:
Timestamp:
2018-03-02T20:34:50Z (8 years ago)
Author:
GitHub <noreply@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
a1a81f69, d5e5fd1
Parents:
3061bc1 (diff), 34e1206 (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.
git-author:
Jiří Zárevúcky <zarevucky.jiri@…> (2018-03-02 20:34:50)
git-committer:
GitHub <noreply@…> (2018-03-02 20:34:50)
Message:

Remove all trailing whitespace, everywhere.

See individual commit messages for details.

Location:
kernel/arch/sparc64/src/smp
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • kernel/arch/sparc64/src/smp/sun4u/ipi.c

    r3061bc1 r8565a42  
    9797         * we explicitly disable preemption.
    9898         */
    99        
     99
    100100        preemption_disable();
    101        
     101
    102102        status = asi_u64_read(ASI_INTR_DISPATCH_STATUS, 0);
    103103        if (status & INTR_DISPATCH_STATUS_BUSY)
    104104                panic("Interrupt Dispatch Status busy bit set\n");
    105        
     105
    106106        assert(!(pstate_read() & PSTATE_IE_BIT));
    107        
     107
    108108        do {
    109109                set_intr_w_data(func);
     
    111111                    (mid << INTR_VEC_DISPATCH_MID_SHIFT) |
    112112                    VA_INTR_W_DISPATCH, 0);
    113        
     113
    114114                membar();
    115                
     115
    116116                do {
    117117                        status = asi_u64_read(ASI_INTR_DISPATCH_STATUS, 0);
    118118                } while (status & INTR_DISPATCH_STATUS_BUSY);
    119                
     119
    120120                done = !(status & INTR_DISPATCH_STATUS_NACK);
    121121                if (!done) {
     
    128128                }
    129129        } while (!done);
    130        
     130
    131131        preemption_enable();
    132132}
     
    147147{
    148148        unsigned int i;
    149        
     149
    150150        void (* func)(void);
    151        
     151
    152152        switch (ipi) {
    153153        case IPI_TLB_SHOOTDOWN:
     
    158158                break;
    159159        }
    160        
     160
    161161        /*
    162162         * As long as we don't support hot-plugging
     
    165165         * without locking.
    166166         */
    167        
     167
    168168        for (i = 0; i < config.cpu_active; i++) {
    169169                if (&cpus[i] == CPU)
     
    187187{
    188188        assert(&cpus[cpu_id] != CPU);
    189        
     189
    190190        if (ipi == IPI_SMP_CALL) {
    191191                cross_call(cpus[cpu_id].arch.mid, smp_call_ipi_recv);
  • kernel/arch/sparc64/src/smp/sun4u/smp.c

    r3061bc1 r8565a42  
    6262        ofw_tree_node_t *node;
    6363        unsigned int cnt = 0;
    64        
     64
    6565        if (is_us() || is_us_iii()) {
    6666                node = ofw_tree_find_child_by_device_type(cpus_parent(), "cpu");
     
    7676                }
    7777        }
    78        
     78
    7979        config.cpu_count = max(1, cnt);
    8080}
     
    8989        uint32_t mid;
    9090        ofw_tree_property_t *prop;
    91                
     91
    9292        /* 'upa-portid' for US, 'portid' for US-III, 'cpuid' for US-IV */
    9393        prop = ofw_tree_getprop(node, "upa-portid");
     
    9696        if ((!prop) || (!prop->value))
    9797                prop = ofw_tree_getprop(node, "cpuid");
    98                
     98
    9999        if (!prop || prop->value == NULL)
    100100                return;
    101                
     101
    102102        mid = *((uint32_t *) prop->value);
    103103        if (CPU->arch.mid == mid)
     
    105105
    106106        waking_up_mid = mid;
    107                
     107
    108108        if (waitq_sleep_timeout(&ap_completion_wq, 1000000,
    109109            SYNCH_FLAGS_NONE, NULL) == ETIMEOUT)
     
    117117        ofw_tree_node_t *node;
    118118        int i;
    119        
     119
    120120        if (is_us() || is_us_iii()) {
    121121                node = ofw_tree_find_child_by_device_type(cpus_parent(), "cpu");
  • kernel/arch/sparc64/src/smp/sun4v/ipi.c

    r3061bc1 r8565a42  
    9696{
    9797        void (* func)(void);
    98        
     98
    9999        switch (ipi) {
    100100        case IPI_TLB_SHOOTDOWN:
  • kernel/arch/sparc64/src/smp/sun4v/smp.c

    r3061bc1 r8565a42  
    359359        if (__hypercall_fast1(CPU_STOP, cpuid) != EOK)
    360360                return false;
    361        
     361
    362362        /* wait for the CPU to stop */
    363363        uint64_t state;
     
    365365        while (state == CPU_STATE_RUNNING)
    366366                __hypercall_fast_ret1(cpuid, 0, 0, 0, 0, CPU_STATE, &state);
    367        
     367
    368368        /* make the CPU run again and execute HelenOS code */
    369369        if (__hypercall_fast4(CPU_START, cpuid,
     
    372372                return false;
    373373#endif
    374        
     374
    375375        if (waitq_sleep_timeout(&ap_completion_wq, 10000000,
    376376            SYNCH_FLAGS_NONE, NULL) == ETIMEOUT)
    377377                printf("%s: waiting for processor (cpuid = %" PRIu64 ") timed out\n",
    378378                    __func__, cpuid);
    379        
     379
    380380        return true;
    381381}
Note: See TracChangeset for help on using the changeset viewer.