Skip to content

Commit

Permalink
Reland "CHROMIUM: Remove all #line directives"
Browse files Browse the repository at this point in the history
This reverts commit fcd9b0a.

Reason for revert: Fix forward available upstream

Original change's description:
> Revert "CHROMIUM: Remove all #line directives"
>
> This reverts commit ff243fd.
>
> Reason for revert: ARM boot loops with GCC 14.2 b/376074511
>
> Original change's description:
> > CHROMIUM: Remove all #line directives
> >
> > Now that gcc is updated, the directives are not necessary.
> >
> > BUG=b:272518464
> > TEST=Ran a CQ coverage build locally
> >
> > Cq-Depend: chromium:5902895
> > Change-Id: I84b03842442dd823c0d4c5e47c429dc230c7f905
> > Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/zephyr/+/5906038
> > Commit-Queue: Jonathon Murphy <jpmurphy@google.com>
> > Tested-by: Jeremy Bettis <jbettis@chromium.org>
> > Reviewed-by: Jonathon Murphy <jpmurphy@google.com>
>
> BUG=b:272518464
> BUG=b:376074511
>
> Change-Id: I76c7368dab8448890abf955dd862ac338fd339b3
> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/zephyr/+/5973374
> Reviewed-by: Jeremy Bettis <jbettis@chromium.org>
> Tested-by: Jonathon Murphy <jpmurphy@google.com>
> Commit-Queue: Jonathon Murphy <jpmurphy@google.com>

BUG=b:272518464
BUG=b:376074511

Cq-Depend: chromium:5976579, chromium:5976648
Change-Id: I9b6605112748d23ed129174ecbb5b9affd699d73
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/zephyr/+/5976802
Reviewed-by: Jeremy Bettis <jbettis@chromium.org>
Tested-by: Jonathon Murphy <jpmurphy@google.com>
Commit-Queue: Jonathon Murphy <jpmurphy@google.com>
  • Loading branch information
jpmurphy-google authored and Chromeos LUCI committed Oct 30, 2024
1 parent 4c97734 commit c48d371
Show file tree
Hide file tree
Showing 35 changed files with 1 addition and 215 deletions.
7 changes: 0 additions & 7 deletions arch/arm/core/mpu/arm_mpu.c
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,6 @@
* SPDX-License-Identifier: Apache-2.0
*/

/*
* TODO(b/272518464): Work around coreboot GCC preprocessor bug.
* #line marks the *next* line, so it is off by one.
*/
#line 12

#include <zephyr/device.h>
#include <zephyr/init.h>
#include <zephyr/kernel.h>
Expand Down Expand Up @@ -67,7 +61,6 @@ static uint8_t static_regions_num;
#error "Unsupported ARM CPU"
#endif

