1. 04 2月, 2008 10 次提交
  2. 02 2月, 2008 13 次提交
    • B
      Suspend: Clean up suspend_64.c · 17b7a89c
      Borislav Petkov 提交于
      There's a freakishly long comment in suspend_64.c, shorten it.
      Signed-off-by: NBorislav Petkov <bbpetkov@yahoo.de>
      Acked-by: NPavel Machek <pavel@ucw.cz>
      Signed-off-by: NRafael J. Wysocki <rjw@sisk.pl>
      Signed-off-by: NLen Brown <len.brown@intel.com>
      17b7a89c
    • B
      PCI: use dev_printk in x86 quirk messages · 9ed88554
      bjorn.helgaas@hp.com 提交于
      Convert quirk printks to dev_printk().
      Signed-off-by: NBjorn Helgaas <bjorn.helgaas@hp.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      
      9ed88554
    • I
      x86: fix bootup crash in native_read_tsc() · aa629992
      Ingo Molnar 提交于
      fix bootup crash in native_read_tsc() that was reported on an Athlon-XP
      and bisected. The correct feature boundary for X86_FEATURE_MFENCE_RDTSC
      is not XMM but XMM2.
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      Acked-by: NH. Peter Anvin <hpa@zytor.com>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      aa629992
    • A
      x86: avoid section mismatch involving arch_register_cpu · d9874026
      Alexander van Heukelum 提交于
      Avoid section mismatch involving arch_register_cpu.
      
      Marking arch_register_cpu as __init and removing the export
      for non-hotplug-cpu configurations makes the following warning
      go away:
      
      Section mismatch in reference from the function
      arch_register_cpu() to the function .devinit.text:register_cpu()
      The function  arch_register_cpu() references
      the function __devinit register_cpu().
      This is often because arch_register_cpu lacks a __devinit
      annotation or the annotation of register_cpu is wrong.
      
      The only external user of arch_register_cpu in the tree is
      in drivers/acpi/processor_core.c where it is guarded by
      ACPI_HOTPLUG_CPU (which depends on HOTPLUG_CPU).
      Signed-off-by: NAlexander van Heukelum <heukelum@fastmail.fm>
      CC: Sam Ravnborg <sam@ravnborg.org>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      d9874026
    • H
      x86: fixes for lookup_address args · 93809be8
      Harvey Harrison 提交于
      Signedness mismatches in level argument.
      Signed-off-by: NHarvey Harrison <harvey.harrison@gmail.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      93809be8
    • H
      x86: fix sparse warnings in cpu/common.c · 4a148513
      Harvey Harrison 提交于
      The casts will always be needed, may as well make them the right
      signedness.  The ebx variables can easily be unsigned, may as well.
      
      arch/x86/kernel/cpu/common.c:261:21: warning: incorrect type in argument 2 (different signedness)
      arch/x86/kernel/cpu/common.c:261:21:    expected unsigned int *eax
      arch/x86/kernel/cpu/common.c:261:21:    got int *<noident>
      arch/x86/kernel/cpu/common.c:262:9: warning: incorrect type in argument 3 (different signedness)
      arch/x86/kernel/cpu/common.c:262:9:    expected unsigned int *ebx
      arch/x86/kernel/cpu/common.c:262:9:    got int *<noident>
      arch/x86/kernel/cpu/common.c:263:9: warning: incorrect type in argument 4 (different signedness)
      arch/x86/kernel/cpu/common.c:263:9:    expected unsigned int *ecx
      arch/x86/kernel/cpu/common.c:263:9:    got int *<noident>
      arch/x86/kernel/cpu/common.c:264:9: warning: incorrect type in argument 5 (different signedness)
      arch/x86/kernel/cpu/common.c:264:9:    expected unsigned int *edx
      arch/x86/kernel/cpu/common.c:264:9:    got int *<noident>
      arch/x86/kernel/cpu/common.c:293:30: warning: incorrect type in argument 3 (different signedness)
      arch/x86/kernel/cpu/common.c:293:30:    expected unsigned int *ebx
      arch/x86/kernel/cpu/common.c:293:30:    got int *<noident>
      arch/x86/kernel/cpu/common.c:350:22: warning: incorrect type in argument 2 (different signedness)
      arch/x86/kernel/cpu/common.c:350:22:    expected unsigned int *eax
      arch/x86/kernel/cpu/common.c:350:22:    got int *<noident>
      arch/x86/kernel/cpu/common.c:351:10: warning: incorrect type in argument 3 (different signedness)
      arch/x86/kernel/cpu/common.c:351:10:    expected unsigned int *ebx
      arch/x86/kernel/cpu/common.c:351:10:    got int *<noident>
      arch/x86/kernel/cpu/common.c:352:10: warning: incorrect type in argument 4 (different signedness)
      arch/x86/kernel/cpu/common.c:352:10:    expected unsigned int *ecx
      arch/x86/kernel/cpu/common.c:352:10:    got int *<noident>
      arch/x86/kernel/cpu/common.c:353:10: warning: incorrect type in argument 5 (different signedness)
      arch/x86/kernel/cpu/common.c:353:10:    expected unsigned int *edx
      arch/x86/kernel/cpu/common.c:353:10:    got int *<noident>
      arch/x86/kernel/cpu/common.c:362:30: warning: incorrect type in argument 3 (different signedness)
      arch/x86/kernel/cpu/common.c:362:30:    expected unsigned int *ebx
      arch/x86/kernel/cpu/common.c:362:30:    got int *<noident>
      Signed-off-by: NHarvey Harrison <harvey.harrison@gmail.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      4a148513
    • H
      x86: make early_console static in early_printk.c · bb0e1290
      Harvey Harrison 提交于
      Not necessary to expose it, also fixes sparse warning.
      
      arch/x86/kernel/early_printk.c:196:16: warning: symbol 'early_console' was not declared. Should it be static?
      Signed-off-by: NHarvey Harrison <harvey.harrison@gmail.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      bb0e1290
    • S
      x86: fix section mismatch warning in kernel/pci-calgary · 31f3dff6
      Sam Ravnborg 提交于
      Fix following warning:
      WARNING: arch/x86/kernel/built-in.o(.text+0x1eb41): Section mismatch in reference from the function calgary_handle_quirks() to the function .init.text:calgary_set_split_completion_timeout()
      
      calgary_handle_quirks() are only called at
      __init time (in calgary_init_one() via handle_quirks ops).
      So annotate this function and the sister function __init.
      Signed-off-by: NSam Ravnborg <sam@ravnborg.org>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      31f3dff6
    • S
      x86: fix section mismatch warning in acpi/boot.c · 009cbadb
      Sam Ravnborg 提交于
      Fix following warning:
      WARNING: o-x86_64/arch/x86/kernel/built-in.o(.text+0x13d15): Section mismatch in reference from the function acpi_map_lsapic() to the function .cpuinit.text:mp_register_lapic()
      
      The function acpi_map_lsapic() is exported and thus not annotated.
      But the sole user is acpi/processor_core.c in a __cpuinit path.
      So create a small wrapper and put back the annotation thus
      avoiding the warning.
      Signed-off-by: NSam Ravnborg <sam@ravnborg.org>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      009cbadb
    • S
      x86: fix section mismatch warnings when referencing notifiers · c72258c7
      Sam Ravnborg 提交于
      Fix the following warnings:
      WARNING: arch/x86/kernel/built-in.o(.exit.text+0xf8): Section mismatch in reference from the function msr_exit() to the variable .cpuinit.data:msr_class_cpu_notifier
      WARNING: arch/x86/kernel/built-in.o(.exit.text+0x158): Section mismatch in reference from the function cpuid_exit() to the variable .cpuinit.data:cpuid_class_cpu_notifier
      WARNING: arch/x86/kernel/built-in.o(.exit.text+0x171): Section mismatch in reference from the function microcode_exit() to the variable .cpuinit.data:mc_cpu_notifier
      
      In all three cases there were a function annotated __exit
      that referenced a variable annotated __cpuinitdata.
      
      The fix was to replace the annotation of the notifier
      with __refdata to tell modpost that the reference to
      a _cpuinit function in the notifier are OK.
      The unregister call that references the notifier
      variable will simple delete the function pointer
      so there is no problem ignoring the reference.
      
      Note: This looks like another case where __cpuinit
      has been used as replacement for proper use
      of CONFIG_HOTPLUG_CPU to decide what code are used for
      HOTPLUG_CPU.
      Signed-off-by: NSam Ravnborg <sam@ravnborg.org>
      Cc: "H. Peter Anvin" <hpa@zytor.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      c72258c7
    • S
      x86: silence section mismatch warning in smpboot_64.c · 69e97c02
      Sam Ravnborg 提交于
      Silence the following warning:
      WARNING: o-x86_64/arch/x86/kernel/built-in.o(.text+0x17cd3): Section mismatch in reference from the function remove_cpu_from_maps() to the variable .cpuinit.data:cpu_initialized
      
      remove_cpu:maps() had a single user: __cpu_disable() so
      mark it static and annotate it with __ref to silence the
      warning from modpost.
      
      _cpu_disable() has a single user in kernel/cpu.c:
       => take_cpu_down()
          which again has a single user in the following call:
          => __stop_machine_run(take_cpu_down, &tcd_param, cpu);
      Here a kthread is created.
      
      So maybe the warning is correct and the right fix is to
      remove the __cpuinitdata annotation of cpu_initialized?
      
      Note: The analysis were disturbed by the fact that we had a variable
            with the same name in cpu/common.c - but this is 32 bit only]
      Note: Should smpboot_64 use cpu_clear()?
      Signed-off-by: NSam Ravnborg <sam@ravnborg.org>
      Cc: "H. Peter Anvin" <hpa@zytor.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      69e97c02
    • Y
      x86_64: make bootmap_start page align v6 · 24a5da73
      Yinghai Lu 提交于
      boot oopses when a system has 64 or 128 GB of RAM installed:
      
      Calling initcall 0xffffffff80bc33b6: sctp_init+0x0/0x711()
      BUG: unable to handle kernel NULL pointer dereference at 000000000000005f
      IP: [<ffffffff802bfe55>] proc_register+0xe7/0x10f
      PGD 0
      Oops: 0000 [1] SMP
      CPU 0
      Modules linked in:
      Pid: 1, comm: swapper Not tainted 2.6.24-smp-g5a514e21-dirty #6
      RIP: 0010:[<ffffffff802bfe55>]  [<ffffffff802bfe55>] proc_register+0xe7/0x10f
      RSP: 0000:ffff810824c57e60  EFLAGS: 00010246
      RAX: 000000000000d7d7 RBX: ffff811024c5fa80 RCX: ffff810824c57e08
      RDX: 0000000000000000 RSI: 0000000000000195 RDI: ffffffff80cc2460
      RBP: ffffffffffffffff R08: 0000000000000000 R09: ffff811024c5fa80
      R10: 0000000000000000 R11: 0000000000000002 R12: ffff810824c57e6c
      R13: 0000000000000000 R14: ffff810824c57ee0 R15: 00000006abd25bee
      FS:  0000000000000000(0000) GS:ffffffff80b4d000(0000) knlGS:0000000000000000
      CS:  0010 DS: 0018 ES: 0018 CR0: 000000008005003b
      CR2: 000000000000005f CR3: 0000000000201000 CR4: 00000000000006e0
      DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
      DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
      Process swapper (pid: 1, threadinfo ffff810824c56000, task ffff812024c52000)
      Stack:  ffffffff80a57348 0000019500000000 ffff811024c5fa80 0000000000000000
       00000000ffffff97 ffffffff802bfef0 0000000000000000 ffffffffffffffff
       0000000000000000 ffffffff80bc3b4b ffff810824c57ee0 ffffffff80bc34a5
      Call Trace:
       [<ffffffff802bfef0>] ? create_proc_entry+0x73/0x8a
       [<ffffffff80bc3b4b>] ? sctp_snmp_proc_init+0x1c/0x34
       [<ffffffff80bc34a5>] ? sctp_init+0xef/0x711
       [<ffffffff80b976e3>] ? kernel_init+0x175/0x2e1
       [<ffffffff8020ccf8>] ? child_rip+0xa/0x12
       [<ffffffff80b9756e>] ? kernel_init+0x0/0x2e1
       [<ffffffff8020ccee>] ? child_rip+0x0/0x12
      
      Code: 1e 48 83 7b 38 00 75 08 48 c7 43 38 f0 e8 82 80 48 83 7b 30 00 75 08 48 c7 43 30 d0 e9 82 80 48 c7 c7 60 24 cc 80 e8 bd 5a 54 00 <48> 8b 45 60 48 89 6b 58 48 89 5d 60 48 89 43 50 fe 05 f5 25 a0
      RIP  [<ffffffff802bfe55>] proc_register+0xe7/0x10f
       RSP <ffff810824c57e60>
      CR2: 000000000000005f
      ---[ end trace 02c2d78def82877a ]---
      Kernel panic - not syncing: Attempted to kill init!
      
      it turns out some variables near end of bss are corrupted already.
      
      in System.map we have
      ffffffff80d40420 b rsi_table
      ffffffff80d40620 B krb5_seq_lock
      ffffffff80d40628 b i.20437
      ffffffff80d40630 b xprt_rdma_inline_write_padding
      ffffffff80d40638 b sunrpc_table_header
      ffffffff80d40640 b zero
      ffffffff80d40644 b min_memreg
      ffffffff80d40648 b rpcrdma_tk_lock_g
      ffffffff80d40650 B sctp_assocs_id_lock
      ffffffff80d40658 B proc_net_sctp
      ffffffff80d40660 B sctp_assocs_id
      ffffffff80d40680 B sysctl_sctp_mem
      ffffffff80d40690 B sysctl_sctp_rmem
      ffffffff80d406a0 B sysctl_sctp_wmem
      ffffffff80d406b0 b sctp_ctl_socket
      ffffffff80d406b8 b sctp_pf_inet6_specific
      ffffffff80d406c0 b sctp_pf_inet_specific
      ffffffff80d406c8 b sctp_af_v4_specific
      ffffffff80d406d0 b sctp_af_v6_specific
      ffffffff80d406d8 b sctp_rand.33270
      ffffffff80d406dc b sctp_memory_pressure
      ffffffff80d406e0 b sctp_sockets_allocated
      ffffffff80d406e4 b sctp_memory_allocated
      ffffffff80d406e8 b sctp_sysctl_header
      ffffffff80d406f0 b zero
      ffffffff80d406f4 A __bss_stop
      ffffffff80d406f4 A _end
      
      and setup_node_bootmem() will use that page 0xd40000 for bootmap
      Bootmem setup node 0 0000000000000000-0000000828000000
        NODE_DATA [000000000008a485 - 0000000000091484]
        bootmap [0000000000d406f4 -  0000000000e456f3] pages 105
      Bootmem setup node 1 0000000828000000-0000001028000000
        NODE_DATA [0000000828000000 - 0000000828006fff]
        bootmap [0000000828007000 -  0000000828106fff] pages 100
      Bootmem setup node 2 0000001028000000-0000001828000000
        NODE_DATA [0000001028000000 - 0000001028006fff]
        bootmap [0000001028007000 -  0000001028106fff] pages 100
      Bootmem setup node 3 0000001828000000-0000002028000000
        NODE_DATA [0000001828000000 - 0000001828006fff]
        bootmap [0000001828007000 -  0000001828106fff] pages 100
      
      setup_node_bootmem() makes NODE_DATA cacheline aligned,
      and bootmap is page-aligned.
      
      the patch updates find_e820_area() to make sure we can meet
      the alignment constraints.
      Signed-off-by: NYinghai Lu <yinghai.lu@sun.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      24a5da73
    • Y
      x86_64: add debug name for early_res · 25eff8d4
      Yinghai Lu 提交于
      helps debugging problems in this rather murky area of code.
      Signed-off-by: NYinghai Lu <yinghai.lu@sun.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      25eff8d4
  3. 01 2月, 2008 4 次提交
  4. 31 1月, 2008 1 次提交
  5. 30 1月, 2008 12 次提交
    • Y
      x86: fix overlap between pagetable with bss section · 91987157
      Yinghai Lu 提交于
      one early crash on one 8 node 256g machine:
      
      Command line: console=uart8250,io,0x3f8,115200n8 initrd=kernel.org/mydisk11_x86_64.gz rw root=/dev/ram0 debug initcall_debug apic=debug acpi.debug_level=0x0000000f pci=routeirq ip=dhcp load_ramdisk=1 ramdisk_size=131072 BOOT_IMAGE=kernel.org/bzImage_2.6.25_k8.1
      BIOS-provided physical RAM map:
       BIOS-e820: 0000000000000000 - 000000000009bc00 (usable)
       BIOS-e820: 000000000009bc00 - 00000000000a0000 (reserved)
       BIOS-e820: 00000000000e6000 - 0000000000100000 (reserved)
       BIOS-e820: 0000000000100000 - 00000000dffe0000 (usable)
       BIOS-e820: 00000000dffe0000 - 00000000dffee000 (ACPI data)
       BIOS-e820: 00000000dffee000 - 00000000dffff050 (ACPI NVS)
       BIOS-e820: 00000000dffff050 - 00000000e0000000 (reserved)
       BIOS-e820: 00000000fec00000 - 00000000fec01000 (reserved)
       BIOS-e820: 00000000fee00000 - 00000000fee01000 (reserved)
       BIOS-e820: 00000000ff700000 - 0000000100000000 (reserved)
       BIOS-e820: 0000000100000000 - 0000004020000000 (usable)
      Early serial console at I/O port 0x3f8 (options '115200n8')
      console [uart0] enabled
      end_pfn_map = 67239936
      Kernel panic - not syncing: Duplicated early reservation d40000-e42000
      
      Pid: 0, comm: swapper Not tainted 2.6.24-smp-g5a514e21-dirty #3
      
      Call Trace:
       [<ffffffff80221545>] lapic_get_maxlvt+0x0/0x10
       [<ffffffff80221657>] clear_local_APIC+0x5/0xcf
       [<ffffffff80221726>] disable_local_APIC+0x5/0x17
       [<ffffffff8021fe16>] smp_send_stop+0x46/0x4c
       [<ffffffff80235293>] panic+0x94/0x13e
       [<ffffffff80bc3b03>] sctp_eps_proc_init+0x12/0x34
       [<ffffffff80b9f1c5>] reserve_early+0x30/0x6c
       [<ffffffff80803925>] init_memory_mapping+0x2cd/0x2dc
       [<ffffffff80b9dc01>] setup_arch+0x21f/0x44e
       [<ffffffff80b978be>] start_kernel+0x6f/0x2c7
       [<ffffffff80b971cc>] _sinittext+0x1cc/0x1d3
      
      it turns out there is overlap between pgtable and bss...
      
      in System.map we have
      ffffffff80d40420 b rsi_table
      ffffffff80d40620 B krb5_seq_lock
      ffffffff80d40628 b i.20437
      ffffffff80d40630 b xprt_rdma_inline_write_padding
      ffffffff80d40638 b sunrpc_table_header
      ffffffff80d40640 b zero
      ffffffff80d40644 b min_memreg
      ffffffff80d40648 b rpcrdma_tk_lock_g
      ffffffff80d40650 B sctp_assocs_id_lock
      ffffffff80d40658 B proc_net_sctp
      ffffffff80d40660 B sctp_assocs_id
      ffffffff80d40680 B sysctl_sctp_mem
      ffffffff80d40690 B sysctl_sctp_rmem
      ffffffff80d406a0 B sysctl_sctp_wmem
      ffffffff80d406b0 b sctp_ctl_socket
      ffffffff80d406b8 b sctp_pf_inet6_specific
      ffffffff80d406c0 b sctp_pf_inet_specific
      ffffffff80d406c8 b sctp_af_v4_specific
      ffffffff80d406d0 b sctp_af_v6_specific
      ffffffff80d406d8 b sctp_rand.33270
      ffffffff80d406dc b sctp_memory_pressure
      ffffffff80d406e0 b sctp_sockets_allocated
      ffffffff80d406e4 b sctp_memory_allocated
      ffffffff80d406e8 b sctp_sysctl_header
      ffffffff80d406f0 b zero
      ffffffff80d406f4 A __bss_stop
      ffffffff80d406f4 A _end
      
      need to round up table_start to PAGE_SIZE.
      
      also make the panic more informative.
      Signed-off-by: NYinghai Lu <yinghai.lu@sun.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
      91987157
    • B
      x86: early boot debugging via FireWire (ohci1394_dma=early) · f212ec4b
      Bernhard Kaindl 提交于
      This patch adds a new configuration option, which adds support for a new
      early_param which gets checked in arch/x86/kernel/setup_{32,64}.c:setup_arch()
      to decide wether OHCI-1394 FireWire controllers should be initialized and
      enabled for physical DMA access to allow remote debugging of early problems
      like issues ACPI or other subsystems which are executed very early.
      
      If the config option is not enabled, no code is changed, and if the boot
      paramenter is not given, no new code is executed, and independent of that,
      all new code is freed after boot, so the config option can be even enabled
      in standard, non-debug kernels.
      
      With specialized tools, it is then possible to get debugging information
      from machines which have no serial ports (notebooks) such as the printk
      buffer contents, or any data which can be referenced from global pointers,
      if it is stored below the 4GB limit and even memory dumps of of the physical
      RAM region below the 4GB limit can be taken without any cooperation from the
      CPU of the host, so the machine can be crashed early, it does not matter.
      
      In the extreme, even kernel debuggers can be accessed in this way. I wrote
      a small kgdb module and an accompanying gdb stub for FireWire which allows
      to gdb to talk to kgdb using remote remory reads and writes over FireWire.
      
      An version of the gdb stub fore FireWire is able to read all global data
      from a system which is running a a normal kernel without any kernel debugger,
      without any interruption or support of the system's CPU. That way, e.g. the
      task struct and so on can be read and even manipulated when the physical DMA
      access is granted.
      
      A HOWTO is included in this patch, in Documentation/debugging-via-ohci1394.txt
      and I've put a copy online at
      ftp://ftp.suse.de/private/bk/firewire/docs/debugging-via-ohci1394.txt
      
      It also has links to all the tools which are available to make use of it
      another copy of it is online at:
      ftp://ftp.suse.de/private/bk/firewire/kernel/ohci1394_dma_early-v2.diffSigned-Off-By: NBernhard Kaindl <bk@suse.de>
      Tested-By: NThomas Renninger <trenn@suse.de>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
      f212ec4b
    • H
      x86: fixes some bugs about EFI memory map handling · a3828064
      Huang, Ying 提交于
      This patch fixes some bugs of EFI memory handing code.
      
      - On x86_64, it is possible that EFI memory map can not be mapped via
        identity map, so efi_map_memmap is removed, just use early_ioremap.
      
      - On i386, the EFI memory map mapping take effect cross paging_init,
        so it is not necessary to use efi_map_memmap.
      
      - EFI memory map is unmapped in efi_enter_virtual_mode to avoid
        early_ioremap leak.
      Signed-off-by: NHuang Ying <ying.huang@intel.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
      a3828064
    • H
      x86: use reboot_type on EFI 32 · bed23c67
      Huang, Ying 提交于
      This patch makes reboot_type of BOOT_EFI is used on i386 too. Because
      correpsonding reboot code of i386 and x86_64 is merged.
      Signed-off-by: NHuang Ying <ying.huang@intel.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
      bed23c67
    • I
      x86: rodata config hookup · aba8391f
      Ingo Molnar 提交于
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
      aba8391f
    • A
      x86: add testcases for RODATA and NX protections/attributes · edeed305
      Arjan van de Ven 提交于
      Latest update; I now have 4 NX tests, but 2 fail so they're #if 0'd.
      I also cleaned up the NX test code quite a bit, and got rid of the ugly
      exception table sorting stuff.
      
      From: Arjan van de Ven <arjan@linux.intel.com>
      
      This patch adds testcases for the CONFIG_DEBUG_RODATA configuration option
      as well as the NX CPU feature/mappings. Both testcases can move to tests/
      once that patch gets merged into mainline.
      (I'm half considering moving the rodata test into mm/init.c but I'll
      wait with that until init.c is unified)
      
      As part of this I had to fix a not-quite-right alignment in the vmlinux.lds.h
      for the RODATA sections, which lead to 1 page less being marked read only.
      Signed-off-by: NArjan van de Ven <arjan@linux.intel.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
      edeed305
    • T
      x86: cpa: move flush to cpa · d7c8f21a
      Thomas Gleixner 提交于
      The set_memory_* and set_pages_* family of API's currently requires the
      callers to do a global tlb flush after the function call; forgetting this is
      a very nasty deathtrap. This patch moves the global tlb flush into
      each of the callers
      Signed-off-by: NArjan van de Ven <arjan@linux.intel.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
      d7c8f21a
    • A
      x86: convert CPA users to the new set_page_ API · 6d238cc4
      Arjan van de Ven 提交于
      This patch converts various users of change_page_attr() to the new,
      more intent driven set_page_*/set_memory_* API set.
      Signed-off-by: NArjan van de Ven <arjan@linux.intel.com>
      Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      6d238cc4
    • T
      x86: introduce max_pfn_mapped · f87519e8
      Thomas Gleixner 提交于
      64bit uses end_pfn_map and 32bit uses max_low_pfn. There are several
      files which have #ifdef'ed defines which map either to end_pfn_map or
      max_low_pfn. Replace this by a universal define and clean up all the
      other instances.
      Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      f87519e8
    • I
      x86: do not PSE on CONFIG_DEBUG_PAGEALLOC=y · 12d6f21e
      Ingo Molnar 提交于
      get more testing of the c_p_a() code done by not turning off
      PSE on DEBUG_PAGEALLOC.
      
      this simplifies the early pagetable setup code, and tests
      the largepage-splitup code quite heavily.
      
      In the end, all the largepages will be split up pretty quickly,
      so there's no difference to how DEBUG_PAGEALLOC worked before.
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
      12d6f21e
    • H
      x86: fix some bugs about EFI runtime code mapping · a2172e25
      Huang, Ying 提交于
      This patch fixes some bugs of making EFI runtime code executable.
      
      - Use change_page_attr in i386 too. Because the runtime code may be
        mapped not through ioremap.
      
      - If there is no _PAGE_NX in __supported_pte_mask, the change_page_attr
        is not called.
      
      - Make efi_ioremap map pages as PAGE_KERNEL_EXEC_NOCACHE, because EFI runtime
        code may be mapped through efi_ioremap.
      Signed-off-by: NHuang Ying <ying.huang@intel.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
      a2172e25
    • I
      x86: fix more non-global TLB flushes · cd582896
      Ingo Molnar 提交于
      fix more __flush_tlb() instances, out of caution.
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
      cd582896