Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 359425
b: refs/heads/master
c: 2a7d2b9
h: refs/heads/master
i:
  359423: afe6e6d
v: v3
  • Loading branch information
Linus Torvalds committed Feb 28, 2013
1 parent 03a2228 commit a0526db
Show file tree
Hide file tree
Showing 60 changed files with 1,721 additions and 1,147 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: b67bfe0d42cac56c512dd5da4b1b347a23f4b70a
refs/heads/master: 2a7d2b96d5cba7568139d9ab157a0e97ab32440f
4 changes: 4 additions & 0 deletions trunk/Documentation/coccinelle.txt
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,10 @@ As any static code analyzer, Coccinelle produces false
positives. Thus, reports must be carefully checked, and patches
reviewed.

To enable verbose messages set the V= variable, for example:

make coccicheck MODE=report V=1


Using Coccinelle with a single semantic patch
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Expand Down
23 changes: 0 additions & 23 deletions trunk/Documentation/kbuild/kconfig-language.txt
Original file line number Diff line number Diff line change
Expand Up @@ -388,26 +388,3 @@ config FOO
depends on BAR && m

limits FOO to module (=m) or disabled (=n).

Kconfig symbol existence
~~~~~~~~~~~~~~~~~~~~~~~~
The following two methods produce the same kconfig symbol dependencies
but differ greatly in kconfig symbol existence (production) in the
generated config file.

case 1:

config FOO
tristate "about foo"
depends on BAR

vs. case 2:

if BAR
config FOO
tristate "about foo"
endif

In case 1, the symbol FOO will always exist in the config file (given
no other dependencies). In case 2, the symbol FOO will only exist in
the config file if BAR is enabled.
6 changes: 6 additions & 0 deletions trunk/Documentation/kbuild/kconfig.txt
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,12 @@ KCONFIG_OVERWRITECONFIG
If you set KCONFIG_OVERWRITECONFIG in the environment, Kconfig will not
break symlinks when .config is a symlink to somewhere else.

CONFIG_
--------------------------------------------------
If you set CONFIG_ in the environment, Kconfig will prefix all symbols
with its value when saving the configuration, instead of using the default,
"CONFIG_".

______________________________________________________________________
Environment variables for '{allyes/allmod/allno/rand}config'

Expand Down
5 changes: 5 additions & 0 deletions trunk/Documentation/kernel-parameters.txt
Original file line number Diff line number Diff line change
Expand Up @@ -564,6 +564,8 @@ bytes respectively. Such letter suffixes can also be entirely omitted.
UART at the specified I/O port or MMIO address,
switching to the matching ttyS device later. The
options are the same as for ttyS, above.
hvc<n> Use the hypervisor console device <n>. This is for
both Xen and PowerPC hypervisors.

If the device connected to the port is not a TTY but a braille
device, prepend "brl," before the device type, for instance
Expand Down Expand Up @@ -757,6 +759,7 @@ bytes respectively. Such letter suffixes can also be entirely omitted.

