Questions about prom functions and restore_current()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

I try to trace problems with prom and SMP. I wonder what actually
the restore_current() function does (it restores g6 register, but I do
not understand why).

The restore_current() uses the macro below, which seems to have the first
line redundant unless some magic is involved. The __b_load_current load
is overwritten by the boot_cpu_id4 load in the third line.

/* Blackbox - take care with this... - check smp4m and smp4d before changing this. */
#define LOAD_CURRENT(dest_reg, idreg)                   \
    sethi    %hi(___b_load_current), %idreg;            \
    sethi    %hi(current_set), %dest_reg;           \
    sethi    %hi(boot_cpu_id4), %idreg;             \
    or       %dest_reg, %lo(current_set), %dest_reg;    \
    ldub     [%idreg + %lo(boot_cpu_id4)], %idreg;      \
    ld       [%idreg + %dest_reg], %dest_reg;


Regards,
Krzysztof
-
To unsubscribe from this list: send the line "unsubscribe sparclinux" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Kernel Development]     [DCCP]     [Linux ARM Development]     [Linux]     [Photo]     [Yosemite Help]     [Linux ARM Kernel]     [Linux SCSI]     [Linux x86_64]     [Linux Hams]

  Powered by Linux