Geert Uytterhoeven | 20 May 2013 11:44

[PATCH] m68k: Remove inline strcpy() and strcat() implementations

Gcc may replace calls to standard string functions by open code and/or
calls to other standard string functions. If the replacement function is
not available out-of-line, link errors will happen.

To avoid this, the out-of-line versions were provided by
arch/m68k/lib/string.c, but they were usually not linked in anymore as
typically none of its symbols are referenced by built-in code.
However, if any module would need them, they would not be available.

Hence remove the inline strcpy() and strcat() implementations, remove
arch/m68k/lib/string.c, and let the generic string library code handle it.

Impact on a typical kernel build seems minimal or nonexistent:

-      .text : 0x00001000 - 0x002aac74   (2728 KiB)
-      .data : 0x002ada48 - 0x00392148   ( 914 KiB)
+      .text : 0x00001000 - 0x002aacf4   (2728 KiB)
+      .data : 0x002adac8 - 0x00392148   ( 914 KiB)

See also commit e00c73ee05dc38ecaccced55d4f5fc58b0b769f7 ("m68k: Remove
inline strlen() implementation").

Signed-off-by: Geert Uytterhoeven <geert <at> linux-m68k.org>
---
 arch/m68k/include/asm/string.h |   32 --------------------------------
 arch/m68k/lib/Makefile         |    2 +-
 arch/m68k/lib/string.c         |   22 ----------------------
 3 files changed, 1 insertions(+), 55 deletions(-)
 delete mode 100644 arch/m68k/lib/string.c

(Continue reading)

Geert Uytterhoeven | 13 May 2013 11:56

m68k-queue

m68k-queue is at a historical low:

$ git cherry -v v3.10-rc1 m68k-queue | wc -l
11
$

and of course I want to keep that, and improve it!

  - m68k/irq: Add handle_polled_irq() for timer based soft interrupts
    Still no response from tglx :-(
  - m68k/atari: use polled interrupt handler for timer D interrupts
    Depends on above
  - m68k/atari: EtherNAT - ethernet support (smc91x)
    m68k/atari: EtherNEC - ethernet support (ne)
    Michael will submit
  - m68k/atari: USB - add ISP1160 USB host controller support
    Michael WIP?
  - m68k/atari: Update defconfigs for new features
    m68k/mac: Update defconfig
    I'm working on the defconfigs
  - fs/fat: Revert "msdos fs: remove unsettable atari option"
    fs/fat: Atari FAT updates
    fs/fat: Use correct logical sector size for Atari GEMDOS FAT
    Who dares to stand in front of the fat maintainer and will submit these?
    Michael, too?
  - mac: ADB raw packets
    I guess this can be dropped?

Thanks!

(Continue reading)

Thorsten Glaser | 11 May 2013 17:19
Picon
Favicon
Gravatar

I/O macros redefined, inconsistent across m68k machdep headers

Hi!

I *really* dislike seeing messages like this while compiling,
that’s why I’m sending them there. I had a look at both files,
but there’s a lot of ifdeffery going on, and I don’t know
which of the macro resolutions, if any, is supposedly correct.

  CC [M]  drivers/parport/parport_pc.o
In file included from /tmp/buildd/linux-3.8.12/drivers/parport/
parport_pc.c:67:0:
/tmp/buildd/linux-3.8.12/arch/m68k/include/asm/parport.h:14:0: warning: 
"insl" redefined [enabled by default]
/tmp/buildd/linux-3.8.12/arch/m68k/include/asm/io_mm.h:280:0: note: this is 
the location of the previous definition
/tmp/buildd/linux-3.8.12/arch/m68k/include/asm/parport.h:15:0: warning: 
"outsl" redefined [enabled by default]
/tmp/buildd/linux-3.8.12/arch/m68k/include/asm/io_mm.h:283:0: note: this is 
the location of the previous definition
In file included from /tmp/buildd/linux-3.8.12/drivers/parport/
parport_pc.c:67:0:
/tmp/buildd/linux-3.8.12/arch/m68k/include/asm/parport.h:14:0: warning: 
"insl" redefined [enabled by default]
/tmp/buildd/linux-3.8.12/arch/m68k/include/asm/io_mm.h:280:0: note: this is 
the location of the previous definition
/tmp/buildd/linux-3.8.12/arch/m68k/include/asm/parport.h:15:0: warning: 
"outsl" redefined [enabled by default]
/tmp/buildd/linux-3.8.12/arch/m68k/include/asm/io_mm.h:283:0:this is the 
location of the previous definition

This is from building the amiga flavour (first of six!) of the Debian
(Continue reading)

Greg Ungerer | 10 May 2013 09:13

[git pull] m68knommu arch fixes for 3.10

Hi Linus,

Can you please pull the m68knommu git tree, for-next branch.

The bulk of the changes are generalizing the ColdFire v3 core support and
adding in 537x CPU support. Also a couple of other bug fixes, one to fix
a reintroduction of a past bug in the romfs filesystem nommu support.

Regards
Greg

The following changes since commit 60d509fa6a9c4653a86ad830e4c4b30360b23f0e:

  Linux 3.9-rc8 (2013-04-21 14:38:45 -0700)

are available in the git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/gerg/m68knommu.git for-next

for you to fetch changes up to 2842e5b00e99b30404f9af1c1b367c8e467b5c6c:

  m68knommu: enable Timer on coldfire 532x (2013-04-29 09:17:59 +1000)

----------------------------------------------------------------
Greg Ungerer (8):
      romfs: fix nommu map length to keep inside filesystem
      m68k: remove unused asm/dbg.h
      m68knommu: create and use a common M53xx ColdFire class of CPUs
      m68knommu: make ColdFire M532x platform support more v3 generic
      m68knommu: add support for the ColdFire 537x family of CPUs
(Continue reading)

Chanho Min | 7 May 2013 10:12

[PATCH RESEND] lib: add weak clz/ctz functions

Some architectures need __c[lt]z[sd]i2() for __builtin_c[lt]z[ll] and
It causes build failure. They can be implemented using the fls()/__ffs() and
overridden by linking arch-specific versions may not be implemented yet.

Reference: https://lkml.org/lkml/2013/4/18/603
Reported-by: Geert Uytterhoeven <geert <at> linux-m68k.org>
Signed-off-by: Chanho Min <chanho.min <at> lge.com>
---
 lib/Makefile  |    2 +-
 lib/clz_ctz.c |   58 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 59 insertions(+), 1 deletion(-)
 create mode 100644 lib/clz_ctz.c

diff --git a/lib/Makefile b/lib/Makefile
index af79e8c..3eacb2c 100644
--- a/lib/Makefile
+++ b/lib/Makefile
 <at>  <at>  -23,7 +23,7  <at>  <at>  lib-y	+= kobject.o klist.o

 obj-y += bcd.o div64.o sort.o parser.o halfmd4.o debug_locks.o random32.o \
 	 bust_spinlocks.o hexdump.o kasprintf.o bitmap.o scatterlist.o \
-	 gcd.o lcm.o list_sort.o uuid.o flex_array.o \
+	 gcd.o lcm.o list_sort.o uuid.o flex_array.o clz_ctz.o\
 	 bsearch.o find_last_bit.o find_next_bit.o llist.o memweight.o kfifo.o
 obj-y += string_helpers.o
 obj-$(CONFIG_TEST_STRING_HELPERS) += test-string_helpers.o
diff --git a/lib/clz_ctz.c b/lib/clz_ctz.c
new file mode 100644
index 0000000..a8f8379
--- /dev/null
(Continue reading)

Chanho Min | 2 May 2013 11:56

[PATCH] lib: add weak clz/ctz functions

Some architectures need __c[lt]z[sd]i2() for __builtin_c[lt]z[ll] and
It causes build failure. They can be implemented using the fls()/__ffs() and
overridden by linking arch-specific versions may not be implemented yet.

Reference: https://lkml.org/lkml/2013/4/18/603
Reported-by: Geert Uytterhoeven <geert <at> linux-m68k.org>
Signed-off-by: Chanho Min <chanho.min <at> lge.com>
---
 lib/Makefile  |    2 +-
 lib/clz_ctz.c |   58 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 59 insertions(+), 1 deletion(-)
 create mode 100644 lib/clz_ctz.c

diff --git a/lib/Makefile b/lib/Makefile
index af79e8c..3eacb2c 100644
--- a/lib/Makefile
+++ b/lib/Makefile
 <at>  <at>  -23,7 +23,7  <at>  <at>  lib-y	+= kobject.o klist.o

 obj-y += bcd.o div64.o sort.o parser.o halfmd4.o debug_locks.o random32.o \
 	 bust_spinlocks.o hexdump.o kasprintf.o bitmap.o scatterlist.o \
-	 gcd.o lcm.o list_sort.o uuid.o flex_array.o \
+	 gcd.o lcm.o list_sort.o uuid.o flex_array.o clz_ctz.o\
 	 bsearch.o find_last_bit.o find_next_bit.o llist.o memweight.o kfifo.o
 obj-y += string_helpers.o
 obj-$(CONFIG_TEST_STRING_HELPERS) += test-string_helpers.o
diff --git a/lib/clz_ctz.c b/lib/clz_ctz.c
new file mode 100644
index 0000000..a8f8379
--- /dev/null
(Continue reading)

Jonathan Buzzard | 1 May 2013 14:54
Picon
Picon
Favicon

[PARPORT] Re: [PATCH] parport_pc

On Sun, 2002-06-09 at 11:19, Geert Uytterhoeven wrote:
> I think the following path is needed for Q40/Q60 on the m68k platform, which
> doesn't have PCI.

Looks OK to me.

p.

--  To unsubscribe, send mail to: linux-parport-request <at> torque.net --
--  with the single word "unsubscribe" in the body of the message. --

Michael Schmitz | 1 May 2013 00:10
Picon

Re: [PATCH 0/13] Atari EtherNAT/EtherNEC/NetUSBee support

Hi Geert,

[taking this back to the list ...]

> Before rebasing, you can also use "git cherry -v" to list the commits.
> Git will prepend
> them with "+" if it's new, "-" if it's already present. Note that git
> may guess wrong if the
> commits have changed/cause conflicts.

Thanks, that does help! 

> E.g. the next command show me what's in my m68k-queue, and not yet in for-linus
> (the third parameter "v3.9" is there to limit displaying to commits
> not yet in v3.9.
>  As "for-linus" is based on v3.9-rc7, it would also list all commits
> between v3.9-rc7 and
>  v3.9 if I omit the "v3.9" parameter):
> 
> $ git cherry -v for-linus m68k-queue v3.9

Nice trick - I tried git cherry but the output on two branches one merged
and one unmerged was too confusing. 

> > That was the 3.9-rc2 version of m68k-queue, after git fetch and git rebase
> > origin/m68k-queue.
> 
> OK, that one didn't have the new version yet.

Come to think of it - I am quite sure the branch _should_ have been based on
(Continue reading)

Geert Uytterhoeven | 29 Apr 2013 20:15

[git pull] m68k updates for 3.10

	Hi Linus,

The following changes since commit c1be5a5b1b355d40e6cf79cc979eb66dafa24ad1:
  Linus Torvalds (1):
        Linux 3.9

are available in the git repository at:

  ra.kernel.org:/pub/scm/linux/kernel/git/geert/linux-m68k.git for-linus
  git://git.kernel.org/pub/scm/linux/kernel/git/geert/linux-m68k.git for-linus

Geert Uytterhoeven (1):
      m68k: Add missing cmpxchg64() if CONFIG_RMW_INSNS=y

Michael Schmitz (7):
      m68k/atari: ROM port ISA adapter support
      m68k/atari: use dedicated irq_chip for timer D interrupts
      m68k/atari: EtherNAT - platform device and IRQ support code
      m68k/atari: EtherNEC - add platform device support
      m68k/atari: EtherNAT - add interrupt chip definition for CPLD interrupts
      m68k: Implement ndelay() based on the existing udelay() logic
      m68k/atari: USB - add platform devices for EtherNAT/NetUSBee ISP1160 HCD

Michal Marek (1):
      m68k: Remove inline strlen() implementation

Summarized:
  - The m68k-specific parts for Atari EtherNAT (smc91x), EtherNEC (ne), and
    EtherNAT/NetUSBee (ISP1160 HCD) support,
  - Two build fixes for build-breakage in linux-next.
(Continue reading)

Thorsten Glaser | 24 Apr 2013 17:54
Picon
Gravatar

Re: [PATCH/RFC] m68k: Add -ffreestanding to KBUILD_CFLAGS

Geert Uytterhoeven dixit:

>If you're replying to linux-m68k only, I don't think Michal will see
>your reply...

Ah well, I did a “Follow up” in the GMane webinterface, as I’m
not subscribed on those lists.

bye,
//mirabilos
--

-- 
Sorry,  I’m annoyed today and you came by as an Arch user. These are the
perfect victims for any crime against humanity, like  systemd,  feminism
or social democracy.
		-- Christoph Lohmann on dev <at> suckless.org
Geert Uytterhoeven | 22 Apr 2013 11:24

Re: [PATCH 1/2] lib: Add lz4 compressor module

On Mon, Apr 22, 2013 at 11:22 AM, Chanho Min <chanho.min <at> lge.com> wrote:
>>> +#define HTYPE const u8*
>>> +
>>> +#ifdef __BIG_ENDIAN
>>> +#define LZ4_NBCOMMONBYTES(val) (__builtin_clz(val) >> 3)
>>> +#else
>>> +#define LZ4_NBCOMMONBYTES(val) (__builtin_ctz(val) >> 3)
>>> +#endif
>>
>>It seems at least m68k and sparc don't have the __builtin_clz() functions:
>>
>>m68k-allmodconfig (http://kisskb.ellerman.id.au/kisskb/buildresult/8572593/):
>>
>>ERROR: "__clzsi2" [lib/lz4/lz4hc_compress.ko] undefined!
>>ERROR: "__clzsi2" [lib/lz4/lz4_compress.ko] undefined!
>
> gcc seems to define __builtin_clz as __clzsi2 in some architecture.
> But, kernel doesn't link libgcc.a.
> If kernel should use gcc's built-in function without libgcc.a,
> do we need to port __clzsi2 to 'arch/*/lib/*'?

That's another option.

So far no one used __builtin_c[lt]z in generic code. We always used
__fls and __ffs.

Gr{oetje,eeting}s,

                        Geert

(Continue reading)


Gmane