earlyprintk= [X86,SH,BLACKFIN]
earlyprintk=vga
earlyprintk=xen
earlyprintk=serial[,ttySn[,baudrate]]
earlyprintk=ttySn[,baudrate]
earlyprintk=dbgp[debugController#]
Expand All @@ -774,6 +777,8 @@ bytes respectively. Such letter suffixes can also be entirely omitted.
The VGA output is eventually overwritten by the real
console.

The xen output can only be used by Xen PV guests.

ekgdboc= [X86,KGDB] Allow early kernel console debugging
ekgdboc=kbd

Expand Down
6 changes: 3 additions & 3 deletions trunk/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,6 @@ SUBARCH := $(shell uname -m | sed -e s/i.86/x86/ -e s/x86_64/x86/ \
# "make" in the configured kernel build directory always uses that.
# Default value for CROSS_COMPILE is not to prefix executables
# Note: Some architectures assign CROSS_COMPILE in their arch/*/Makefile
export KBUILD_BUILDHOST := $(SUBARCH)
ARCH ?= $(SUBARCH)
CROSS_COMPILE ?= $(CONFIG_CROSS_COMPILE:"%"=%)

Expand Down Expand Up @@ -620,7 +619,8 @@ KBUILD_AFLAGS += -gdwarf-2
endif

ifdef CONFIG_DEBUG_INFO_REDUCED
KBUILD_CFLAGS += $(call cc-option, -femit-struct-debug-baseonly)
KBUILD_CFLAGS += $(call cc-option, -femit-struct-debug-baseonly) \
$(call cc-option,-fno-var-tracking)
endif

ifdef CONFIG_FUNCTION_TRACER
Expand Down Expand Up @@ -1398,7 +1398,7 @@ quiet_cmd_rmfiles = $(if $(wildcard $(rm-files)),CLEAN $(wildcard $(rm-files))
# Run depmod only if we have System.map and depmod is executable
quiet_cmd_depmod = DEPMOD $(KERNELRELEASE)
cmd_depmod = $(CONFIG_SHELL) $(srctree)/scripts/depmod.sh $(DEPMOD) \
$(KERNELRELEASE)
$(KERNELRELEASE) "$(patsubst "%",%,$(CONFIG_SYMBOL_PREFIX))"

# Create temporary dir for module support files
# clean it up only when building all modules
Expand Down
26 changes: 19 additions & 7 deletions trunk/arch/x86/boot/compressed/eboot.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,23 +19,28 @@

static efi_system_table_t *sys_table;

static void efi_char16_printk(efi_char16_t *str)
{
struct efi_simple_text_output_protocol *out;

out = (struct efi_simple_text_output_protocol *)sys_table->con_out;
efi_call_phys2(out->output_string, out, str);
}

static void efi_printk(char *str)
{
char *s8;

for (s8 = str; *s8; s8++) {
struct efi_simple_text_output_protocol *out;
efi_char16_t ch[2] = { 0 };

ch[0] = *s8;
out = (struct efi_simple_text_output_protocol *)sys_table->con_out;

if (*s8 == '\n') {
efi_char16_t nl[2] = { '\r', 0 };
efi_call_phys2(out->output_string, out, nl);
efi_char16_printk(nl);
}

efi_call_phys2(out->output_string, out, ch);
efi_char16_printk(ch);
}
}

Expand Down Expand Up @@ -709,7 +714,12 @@ static efi_status_t handle_ramdisks(efi_loaded_image_t *image,
if ((u8 *)p >= (u8 *)filename_16 + sizeof(filename_16))
break;

*p++ = *str++;
if (*str == '/') {
*p++ = '\\';
*str++;
} else {
*p++ = *str++;
}
}

*p = '\0';
Expand Down Expand Up @@ -737,7 +747,9 @@ static efi_status_t handle_ramdisks(efi_loaded_image_t *image,
status = efi_call_phys5(fh->open, fh, &h, filename_16,
EFI_FILE_MODE_READ, (u64)0);
if (status != EFI_SUCCESS) {
efi_printk("Failed to open initrd file\n");
efi_printk("Failed to open initrd file: ");
efi_char16_printk(filename_16);
efi_printk("\n");
goto close_handles;
}

Expand Down
9 changes: 8 additions & 1 deletion trunk/arch/x86/include/asm/efi.h
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,14 @@ extern void efi_call_phys_epilog(void);
extern void efi_unmap_memmap(void);
extern void efi_memory_uc(u64 addr, unsigned long size);

#ifndef CONFIG_EFI
#ifdef CONFIG_EFI

static inline bool efi_is_native(void)
{
return IS_ENABLED(CONFIG_X86_64) == efi_enabled(EFI_64BIT);
}

#else
/*
* IF EFI is not configured, have the EFI calls return -ENOSYS.
*/
Expand Down
53 changes: 34 additions & 19 deletions trunk/arch/x86/kernel/head.c
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@
#include <asm/setup.h>
#include <asm/bios_ebda.h>

#define BIOS_LOWMEM_KILOBYTES 0x413

/*
* The BIOS places the EBDA/XBDA at the top of conventional
* memory, and usually decreases the reported amount of
Expand All @@ -16,17 +14,30 @@
* chipset: reserve a page before VGA to prevent PCI prefetch
* into it (errata #56). Usually the page is reserved anyways,
* unless you have no PS/2 mouse plugged in.
*
* This functions is deliberately very conservative. Losing
* memory in the bottom megabyte is rarely a problem, as long
* as we have enough memory to install the trampoline. Using
* memory that is in use by the BIOS or by some DMA device
* the BIOS didn't shut down *is* a big problem.
*/

#define BIOS_LOWMEM_KILOBYTES 0x413
#define LOWMEM_CAP 0x9f000U /* Absolute maximum */
#define INSANE_CUTOFF 0x20000U /* Less than this = insane */

void __init reserve_ebda_region(void)
{
unsigned int lowmem, ebda_addr;

/* To determine the position of the EBDA and the */
/* end of conventional memory, we need to look at */
/* the BIOS data area. In a paravirtual environment */
/* that area is absent. We'll just have to assume */
/* that the paravirt case can handle memory setup */
/* correctly, without our help. */
/*
* To determine the position of the EBDA and the
* end of conventional memory, we need to look at
* the BIOS data area. In a paravirtual environment
* that area is absent. We'll just have to assume
* that the paravirt case can handle memory setup
* correctly, without our help.
*/
if (paravirt_enabled())
return;

Expand All @@ -37,19 +48,23 @@ void __init reserve_ebda_region(void)
/* start of EBDA area */
ebda_addr = get_bios_ebda();

/* Fixup: bios puts an EBDA in the top 64K segment */
/* of conventional memory, but does not adjust lowmem. */
if ((lowmem - ebda_addr) <= 0x10000)
lowmem = ebda_addr;
/*
* Note: some old Dells seem to need 4k EBDA without
* reporting so, so just consider the memory above 0x9f000
* to be off limits (bugzilla 2990).
*/

/* If the EBDA address is below 128K, assume it is bogus */
if (ebda_addr < INSANE_CUTOFF)
ebda_addr = LOWMEM_CAP;

/* Fixup: bios does not report an EBDA at all. */
/* Some old Dells seem to need 4k anyhow (bugzilla 2990) */
if ((ebda_addr == 0) && (lowmem >= 0x9f000))
lowmem = 0x9f000;
/* If lowmem is less than 128K, assume it is bogus */
if (lowmem < INSANE_CUTOFF)
lowmem = LOWMEM_CAP;

/* Paranoia: should never happen, but... */
if ((lowmem == 0) || (lowmem >= 0x100000))
lowmem = 0x9f000;
/* Use the lower of the lowmem and EBDA markers as the cutoff */
lowmem = min(lowmem, ebda_addr);
lowmem = min(lowmem, LOWMEM_CAP); /* Absolute cap */

/* reserve all memory between lowmem and the 1MB mark */
memblock_reserve(lowmem, 0x100000 - lowmem);
Expand Down
4 changes: 2 additions & 2 deletions trunk/arch/x86/kernel/head_64.S
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ L3_START_KERNEL = pud_index(__START_KERNEL_map)
.globl startup_64
startup_64:
/*
* At this point the CPU runs in 64bit mode CS.L = 1 CS.D = 1,
* At this point the CPU runs in 64bit mode CS.L = 1 CS.D = 0,
* and someone has loaded an identity mapped page table
* for us. These identity mapped page tables map all of the
* kernel pages and possibly all of memory.
Expand Down Expand Up @@ -159,7 +159,7 @@ startup_64:
jmp 1f
ENTRY(secondary_startup_64)
/*
* At this point the CPU runs in 64bit mode CS.L = 1 CS.D = 1,
* At this point the CPU runs in 64bit mode CS.L = 1 CS.D = 0,
* and someone has loaded a mapped page table.
*
* %rsi holds a physical pointer to real_mode_data.
Expand Down
3 changes: 1 addition & 2 deletions trunk/arch/x86/kernel/setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -1196,8 +1196,7 @@ void __init setup_arch(char **cmdline_p)
* mismatched firmware/kernel archtectures since there is no
* support for runtime services.
*/
if (efi_enabled(EFI_BOOT) &&
IS_ENABLED(CONFIG_X86_64) != efi_enabled(EFI_64BIT)) {
if (efi_enabled(EFI_BOOT) && !efi_is_native()) {
pr_info("efi: Setup done, disabling due to 32/64-bit mismatch\n");
efi_unmap_memmap();
}
Expand Down
7 changes: 1 addition & 6 deletions trunk/arch/x86/platform/efi/efi.c
Original file line number Diff line number Diff line change
Expand Up @@ -69,11 +69,6 @@ struct efi_memory_map memmap;
static struct efi efi_phys __initdata;
static efi_system_table_t efi_systab __initdata;

static inline bool efi_is_native(void)
{
return IS_ENABLED(CONFIG_X86_64) == efi_enabled(EFI_64BIT);
}

unsigned long x86_efi_facility;

/*
Expand All @@ -85,7 +80,7 @@ int efi_enabled(int facility)
}
EXPORT_SYMBOL(efi_enabled);

static bool disable_runtime = false;
static bool __initdata disable_runtime = false;
static int __init setup_noefi(char *arg)
{
disable_runtime = true;
Expand Down
3 changes: 2 additions & 1 deletion trunk/drivers/acpi/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,8 @@ config ACPI_CUSTOM_DSDT
default ACPI_CUSTOM_DSDT_FILE != ""

config ACPI_INITRD_TABLE_OVERRIDE
bool "ACPI tables can be passed via uncompressed cpio in initrd"
bool "ACPI tables override via initrd"
depends on BLK_DEV_INITRD && X86
default n
help
This option provides functionality to override arbitrary ACPI tables
Expand Down
Loading

0 comments on commit a0526db

Please sign in to comment.