#line 71
static int region_allocate_and_init(const uint8_t index,
const struct arm_mpu_region *region_conf)
{
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/core/mpu/arm_mpu_v7_internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

#define LOG_LEVEL CONFIG_MPU_LOG_LEVEL
#include <zephyr/logging/log.h>
#line 18

/* Global MPU configuration at system initialization. */
static void mpu_init(void)
{
Expand Down
6 changes: 0 additions & 6 deletions drivers/adc/adc_ite_it8xxx2.c
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,6 @@
* SPDX-License-Identifier: Apache-2.0
*/

/*
* TODO(b/272518464): Work around coreboot GCC preprocessor bug.
* #line marks the *next* line, so it is off by one.
*/
#line 12

#define DT_DRV_COMPAT ite_it8xxx2_adc

#define LOG_LEVEL CONFIG_ADC_LOG_LEVEL
Expand Down
6 changes: 0 additions & 6 deletions drivers/adc/adc_npcx.c
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,6 @@
* SPDX-License-Identifier: Apache-2.0
*/

/*
* TODO(b/272518464): Work around coreboot GCC preprocessor bug.
* #line marks the *next* line, so it is off by one.
*/
#line 12

#define DT_DRV_COMPAT nuvoton_npcx_adc

#include <assert.h>
Expand Down
6 changes: 0 additions & 6 deletions drivers/console/uart_console.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,6 @@
* Hooks into the printk and fputc (for printf) modules. Poll driven.
*/

/*
* TODO(b/272518464): Work around coreboot GCC preprocessor bug.
* #line marks the *next* line, so it is off by one.
*/
#line 21

#include <zephyr/kernel.h>

#include <stdio.h>
Expand Down
7 changes: 0 additions & 7 deletions drivers/flash/flash_npcx_fiu_nor.c
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,6 @@
* SPDX-License-Identifier: Apache-2.0
*/

/*
* TODO(b/272518464): Work around coreboot GCC preprocessor bug.
* #line marks the *next* line, so it is off by one.
*/
#line 12

#define DT_DRV_COMPAT nuvoton_npcx_fiu_nor

#include <zephyr/kernel.h>
Expand All @@ -27,7 +21,6 @@
#include "spi_nor.h"

#include <zephyr/logging/log.h>
#line 31
LOG_MODULE_REGISTER(flash_npcx_fiu_nor, CONFIG_FLASH_LOG_LEVEL);

#define BLOCK_64K_SIZE KB(64)
Expand Down
6 changes: 0 additions & 6 deletions drivers/i2c/i2c_npcx_port.c
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,6 @@
* SPDX-License-Identifier: Apache-2.0
*/

/*
* TODO(b/272518464): Work around coreboot GCC preprocessor bug.
* #line marks the *next* line, so it is off by one.
*/
#line 12

#define DT_DRV_COMPAT nuvoton_npcx_i2c_port

/**
Expand Down
6 changes: 0 additions & 6 deletions drivers/i2c/i2c_shell.c
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,6 @@
* SPDX-License-Identifier: Apache-2.0
*/

/*
* TODO(b/272518464): Work around coreboot GCC preprocessor bug.
* #line marks the *next* line, so it is off by one.
*/
#line 12

#include <zephyr/drivers/i2c.h>
#include <zephyr/shell/shell.h>
#include <stdlib.h>
Expand Down
6 changes: 0 additions & 6 deletions drivers/sensor/nuvoton/nuvoton_tach_npcx/tach_nuvoton_npcx.c
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,6 @@
* SPDX-License-Identifier: Apache-2.0
*/

/*
* TODO(b/272518464): Work around coreboot GCC preprocessor bug.
* #line marks the *next* line, so it is off by one.
*/
#line 12

#define DT_DRV_COMPAT nuvoton_npcx_tach

/**
Expand Down
6 changes: 0 additions & 6 deletions drivers/serial/uart_npcx.c
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,6 @@
* SPDX-License-Identifier: Apache-2.0
*/

/*
* TODO(b/272518464): Work around coreboot GCC preprocessor bug.
* #line marks the *next* line, so it is off by one.
*/
#line 12

#define DT_DRV_COMPAT nuvoton_npcx_uart

#include <zephyr/sys/__assert.h>
Expand Down
6 changes: 0 additions & 6 deletions drivers/watchdog/wdt_npcx.c
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,6 @@
* SPDX-License-Identifier: Apache-2.0
*/

/*
* TODO(b/272518464): Work around coreboot GCC preprocessor bug.
* #line marks the *next* line, so it is off by one.
*/
#line 12

#define DT_DRV_COMPAT nuvoton_npcx_watchdog

/**
Expand Down
1 change: 0 additions & 1 deletion include/zephyr/arch/arm/asm_inline_gcc.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
#include <zephyr/arch/arm/cortex_a_r/cpu.h>
#endif

#line 31
#ifdef __cplusplus
extern "C" {
#endif
Expand Down
7 changes: 0 additions & 7 deletions include/zephyr/debug/coredump.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,13 @@
* SPDX-License-Identifier: Apache-2.0
*/

/*
* TODO(b/272518464): Work around coreboot GCC preprocessor bug.
* #line marks the *next* line, so it is off by one.
*/
#line 12

#ifndef ZEPHYR_INCLUDE_DEBUG_COREDUMP_H_
#define ZEPHYR_INCLUDE_DEBUG_COREDUMP_H_

#include <stddef.h>
#include <stdint.h>
#include <sys/types.h>

#line 21
/*
* Define COREDUMP_*_STR as public to allow coredump_backend_other to re-use
* these strings if necessary
Expand Down
6 changes: 0 additions & 6 deletions include/zephyr/drivers/clock_control.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,6 @@
* SPDX-License-Identifier: Apache-2.0
*/

/*
* TODO(b/272518464): Work around coreboot GCC preprocessor bug.
* #line marks the *next* line, so it is off by one.
*/
#line 14

/**
* @file
* @brief Public Clock Control APIs
Expand Down
8 changes: 0 additions & 8 deletions include/zephyr/drivers/i2c.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,6 @@
* @brief Public APIs for the I2C drivers.
*/

/*
* TODO(b/272518464): Work around coreboot GCC preprocessor bug.
* #line marks the *next* line, so it is off by one.
*/
#line 12

/*
* Copyright (c) 2015 Intel Corporation
*
Expand All @@ -35,8 +29,6 @@
#include <zephyr/sys/slist.h>
#include <zephyr/rtio/rtio.h>

#line 39

#ifdef __cplusplus
extern "C" {
#endif
Expand Down
1 change: 0 additions & 1 deletion include/zephyr/drivers/pwm.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
* SPDX-License-Identifier: Apache-2.0
*/

#line 9
/**
* @file
* @brief Public PWM Driver APIs
Expand Down
6 changes: 0 additions & 6 deletions include/zephyr/drivers/sensor.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,6 @@
* @brief Public APIs for the sensor driver.
*/

/*
* TODO(b/272518464): Work around coreboot GCC preprocessor bug.
* #line marks the *next* line, so it is off by one.
*/
#line 12

/*
* Copyright (c) 2016 Intel Corporation
*
Expand Down
8 changes: 0 additions & 8 deletions include/zephyr/logging/log_core.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,6 @@
* SPDX-License-Identifier: Apache-2.0
*/

/*
* TODO(b/272518464): Work around coreboot GCC preprocessor bug.
* #line marks the *next* line, so it is off by one.
*/
#line 12

#ifndef ZEPHYR_INCLUDE_LOGGING_LOG_CORE_H_
#define ZEPHYR_INCLUDE_LOGGING_LOG_CORE_H_

Expand All @@ -20,8 +14,6 @@
#include <stdarg.h>
#include <zephyr/sys/util.h>

#line 24

/* This header file keeps all macros and functions needed for creating logging
* messages (macros like @ref LOG_ERR).
*/
Expand Down
6 changes: 0 additions & 6 deletions include/zephyr/logging/log_instance.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,6 @@
* SPDX-License-Identifier: Apache-2.0
*/

/*
* TODO(b/272518464): Work around coreboot GCC preprocessor bug.
* #line marks the *next* line, so it is off by one.
*/
#line 12

#ifndef ZEPHYR_INCLUDE_LOGGING_LOG_INSTANCE_H_
#define ZEPHYR_INCLUDE_LOGGING_LOG_INSTANCE_H_

Expand Down
12 changes: 0 additions & 12 deletions include/zephyr/logging/log_msg.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,6 @@
* SPDX-License-Identifier: Apache-2.0
*/

/*
* TODO(b/272518464): Work around coreboot GCC preprocessor bug.
* #line marks the *next* line, so it is off by one.
*/
#line 12

#ifndef ZEPHYR_INCLUDE_LOGGING_LOG_MSG_H_
#define ZEPHYR_INCLUDE_LOGGING_LOG_MSG_H_

Expand All @@ -30,12 +24,6 @@
#include <alloca.h>
#endif

/*
* TODO(b/272518464): Work around coreboot GCC preprocessor bug.
* #line marks the *next* line, so it is off by one.
*/
#line 38

#ifdef __cplusplus
extern "C" {
#endif
Expand Down
6 changes: 0 additions & 6 deletions include/zephyr/sys/__assert.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,6 @@
* SPDX-License-Identifier: Apache-2.0
*/

/*
* TODO(b/272518464): Work around coreboot GCC preprocessor bug.
* #line marks the *next* line, so it is off by one.
*/
#line 12

#ifndef ZEPHYR_INCLUDE_SYS___ASSERT_H_
#define ZEPHYR_INCLUDE_SYS___ASSERT_H_

Expand Down
8 changes: 0 additions & 8 deletions include/zephyr/sys/atomic.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,6 @@
* SPDX-License-Identifier: Apache-2.0
*/

/*
* TODO(b/272518464): Work around coreboot GCC preprocessor bug.
* #line marks the *next* line, so it is off by one.
*/
#line 14

#ifndef ZEPHYR_INCLUDE_SYS_ATOMIC_H_
#define ZEPHYR_INCLUDE_SYS_ATOMIC_H_

Expand All @@ -23,8 +17,6 @@
#include <zephyr/types.h>
#include <zephyr/sys/util.h>

#line 27

#ifdef __cplusplus
extern "C" {
#endif
Expand Down
6 changes: 0 additions & 6 deletions include/zephyr/sys/atomic_builtin.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,6 @@
* SPDX-License-Identifier: Apache-2.0
*/

/*
* TODO(b/272518464): Work around coreboot GCC preprocessor bug.
* #line marks the *next* line, so it is off by one.
*/
#line 15

#ifndef ZEPHYR_INCLUDE_SYS_ATOMIC_BUILTIN_H_
#define ZEPHYR_INCLUDE_SYS_ATOMIC_BUILTIN_H_

Expand Down
6 changes: 0 additions & 6 deletions include/zephyr/sys/byteorder.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,6 @@
* SPDX-License-Identifier: Apache-2.0
*/

/*
* TODO(b/272518464): Work around coreboot GCC preprocessor bug.
* #line marks the *next* line, so it is off by one.
*/
#line 16

#ifndef ZEPHYR_INCLUDE_SYS_BYTEORDER_H_
#define ZEPHYR_INCLUDE_SYS_BYTEORDER_H_

Expand Down
7 changes: 0 additions & 7 deletions kernel/fatal.c
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,6 @@
* SPDX-License-Identifier: Apache-2.0
*/

/*
* TODO(b/272518464): Work around coreboot GCC preprocessor bug.
* #line marks the *next* line, so it is off by one.
*/
#line 12

#include <zephyr/kernel.h>

#include <kernel_internal.h>
Expand All @@ -21,7 +15,6 @@
#include <zephyr/fatal.h>
#include <zephyr/debug/coredump.h>

#line 25
LOG_MODULE_DECLARE(os, CONFIG_KERNEL_LOG_LEVEL);

/* LCOV_EXCL_START */
Expand Down
Loading

0 comments on commit c48d371

Please sign in to comment.