diff options
Diffstat (limited to 'arch')
-rw-r--r-- | arch/i386/pci/mmconfig.c | 6 | ||||
-rw-r--r-- | arch/x86_64/lib/memcpy.S | 4 |
2 files changed, 6 insertions, 4 deletions
diff --git a/arch/i386/pci/mmconfig.c b/arch/i386/pci/mmconfig.c index 0d46b7a88b3b..1bf5816d34c8 100644 --- a/arch/i386/pci/mmconfig.c +++ b/arch/i386/pci/mmconfig.c | |||
@@ -115,13 +115,13 @@ static int pci_mmcfg_write(unsigned int seg, unsigned int bus, | |||
115 | 115 | ||
116 | switch (len) { | 116 | switch (len) { |
117 | case 1: | 117 | case 1: |
118 | mmio_config_writeb(mmcfg_virt_addr, value); | 118 | mmio_config_writeb(mmcfg_virt_addr + reg, value); |
119 | break; | 119 | break; |
120 | case 2: | 120 | case 2: |
121 | mmio_config_writew(mmcfg_virt_addr, value); | 121 | mmio_config_writew(mmcfg_virt_addr + reg, value); |
122 | break; | 122 | break; |
123 | case 4: | 123 | case 4: |
124 | mmio_config_writel(mmcfg_virt_addr, value); | 124 | mmio_config_writel(mmcfg_virt_addr + reg, value); |
125 | break; | 125 | break; |
126 | } | 126 | } |
127 | spin_unlock_irqrestore(&pci_config_lock, flags); | 127 | spin_unlock_irqrestore(&pci_config_lock, flags); |
diff --git a/arch/x86_64/lib/memcpy.S b/arch/x86_64/lib/memcpy.S index 0ea0ddc875a7..c22981fa2f3a 100644 --- a/arch/x86_64/lib/memcpy.S +++ b/arch/x86_64/lib/memcpy.S | |||
@@ -124,6 +124,8 @@ ENDPROC(__memcpy) | |||
124 | .quad memcpy | 124 | .quad memcpy |
125 | .quad 1b | 125 | .quad 1b |
126 | .byte X86_FEATURE_REP_GOOD | 126 | .byte X86_FEATURE_REP_GOOD |
127 | .byte .Lfinal - memcpy | 127 | /* Replace only beginning, memcpy is used to apply alternatives, so it |
128 | * is silly to overwrite itself with nops - reboot is only outcome... */ | ||
129 | .byte 2b - 1b | ||
128 | .byte 2b - 1b | 130 | .byte 2b - 1b |
129 | .previous | 131 | .previous |