mirror of the now-defunct rocklinux.org
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

111 lines
4.0 KiB

  1. --- linux/arch/i386/kernel/apm.c.seg 2005-03-27 13:10:45.000000000 -0800
  2. +++ linux/arch/i386/kernel/apm.c 2005-03-28 10:30:24.000000000 -0800
  3. @@ -327,7 +327,7 @@ extern int (*console_blank_hook)(int);
  4. * Save a segment register away
  5. */
  6. #define savesegment(seg, where) \
  7. - __asm__ __volatile__("movl %%" #seg ",%0" : "=m" (where))
  8. + __asm__ __volatile__("mov %%" #seg ",%0" : "=m" (where))
  9. /*
  10. * Maximum number of events stored
  11. @@ -553,7 +553,7 @@ static inline void apm_restore_cpus(unsi
  12. #ifdef APM_ZERO_SEGS
  13. # define APM_DECL_SEGS \
  14. - unsigned int saved_fs; unsigned int saved_gs;
  15. + unsigned short saved_fs; unsigned short saved_gs;
  16. # define APM_DO_SAVE_SEGS \
  17. savesegment(fs, saved_fs); savesegment(gs, saved_gs)
  18. # define APM_DO_ZERO_SEGS \
  19. --- linux/arch/i386/kernel/process.c.seg 2005-03-27 13:10:45.000000000 -0800
  20. +++ linux/arch/i386/kernel/process.c 2005-03-28 10:30:24.000000000 -0800
  21. @@ -544,7 +544,7 @@ void release_thread(struct task_struct *
  22. * Save a segment.
  23. */
  24. #define savesegment(seg,value) \
  25. - asm volatile("movl %%" #seg ",%0":"=m" (*(int *)&(value)))
  26. + asm volatile("mov %%" #seg ",%0":"=m" (value))
  27. int copy_thread(int nr, unsigned long clone_flags, unsigned long esp,
  28. unsigned long unused,
  29. @@ -661,8 +661,8 @@ void fastcall __switch_to(struct task_st
  30. * Save away %fs and %gs. No need to save %es and %ds, as
  31. * those are always kernel segments while inside the kernel.
  32. */
  33. - asm volatile("movl %%fs,%0":"=m" (*(int *)&prev->fs));
  34. - asm volatile("movl %%gs,%0":"=m" (*(int *)&prev->gs));
  35. + asm volatile("mov %%fs,%0":"=m" (prev->fs));
  36. + asm volatile("mov %%gs,%0":"=m" (prev->gs));
  37. /*
  38. * Restore %fs and %gs.
  39. --- linux/arch/x86_64/kernel/process.c.seg 2005-03-27 13:10:51.000000000 -0800
  40. +++ linux/arch/x86_64/kernel/process.c 2005-03-28 11:16:57.000000000 -0800
  41. @@ -527,10 +527,10 @@ int copy_thread(int nr, unsigned long cl
  42. p->thread.fs = me->thread.fs;
  43. p->thread.gs = me->thread.gs;
  44. - asm("movl %%gs,%0" : "=m" (p->thread.gsindex));
  45. - asm("movl %%fs,%0" : "=m" (p->thread.fsindex));
  46. - asm("movl %%es,%0" : "=m" (p->thread.es));
  47. - asm("movl %%ds,%0" : "=m" (p->thread.ds));
  48. + asm("mov %%gs,%0" : "=m" (p->thread.gsindex));
  49. + asm("mov %%fs,%0" : "=m" (p->thread.fsindex));
  50. + asm("mov %%es,%0" : "=m" (p->thread.es));
  51. + asm("mov %%ds,%0" : "=m" (p->thread.ds));
  52. unlazy_fpu(current);
  53. p->thread.i387 = current->thread.i387;
  54. @@ -575,11 +575,11 @@ struct task_struct *__switch_to(struct t
  55. /*
  56. * Switch DS and ES.
  57. */
  58. - asm volatile("movl %%es,%0" : "=m" (prev->es));
  59. + asm volatile("mov %%es,%0" : "=m" (prev->es));
  60. if (unlikely(next->es | prev->es))
  61. loadsegment(es, next->es);
  62. - asm volatile ("movl %%ds,%0" : "=m" (prev->ds));
  63. + asm volatile ("mov %%ds,%0" : "=m" (prev->ds));
  64. if (unlikely(next->ds | prev->ds))
  65. loadsegment(ds, next->ds);
  66. @@ -588,7 +588,7 @@ struct task_struct *__switch_to(struct t
  67. */
  68. {
  69. unsigned fsindex;
  70. - asm volatile("movl %%fs,%0" : "=g" (fsindex));
  71. + asm volatile("movl %%fs,%0" : "=r" (fsindex));
  72. /* segment register != 0 always requires a reload.
  73. also reload when it has changed.
  74. when prev process used 64bit base always reload
  75. @@ -609,7 +609,7 @@ struct task_struct *__switch_to(struct t
  76. }
  77. {
  78. unsigned gsindex;
  79. - asm volatile("movl %%gs,%0" : "=g" (gsindex));
  80. + asm volatile("movl %%gs,%0" : "=r" (gsindex));
  81. if (unlikely((gsindex | next->gsindex) || prev->gs)) {
  82. load_gs_index(next->gsindex);
  83. if (gsindex)
  84. --- linux/include/asm-i386/system.h.seg 2005-03-27 15:33:12.000000000 -0800
  85. +++ linux/include/asm-i386/system.h 2005-03-28 10:30:24.000000000 -0800
  86. @@ -84,7 +84,7 @@ static inline unsigned long _get_base(ch
  87. #define loadsegment(seg,value) \
  88. asm volatile("\n" \
  89. "1:\t" \
  90. - "movl %0,%%" #seg "\n" \
  91. + "mov %0,%%" #seg "\n" \
  92. "2:\n" \
  93. ".section .fixup,\"ax\"\n" \
  94. "3:\t" \
  95. @@ -96,7 +96,7 @@ static inline unsigned long _get_base(ch
  96. ".align 4\n\t" \
  97. ".long 1b,3b\n" \
  98. ".previous" \
  99. - : :"m" (*(unsigned int *)&(value)))
  100. + : :"m" (value))
  101. /*
  102. * Clear and set 'TS' bit respectively